[rabbitmq-discuss] rabbitmq beginner, cannot start rabbitmq/cannot get status

Matt Long mlong at crocodoc.com
Thu Oct 14 21:33:03 BST 2010


Hello,

I've just started using rabbitmq. I've run into trouble trying to use
rabbitmq-server on an Ubuntu 10.04 EC2 EBS instance (ami-6006f309). When I
first installed rabbitmq (sudo apt-get install rabbitmq-server), it was
working just fine and also worked fine after stopping/starting my EC2
instance. However, now after I reboot the EC2 instance and ssh back in, I
get this when trying to check the status (the first command I issue):

$ sudo rabbitmqctl status
Status of node 'rabbit at ip-10-100-100-200' ...
Error: unable to connect to node 'rabbit at ip-10-100-100-200': nodedown
diagnostics:
- unable to connect to epmd on ip-10-100-100-200: address
- current node: 'rabbitmqctl812 at ip-10-100-100-200'
- current node home dir: /var/lib/rabbitmq
- current node cookie hash: X5WdGfO9GimAgcVGJx/dSQ==

So then I try to manually start it:

$ sudo rabbitmq-server
{error_logger,{{2010,10,14},{19,54,3}},"Protocol: ~p: register error:
~p~n",["inet_tcp",{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{net_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{net_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p_do_apply,3}]}]}
{error_logger,{{2010,10,14},{19,54,3}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,<0.22.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.10.0>]},{messages,[]},{links,[#Port<0.119>,<0.19.0>]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,377},{stack_size,24},{reductions,495}],[]]}
{error_logger,{{2010,10,14},{19,54,3}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[rabbit,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2010,10,14},{19,54,3}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2010,10,14},{19,54,3}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid
terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}

Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller)
({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})

>From googling around I determined that that error means rabbitmq is already
running, which makes sense since it should have started via /etc/init.d. So
I kill the running processes and then try to start it again and it appears
to startup fine:

$ ps ax | grep beam
  530 ?        Sl     0:00 /usr/lib/erlang/erts-5.7.4/bin/beam.smp -- -root
/usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa
/usr/lib/rabbitmq/lib/rabbitmq_server-1.7.2/sbin/../ebin -noshell -noinput
-hidden -sname rabbitmq_multi530 -s rabbit_multi -extra start_all 1
  661 ?        Ssl    0:00 /usr/lib/erlang/erts-5.7.4/bin/beam.smp -W w -K
true -A30 -- -root /usr/lib/erlang -progname erl -- -home /var/lib/rabbitmq
-- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.2/sbin/../ebin -noshell
-noinput -s rabbit -sname rabbit -boot start_sasl -kernel
inet_default_listen_options [{nodelay,true}] -kernel
inet_default_connect_options [{nodelay,true}] -sasl errlog_type error
-kernel error_logger {file,"/var/log/rabbitmq/rabbit.log"} -sasl
sasl_error_logger {file,"/var/log/rabbitmq/rabbit-sasl.log"} -os_mon
start_cpu_sup true -os_mon start_disksup false -os_mon start_memsup false
-mnesia dir "/var/lib/rabbitmq/mnesia/rabbit" -noshell -noinput
  972 pts/0    R+     0:00 grep --color=auto beam
$ sudo kill 530
kill: No such process
$ sudo kill 661
$ sudo rabbitmq-server
*<standard rabbitmq logo and other info>*
node          : rabbit at ip-10-100-100-200
app descriptor:
/usr/lib/rabbitmq/lib/rabbitmq_server-1.7.2/sbin/../ebin/rabbit.app
home dir      : /var/lib/rabbitmq
cookie hash   : X5WdGfO9GimAgcVGJx/dSQ==
log           : /var/log/rabbitmq/rabbit.log
sasl log      : /var/log/rabbitmq/rabbit-sasl.log
database dir  : /var/lib/rabbitmq/mnesia/rabbit
*<alot of "starting" lines; each of which has "...done" at the end>*
broker running

Then in another SSH terminal I try to check the status and get the same
error as my first attempt to check the status. So I again made no rabbitmq
(i.e. beam) processes were running and tried to start rabbitmq via
/etc/init.d/rabbitmq-server:

$ sudo /etc/init.d/rabbitmq-server start
Starting rabbitmq-server:
*<indefinite hang, had to Ctrl-C,Ctrl-C>*

I tried several other things like deleting all contents of /var/lib/rabbitmq
and that starting again; all to no avail. Can someone help? I'm hoping this
is fairly easy to reproduce as I did a very straightforward setup from the
official Ubuntu us-east ebs ami (ami-6006f309). Note that I've changed the
hostname (ip-10-100-100-200) in everything I've pasted above from it's
original (but similar) value for privacy.

Also, at some point in my testing i got the following in startup_err, but I
can't remember what the steps were that led to getting that error message:

$ cat /var/log/rabbitma/startup_err
Error: cannot_get_pid


Many thanks in advance for any help!

-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20101014/d9bfd9d6/attachment-0001.htm>


More information about the rabbitmq-discuss mailing list