11

I have some strange behaviour on my docker containers (CentOS). When I SSH into it there's a running instance of Erlang VM ([email protected]) I can't connect to it with -remsh argument, however I can ping it. My Erlang node ([email protected]) works correctly though.

bash-4.2# ./bin/erl -name '[email protected]' -remsh '[email protected]'
Eshell V6.1  (abort with ^G)
([email protected])1> node().
'[email protected]'
([email protected])2> net_adm:ping('[email protected]').
pong
([email protected])3> erlang:system_info(system_version).
"Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]\n"
([email protected])4> rpc:call('[email protected]', erlang, node, []).
'[email protected]'

There're 2 linux processes running - one for the actual VM and another for the process that tries to invoke remote shell

26 ?        Sl    40:46 /home/vcap/app/bin/beam.smp -- -root /home/vcap/app -progname erl -- -home /home/vcap/app/ -- -name [email protected] -boot releases/14.2.0299/start -config sys -boot_var PATH lib -noshell
32542 ?     Sl+    0:00 /home/vcap/app/bin/beam.smp -- -root /home/vcap/app -progname erl -- -home /home/vcap/app -- -name [email protected] -remsh [email protected]

When I copy Erlang binary files to the host (Arch Linux) and run ./bin/erl I have different results:

[jodias@arch tmp]$ ./bin/erl
Erlang/OTP 17 [erts-6.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]

Eshell V6.1  (abort with ^G)
1>

Please note that there's the Erlang system version printed and that's missing on a docker container (however Erlang binaries are exactly the same).

3
  • I even tried recompiling Erlang VM on the docker container but with no luck.
    – Kuba Odias
    Commented Oct 20, 2016 at 5:31
  • 1
    I don't understand, what is your problem? You have access to Erlang shell, right, so, this feature work... no? Commented Oct 20, 2016 at 6:41
  • 2
    The problem is that with -remsh [email protected] you'd expect to get a shell on [email protected], not on [email protected].
    – legoscia
    Commented Oct 20, 2016 at 8:39

1 Answer 1

11
+500

What is $TERM in shell you're trying to open remote? There is a problem when TERM is absent or is not known to ncurses which Erlang is built against, making remote shell connection fail silently. Try this one:

TERM=xterm ./bin/erl -name '[email protected]' -remsh '[email protected]'

I once reported the problem to Erlang mailing list but no answer came up. Now I see this issue is in Erlang issue tracker. Please vote for it to be picked by OTP team ;)

1
  • Thanks Reith! The TERM was indeed set to 'dumb' after changing it to xterm it works perfectly.
    – Kuba Odias
    Commented Oct 26, 2016 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.