[erlang-questions] erl_call problem

64 views
Skip to first unread message

Andrew Gopienko

unread,
Oct 7, 2012, 9:53:33 AM10/7/12
to erlang-q...@erlang.org
We are using erl_call for nodes monitoring and sometimes erl_call failed with message 'erl_call: failed to connect to node nod...@192.168.1.2'
Node at this time is alive and works as usually.

We found that node at this time returns status 'salive' instead of expected 'sok'.

----------------------------------------------------------------------------------------------
ei_xconnect: Sun Oct  7 16:45:00 2012: -> CONNECT attempt to connect to node_01
ei_epmd_r4_port: Sun Oct  7 16:45:00 2012: -> PORT2_REQ alive=node_01 ip=192.168.1.2
ei_epmd_r4_port: Sun Oct  7 16:45:00 2012: <- PORT2_RESP result=0 (ok)
ei_epmd_r4_port: Sun Oct  7 16:45:00 2012:    port=52658 ntype=77 proto=0 dist-high=5 dist-low=5
ei_xconnect: Sun Oct  7 16:45:00 2012: -> CONNECT connected to remote
recv_status: Sun Oct  7 16:45:00 2012: <- len=6
recv_status: Sun Oct  7 16:45:00 2012: <- buf[0]=s (115)
recv_status: Sun Oct  7 16:45:00 2012: <- buf[1]=a (97)
recv_status: Sun Oct  7 16:45:00 2012: <- buf[2]=l (108)
recv_status: Sun Oct  7 16:45:00 2012: <- buf[3]=i (105)
recv_status: Sun Oct  7 16:45:00 2012: <- buf[4]=v (118)
recv_status: Sun Oct  7 16:45:00 2012: <- buf[5]=e (101)
ex_xconnect: Sun Oct  7 16:45:00 2012: RECV_STATUS failed
ei_xconnect: Sun Oct  7 16:45:00 2012: -> CONNECT failed
erl_call: failed to connect to node nod...@192.168.1.2, fd=-1, errno=0, erl_errno=5
----------------------------------------------------------------------------------------------

In what cases the node returns 'salive' ?


Andrew Gopienko

Andrew Gopienko

unread,
Oct 8, 2012, 3:01:07 AM10/8/12
to erlang-q...@erlang.org

Serge Aleynikov

unread,
Oct 8, 2012, 9:07:07 AM10/8/12
to erlang-q...@erlang.org
You normally receive 'salive' in the distribution protocol when you try
to connect to a server node from another client node that has a name
already known to the server node.

I.e.:

shell1> erl -sname a

shell2> erl_call -sname a -h b -a 'timer sleep [60000]'
shell3> erl_call -sname a -h b -a 'timer sleep [60000]'

You should get a failed 'salive' connection error in shell3.

Regards,

Serge

On 10/8/2012 3:01 AM, Andrew Gopienko wrote:
> We are using erl_call for nodes monitoring and sometimes erl_call failed
> with message 'erl_call: failed to connect to node nod...@192.168.1.2
> <mailto:nod...@192.168.1.2>'
> Node at this time is alive and works as usually.
>
> We found that node at this time returns status 'salive' instead of
> expected 'sok'.
>
> ------------------------------
> ----------------------------------------------------------------
> ei_xconnect: Sun Oct 7 16:45:00 2012: -> CONNECT attempt to connect to
> node_01
> ei_epmd_r4_port: Sun Oct 7 16:45:00 2012: -> PORT2_REQ alive=node_01
> ip=192.168.1.2
> ei_epmd_r4_port: Sun Oct 7 16:45:00 2012: <- PORT2_RESP result=0 (ok)
> ei_epmd_r4_port: Sun Oct 7 16:45:00 2012: port=52658 ntype=77
> proto=0 dist-high=5 dist-low=5
> ei_xconnect: Sun Oct 7 16:45:00 2012: -> CONNECT connected to remote
> recv_status: Sun Oct 7 16:45:00 2012: <- len=6
> recv_status: Sun Oct 7 16:45:00 2012: <- buf[0]=s (115)
> recv_status: Sun Oct 7 16:45:00 2012: <- buf[1]=a (97)
> recv_status: Sun Oct 7 16:45:00 2012: <- buf[2]=l (108)
> recv_status: Sun Oct 7 16:45:00 2012: <- buf[3]=i (105)
> recv_status: Sun Oct 7 16:45:00 2012: <- buf[4]=v (118)
> recv_status: Sun Oct 7 16:45:00 2012: <- buf[5]=e (101)
> ex_xconnect: Sun Oct 7 16:45:00 2012: RECV_STATUS failed
> ei_xconnect: Sun Oct 7 16:45:00 2012: -> CONNECT failed
> erl_call: failed to connect to node nod...@192.168.1.2
> <mailto:nod...@192.168.1.2>, fd=-1, errno=0, erl_errno=5
> ----------------------------------------------------------------------------------------------
>
> In what cases the node returns 'salive' ?
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-q...@erlang.org
> http://erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
Reply all
Reply to author
Forward
0 new messages