Pool and hosts with different users

Sergey Yelin elinsn@REDACTED
Fri Mar 11 09:38:21 CET 2011


Hi list,

playing with erlang poll a have found interesting feature. Access to remote
hosts implicitly requires existing user with the same name in all hosts
listed in .hosts.erlang file (because underlying transport, e.g. rsh/ssh
requires it).  In my case I have a few hosts with different user names, so I
need explicitly specify user name for every hosts. According ssh rules I try
to specify it in .hosts.erlang as "'user@REDACTED'." , it works in one direction
only: master can login to slave host but can't start slave node because of
wrong name format "queue@REDACTED@host".

So, is there any other ways to specify user for slave nodes?

File .hosts.erlang on master host (robby):
'slave@REDACTED'.


Error on slave node (found in ssh debug log):
slave@REDACTED:~$ erl -master pq@REDACTED -sname pq@REDACTED@debian -s slave
slave_start pq@REDACTED slave_waiter_0
{error_logger,{{2011,3,2},{22,59,6}},"Invalid node name: ~p~n",['pq@REDACTED
@debian']}
{error_logger,{{2011,3,2},{22,59,6}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.20.0>},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}},{ancestors,[net_sup,kernel_sup,<0.9.0>]},{messages,[]},{links,[<0.17.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,24},{reductions,449}],[]]}
{error_logger,{{2011,3,2},{22,59,6}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[['pq@REDACTED
@debian',shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2011,3,2},{22,59,6}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2011,3,2},{22,59,6}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid
terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}


More information about the erlang-questions mailing list