alice
alice copied to clipboard
Can't connect to rabbit node?
Running ./start.sh I get the following:
=PROGRESS REPORT==== 19-Nov-2009::11:11:41 ===
application: alice
started_at: '[email protected]'
Eshell V5.6.3 (abort with ^G)
=ERROR REPORT==== 19-Nov-2009::11:10:18 ===
Lost connection with rabbitmq_server. Trying to regain connection to '[email protected]'
=ERROR REPORT==== 19-Nov-2009::11:10:23 ===
Error in process <0.113.0> on node '[email protected]' with exit value:
{badarg,[{erlang,list_to_existing_atom,["rabbit@h8"]},{dist_util,recv_challenge,1},
{dist_util,handshake_we_started,1}]}
Any idea what this could be? rabbit@h8 is definitely running, alive and well.
Using RabbitMQ 1.7.0
change ./start.sh : -name alice -> -sname alice@h8
and well be the same cookie Erlang
@dieu that doesn't help either:
./start.sh -alice rabbithost "rabbit@h8" -setcookie $(cat ~/.erlang.cookie) -sname alice@h8
=ERROR REPORT==== 16-Dec-2009::17:41:37 ===
Lost connection with rabbitmq_server. Trying to regain connection to rabbit@h8
(alice@h8)2> net_adm:names().
{ok,[{"rabbit",40228},{"alice",34313}]}
I'm seeing the same thing. I'm on OS X. My buddy, who is using Ubuntu has the same problem. I've yet to see Alice working properly. I'm surprised I don't see more complaints.
=ERROR REPORT==== 16-Dec-2009::13:20:16 === Lost connection with rabbitmq_server. Trying to regain connection to rabbit@mabel
I have mabel pointed to 127.0.0.1 in my hosts file, and I have been trying various sname suggestions I've seen in the Git issues. Help.
@ask and what is your OS?
I helped to Debian, only I set a cookie through a file ~ /. erlang.cookie
@dieu: Debian Lenny, RabbitMQ 1.7.0
I configure which host should alice use and got next =ERROR REPORT==== 17-Dec-2009::20:20:10 === ** System running to use fully qualified hostnames ** ** Hostname Mishyn is illegal **
=ERROR REPORT==== 17-Dec-2009::20:20:10 === Lost connection with rabbitmq_server. Trying to regain connection to rabbit@Mishyn
@amishyn please
erl
net_adm:localhost().
net_adm:names().
node().
nodes().
But in general need to change the host name, it certainly not used validated characters.
@ask
try to link the two erlang node in the cluster, through net_adm:ping(), what a net_adm:names() shows a remote node, nothing says they can still not contacted for some other errors.
I've been having this problem on a RedHat box, and I just got it solved. This was probably due to my overwhelming ignorance of Erlang than anything else, but here is what I did.
- Find what user the RabbitMQ server is running under. In my case, this is "rabbitmq"
- Find the erlang cookie for that user. This should be in the home directory for that user. In my case this is in /var/lib/rabbitmq/.erlang.cookie
- Start alice like this: ./start.sh -setcookie "secret-cookie" -name rabbitmq@hostname
This worked for me.
Running on Snow Leopard...had to change rabbitmq-server to use -name instead of -sname and then make sure to use ./startup.sh -setcookie to the same cookie as rabbitmq.
I've now been trying for about a week to get this to work =(. Regarding tips for using the suggested above; You need to remove the -name arg in the start.sh if you are going to pass it in on the console, otherwise it will try and run it at @nohost due to the confusion of having it both in the script and on the command line.
Regarding my current problem: I'm running on Ubuntu 9.1, used the debian packages to install rabbitmq and erlang. The rabbitmq server is running at startup at: [{rabbit@ubuntu,1419}] It installed itself under the "rabbitmq" user and under my home dir there is a .erlang.cookie that seems to be the one getting the rabbitmq cookie.
If I just use: ./start.sh -setcookie SDWRXMVHVSGVMPRLKZXJ -name "[email protected]"
I get a bunch of loading info which ends in: =ERROR REPORT==== 6-Feb-2010::17:54:11 === Error in process <0.78.0> on node '[email protected]' with exit value: {badarg,[{erlang,list_to_existing_atom,["rabbit@ubuntu"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}
I'm guessing the issue is the cookie, but that is the one in my "~/.erlang.cookie" which is marked as touched today, I've looked in the "/var/lib/rabbitmq/.erlang.cookie" and that file is stale. Regardless of what I do I just can't seem to make it connect? I've well and truly had several good cracks at this and am not getting anywhere; any help anyone?
A full dump is pasted below:
root@ubuntu:/home/will/alice# cat ../.erlang.cookie
SDWRXMVHVSGVMPRLKZXJroot@ubunt./start.sh -setcookie SDWRXMVHVSGVMPRLKZXJ -name "[email protected]"
make[1]: Entering directory `/home/will/alice/deps/mochiweb'
(cd src;make all)
make[2]: Entering directory `/home/will/alice/deps/mochiweb/src'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/will/alice/deps/mochiweb/src'
make[1]: Leaving directory `/home/will/alice/deps/mochiweb'
./s.sh: 6: [[: not found
Erlang R13B01 (erts-5.7.2) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]
=PROGRESS REPORT==== 6-Feb-2010::17:54:05 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.41.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.42.0>},
{name,overload},
{mfa,{overload,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.40.0>},
{name,sasl_safe_sup},
{mfa,
{supervisor,start_link,
[{local,sasl_safe_sup},sasl,safe]}},
{restart_type,permanent},
{shutdown,infinity},
{child_type,supervisor}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,sasl_sup}
started: [{pid,<0.43.0>},
{name,release_handler},
{mfa,{release_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
application: sasl
started_at: '[email protected]'
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,os_mon_sup}
started: [{pid,<0.49.0>},
{name,disksup},
{mfa,{disksup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,os_mon_sup}
started: [{pid,<0.50.0>},
{name,memsup},
{mfa,{memsup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=INFO REPORT==== 6-Feb-2010::17:54:06 ===
alarm_handler: {set,{system_memory_high_watermark,[]}}
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,os_mon_sup}
started: [{pid,<0.52.0>},
{name,cpu_sup},
{mfa,{cpu_sup,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
starting alice_sup with []
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
application: os_mon
started_at: '[email protected]'
=INFO REPORT==== 6-Feb-2010::17:54:06 ===
alarm_handler: {set,{{disk_almost_full,"/host"},[]}}
=INFO REPORT==== 6-Feb-2010::17:54:06 ===
Logging to path: "./logs/[email protected]"
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.60.0>},
{name,timer_server},
{mfa,{timer,start_link,[]}},
{restart_type,permanent},
{shutdown,1000},
{child_type,worker}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {<0.58.0>,alice_sup}
started: [{pid,<0.59.0>},
{name,alice_log},
{mfa,{alice_log,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=INFO REPORT==== 6-Feb-2010::17:54:06 ===
Starting...
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,inet_gethost_native_sup}
started: [{pid,<0.66.0>},{mfa,{inet_gethost_native,init,[[]]}}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,kernel_safe_sup}
started: [{pid,<0.65.0>},
{name,inet_gethost_native_sup},
{mfa,{inet_gethost_native,start_link,[]}},
{restart_type,temporary},
{shutdown,1000},
{child_type,worker}]
------------- Alice ------------
Copyright (C) 2009 Ari Lerner, Nate Murray, Michael Fairchild, CloudTeam
=ERROR REPORT==== 6-Feb-2010::17:54:06 ===
Error in process <0.64.0> on node '[email protected]' with exit value: {badarg,[{erlang,list_to_existing_atom,["rabbit@ubuntu"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}
rabbit node : [email protected]
connected : false
Your cookie is set to 'SDWRXMVHVSGVMPRLKZXJ'
Make sure your rabbitmq server's .erlang.cookie file matches
---------------------------------
Starting mochiweb_http with 9999
=INFO REPORT==== 6-Feb-2010::17:54:06 ===
Starting mochiweb
=INFO REPORT==== 6-Feb-2010::17:54:06 ===
Started mochiweb with: [9999]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {local,rest_server_sup}
started: [{pid,<0.63.0>},
{name,the_rest_server},
{mfa,{rest_server,start_link,[[]]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
supervisor: {<0.58.0>,alice_sup}
started: [{pid,<0.62.0>},
{name,rest_server_sup},
{mfa,{rest_server_sup,start_link,[[]]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 6-Feb-2010::17:54:06 ===
application: alice
started_at: '[email protected]'
Eshell V5.7.2 (abort with ^G)
([email protected])1>
=ERROR REPORT==== 6-Feb-2010::17:54:11 ===
Error in process <0.78.0> on node '[email protected]' with exit value: {badarg,[{erlang,list_to_existing_atom,["rabbit@ubuntu"]},{dist_util,recv_challenge,1},{dist_util,handshake_we_started,1}]}
=ERROR REPORT==== 6-Feb-2010::17:54:11 ===
Lost connection with rabbitmq_server. Trying to regain connection to '[email protected]'
It is also worth noting I'm not a Linux or Erlang expert, so my problem is probably quite a simple/stupid one. Is there anyway to figure out what the cookie is for the running rabbitmq server (other than the file) or a better way to set it?
I have the exact same problem, and log output as whbath. I have been working on this for a few days and haven't managed to get anywhere either. Is there anyone out there who has had any success with this? Talking to quite a few folks on IRC, I have yet to meet one that has successfully got this thing to start.
Anyone have any school to lend?
Thanks,
I did make it start at some point, but that was before, with other erlang/rabbitmq versions, so I guess it's some issue introduced with the new versions.
on centos, with rabbitmq 1.7.0 installed from rpm, I got it working by changing start.sh from erl -pa $PWD/ebin -pa $PWD/deps//ebin -name alice -s reloader -boot alice $ to erl -pa $PWD/ebin -pa $PWD/deps//ebin -sname alice -s reloader -boot alice $
basically "-name" to "-sname"
and it worked for me.
Interesting, I am also on CentOS running RabbitMQ 1.7.0 installed from RPM. I tried changing -name to -sname as you suggest, but my error remains the same.
stack trace:
jjackson@sfqload01 /data/distributed_email/alice $ ./start.sh -setcookie OCGHUQPPGINWGQKGWFCX
make[1]: Entering directory /data/distributed_email/alice/deps/mochiweb' (cd src;make all) make[2]: Entering directory
/data/distributed_email/alice/deps/mochiweb/src'
make[2]: Nothing to be done for all'. make[2]: Leaving directory
/data/distributed_email/alice/deps/mochiweb/src'
make[1]: Leaving directory `/data/distributed_email/alice/deps/mochiweb'
(cd ebin; erl -pa deps/mochiweb/ebin -pa ebin -noshell -run make_boot write_scripts alice)
write_scripts for "alice"
Writing to "alice.rel" (as alice)
Erlang (BEAM) emulator version 5.6.5 [source] [64-bit] [smp:8] [async-threads:0] [hipe] [kernel-poll:false]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.40.0>},
{name,alarm_handler},
{mfa,{alarm_handler,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,sasl_safe_sup} started: [{pid,<0.41.0>}, {name,overload}, {mfa,{overload,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,sasl_sup} started: [{pid,<0.39.0>}, {name,sasl_safe_sup}, {mfa, {supervisor,start_link, [{local,sasl_safe_sup},sasl,safe]}}, {restart_type,permanent}, {shutdown,infinity}, {child_type,supervisor}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,sasl_sup} started: [{pid,<0.42.0>}, {name,release_handler}, {mfa,{release_handler,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === application: sasl started_at: alice@sfqload01
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,os_mon_sup} started: [{pid,<0.48.0>}, {name,disksup}, {mfa,{disksup,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,os_mon_sup} started: [{pid,<0.49.0>}, {name,memsup}, {mfa,{memsup,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,os_mon_sup} started: [{pid,<0.51.0>}, {name,cpu_sup}, {mfa,{cpu_sup,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === application: os_mon started_at: alice@sfqload01
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,kernel_safe_sup} started: [{pid,<0.57.0>}, {name,timer_server}, {mfa,{timer,start_link,[]}}, {restart_type,permanent}, {shutdown,1000}, {child_type,worker}] starting alice_sup with []
=INFO REPORT==== 10-Feb-2010::19:01:31 === Logging to path: "./logs/[email protected]" =PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {<0.58.0>,alice_sup} started: [{pid,<0.59.0>}, {name,alice_log}, {mfa,{alice_log,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=INFO REPORT==== 10-Feb-2010::19:01:31 === Starting... =PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,inet_gethost_native_sup} started: [{pid,<0.65.0>},{mfa,{inet_gethost_native,init,[[]]}}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,kernel_safe_sup} started: [{pid,<0.64.0>}, {name,inet_gethost_native_sup}, {mfa,{inet_gethost_native,start_link,[]}}, {restart_type,temporary}, {shutdown,1000}, {child_type,worker}] ------------- Alice ------------ Copyright (C) 2009 Ari Lerner, Nate Murray, Michael Fairchild, CloudTeam
rabbit node : rabbit@sfqload01 connected : false Your cookie is set to 'OCGHUQPPGINWGQKGWFCX'
Make sure your rabbitmq server's .erlang.cookie file matches
Starting mochiweb_http with 9999
=INFO REPORT==== 10-Feb-2010::19:01:31 === Starting mochiweb =INFO REPORT==== 10-Feb-2010::19:01:31 === Started mochiweb with: [9999]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {local,rest_server_sup} started: [{pid,<0.62.0>}, {name,the_rest_server}, {mfa,{rest_server,start_link,[[]]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === supervisor: {<0.58.0>,alice_sup} started: [{pid,<0.61.0>}, {name,rest_server_sup}, {mfa,{rest_server_sup,start_link,[[]]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]
=PROGRESS REPORT==== 10-Feb-2010::19:01:31 === application: alice started_at: alice@sfqload01 Eshell V5.6.5 (abort with ^G) (alice@sfqload01)1> =ERROR REPORT==== 10-Feb-2010::19:01:36 === Lost connection with rabbitmq_server. Trying to regain connection to rabbit@sfqload01
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution a /usr/lib64/erlang/lib/os_mon-2.1.8/priv/bin/memsup: Erlang has closed. Erlang has closed
I have tried variations of sname and name, verified that the erlang cookie in my home matches the erlang cooking in /var/lib/rabbitmq. Tried pulling those options out of the start script and passing them in on the cli, but nothing seems to work.
Thoughts anyone?
Just a thought, but do any permissions / users / etc.. need to be set up in rabbit for this to work? Does there need to be a user "alice" or anything of the like? Trying to understand why it just loses the connection to rabbit..
Ad the user rabbitmq, in the home dir /var/lib/rabbitmq, I ran this:
/start.sh -alice rabbithost "rabbit@rust" -setcookie cat ../.erlang.cookie
where 'rust' is my short hostname. Note the -alice on the command line
bcotton:
what does you start.sh script look like? Do you have -sname or -name specified? I am still getting the same error.
My start.sh: erl -pa $PWD/ebin -pa $PWD/deps//ebin -sname alice@sfqload01 -s reloader -boot alice $
I moved the doc root for alice to /var/lib/rabbitmq/alice to mirror what you have above. I verified that the .erlang.cookie file in /var/lib/rabbitmq and in the home directory of the user are the same. I have tried running the start script as root and as a user.
I included the output as a pastie to keep our dialog shorter :-)
http://pastie.org/820620
Thanks for the help, I am sure I'm missing some mundane detail.. As always..
This issue hasn't been updated since February, it means everyone got their problem solved? ;)
More seriously though, I'd appreciate it if anyone can share their updates.
So far I'm stuck at this: rabbitmq complains when I force it to use a FQDN (using RABBITMQ_NODENAME), and Alice complains when I use a non FQDN. What am I missing?
- rabbitmqctl reports the node name to be "rabbit@amr"
- I start alice using:
./start.sh -alice rabbithost "rabbit@amr" -setcookie "<rabbitmq-erlang-cookie-here>"
P.S. Using Ubuntu 9.10, RabbitMQ 1.7.2 (their .deb package), today's HEAD of Alice
I got it working after checking the erl(1) man page, which said this about -name
:
The name of the node will be Name@Host, where Host is the fully qualified host name of the current host. For short names, use the -sname flag instead.
and about -sname
:
Makes the Erlang runtime system into a distributed node, similar to -name, but the host name portion of the node name Name@Host will be the short name, not fully qualified.
This is sometimes the only way to run distributed Erlang if the DNS (Domain Name System) is not running. There can be no communication between nodes running with the -sname flag and those running with the -name flag, as node names must be unique in distributed Erlang systems.
So it was pretty clear to me I needed -sname
. So here is what works for me:
./start.sh -sname alice -setcookie "... cookie here ..."
I believe the author already mentioned the above somewhere, though I couldn't get it right the first time, perhaps as I was trying different things at the same time.
Cheers,
for anyone else who is having trouble with this: following amr's instructions from above : I'm on jaunty jackalope on ec2 and this worked perfectly for me ./start.sh -sname alice -setcookie "cookie"
my cookie was in /var/lib/rabbitmq/.erlang.cookie
All, I had this issue for a long time as well, and the suggestion to just use -sname instead of -name is not enough for everyone. I solved it by noting that my rabbitmq was running as:
rabbitmq@HOSTNAME
whereas alice was trying to connect to:
rabbitmq@hostname
Although I didn't think it would make a difference (on Windows here for testing), it certainly does. Overriding alice by using (at the end of the start command):
-alice rabbithost rabbitmq@HOSTNAME
Or by modifying RabbitMQ to use the default lowercase hostname that is preferred when no host is provided. Hope this helps.