Problems connecting with --remsh from 64 to 32 bit system

231 views
Skip to first unread message

Waldemar Rachwał

unread,
Oct 21, 2015, 11:21:59 AM10/21/15
to elixir-l...@googlegroups.com
Initially I narrowed down the problem to erlang itself (erl), but mistakenly used -cookie instead of -setcookie (mislead by --cookie of Elixir ;) ).
After change to -setcookie, erlang's -remsh option works as expected.

In elixir sources I found --cookie is transformed to -setcookie and the setting is passed to erl properly (to make sure in the elixir script I added a line echoing command line just before the final exec), so the cookie is known by ERL from the start.

However, when I use --remsh with IEx the shell process terminates immediately.
Interestingly, in the same IEx session, using job control commands, I am able to connect to the remote node.

Below is the session illustrating the problem. I copied it as is, so you'll see weird additional settings (ERL_EPMD_.., inet_dist_...) to pass through a firewall.
Obviously, I checked that --remsh between 32 bit erlang/elixir boxes works just fine.

Regards,
Waldemar.


=== remote box (32 bits)

$ ERL_EPMD_PORT=5999 iex --erl '-kernel inet_dist_listen_min 5990' --erl '-kernel inet_dist_listen_max 5998' --name bo...@10.83.206.154 --cookie BULBA
Erlang/OTP 18 [erts-7.1] [source] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]

Interactive Elixir (1.1.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(bo...@10.83.206.154)1> :erlang.get_cookie
:BULBA
iex(bo...@10.83.206.154)2>

=== local box (64 bits)

$ ERL_EPMD_PORT=5999 iex --name bo...@10.154.79.54 --remsh bo...@10.83.206.154 --cookie BULBA
Erlang/OTP 18 [erts-7.1] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]

*** ERROR: Shell process terminated! (^G to start new job) ***

User switch command
 --> j
 --> r 'bo...@10.83.206.154' 'Elixir.IEx'
 --> j
   2* {'bo...@10.83.206.154','Elixir.IEx',start,[]}
 --> c
Interactive Elixir (1.1.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(bo...@10.83.206.154)1>
nil
iex(bo...@10.83.206.154)2> Node.list
[:"bo...@10.154.79.54"]
iex(bo...@10.83.206.154)3>

### echoed arguments just before exec in exlixir script
### erl -pa /usr/local/stow/elixir-master/lib/elixir/bin/../lib/eex/ebin /usr/local/stow/elixir-master/lib/elixir/bin/../lib/elixir/ebin /usr/local/stow/elixir-master/lib/elixir/bin/../lib/ex_unit/ebin /usr/local/stow/elixir-master/lib/elixir/bin/../lib/iex/ebin /usr/local/stow/elixir-master/lib/elixir/bin/../lib/logger/ebin /usr/local/stow/elixir-master/lib/elixir/bin/../lib/mix/ebin -elixir ansi_enabled true -user Elixir.IEx.CLI -name bo...@10.154.79.54 -setcookie BULBA -extra --no-halt --erl -user Elixir.IEx.CLI +iex --name bo...@10.154.79.54 --remsh bo...@10.83.206.154 --cookie BULBA

Mark Reynolds

unread,
Oct 21, 2015, 3:11:13 PM10/21/15
to elixir-l...@googlegroups.com
It seems to be an error with all systems not only 32 bits. An issue were opened yesterday https://github.com/elixir-lang/elixir/issues/3889
--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
 
Reply all
Reply to author
Forward
0 new messages