Re: erl_call -q
Luke Bakken <[email protected]> Mon, 28 Mar 2022 10:13:17 -0700
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CADFEJudZOPViS-QYo9HELUNxnSWwM8tPsZAmVpKgfNJUysCkhA@mail.gmail.com> |
Hello, I don't believe that erl_call supports the "inet_tls" distribution protocol - https://www.erlang.org/doc/man/erl_call.html At least, it's not documented in the manual page. If I try to connect to a TLS dist node using remsh, but without specifying certs, I get a function_clause error in public_key,pkix_decode_cert due to the lack of certificates. My guess is that, provided that you configure certificates for TLS distribution, you could accomplish what you want by starting a second node, connecting the "usual way" via addressing the other node, and then use the rpc module to stop the node. Thanks, Luke On Fri, Mar 25, 2022 at 2:13 AM Bogdan Andu <[email protected]> wrote > > Hello, > > I want to stop a node started with switch -proto_dist inet_tls : > $ /usr/lib/erlang/lib/erl_interface-5.2.1/bin/erl_call -q -c proxy -name 'node-name@host-name' > > doesn't kill the node: > $ erl -name node-name@host-name -setcookie proxy -proto_dist inet_tls > Erlang/OTP 24 [erts-12.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] > > Eshell V12.3 (abort with ^G) > (node-name@host-name)1> =NOTICE REPORT==== 25-Mar-2022::08:55:56.447550 === > TLS server: In state hello at tls_record.erl:564 generated SERVER ALERT: Fatal - Unexpected Message > - {unsupported_record_type,0} > > (node-name@host-name)1> > > Because the ssl handshake fails the node does not 'catch' the > command to terminate itself. > > > The execution of command shows the error: > $ /usr/lib/erlang/lib/erl_interface-5.2.1/bin/erl_call -c proxy -name node-name@host-name -a "init stop" > erl_call: failed to connect to node node-name@host-name > > Actually the erl_call node connects to 'node-name@host-name' but is rejected with the same error as above. > > Because the erl_call cannot connect to a tls erlang node, erl_call cannot stop suc node. > > If the node is started like this: > $ erl -name node-name@host-name -setcookie proxy -proto_dist inet_tcp > > erl_call is able to stop it. > > Is there a solution to this problem? > > Cheers, > > Bogdan >