[rabbitmq-discuss] Can't get rabbitMQ to restart after switching machines -- some kind of DB error...?

Alexandru Scvorţov alexandru at rabbitmq.com
Tue Dec 6 16:44:21 GMT 2011


Hi Abe,

> But since switching to the
> new machine, I haven't been able to get rabbitmq-server to start up.

The database RabbitMQ uses is bound to the machine's hostname, so if you
copied the database dir to another machine, it won't work.  If this is
the case, you have to set up a machine with the same hostname as before
and transfer any outstanding messages to the new machine.  If there's
nothing important in rabbit, you could just clear everything by removing
the RabbitMQ files in /var/lib/rabbitmq.

>   /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.2/sbin/../ebin/rabbit.app

1.7.2 is a *very* old version of the broker.  You should really upgrade,
as a lot of new features and a lot of bugfixes have gone in since then.

> {"init terminating in do_boot", {{nocatch, {error,{cannot_start_application,
> rabbit, {bad_return, {{rabbit,start,[normal,[]]},{'EXIT',
> {{case_clause,{error,{timeout_waiting_for_tables, [rabbit_user,
> rabbit_user_permission, rabbit_vhost, rabbit_config, rabbit_listener,
> rabbit_durable_route, rabbit_route, rabbit_reverse_route,
> rabbit_durable_exchange, rabbit_exchange, rabbit_durable_queue,
> rabbit_queue]}}}, [{rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
> {rabbit,run_boot_step,1}, {rabbit,'-start/2-lc$^0/1-0-',1}, {rabbit,start,2},
> {application_master, start_it_old,4}]}}}}}}}, [{init,start_it,1},
> {init,start_em,1}]}}

So, it's timing out waiting for the distributed tables.  I suspect this
is because of the hostname change.  If you had a cluster set up before,
that may also cause this to happen.

> There's also an erlang daemon process running in the background.  I'm not sure
> if this is important or not.
> 
> $ ps aux | grep rabbit
> rabbitmq   714  0.0  0.0   1980   412 ?        S    Dec04   0:01
> /usr/lib/erlang/erts-5.7.4/bin/epmd -daemon

That's perfectly normal.  It starts up with RabbitMQ (and a few other
Erlang apps) and remains running even after they stop.  You can kill it
if you really want to and RabbitMQ isn't running.

Hope this helps.

Cheers,
Alex

On Tue, Dec 06, 2011 at 03:34:32PM +0000, Abe wrote:
> I'm running a django/celery app on EC2, with rabbitmq as the broker. The machine
> I was using failed, so I fired up another instance. But since switching to the
> new machine, I haven't been able to get rabbitmq-server to start up.
> 
> Here's the output:
> 
> 
> $ sudo rabbitmq-server start
> [Rabbit logo and info...]
> 
> AMQP 8-0
> Copyright (C) 2007-2010 LShift Ltd., Cohesive Financial Technologies LLC., and
> Rabbit Technologies Ltd.
> Licensed under the MPL.  See http://www.rabbitmq.com/
> 
> node          : rabbit at ip-10-212-66-181
> app descriptor:
>   /usr/lib/rabbitmq/lib/rabbitmq_server-1.7.2/sbin/../ebin/rabbit.app
> home dir      : /var/lib/rabbitmq
> cookie hash   : 5+uQ077En5bpvle3HJCQMg==
> log           : /var/log/rabbitmq/rabbit.log
> sasl log      : /var/log/rabbitmq/rabbit-sasl.log
> database dir  : /var/lib/rabbitmq/mnesia/rabbit
> 
> starting internal event notification system                           ...done
> starting logging server                                               ...done
> starting database                                                     ...Erlang
> has closed
> {"init terminating in do_boot", {{nocatch, {error,{cannot_start_application,
> rabbit, {bad_return, {{rabbit,start,[normal,[]]},{'EXIT',
> {{case_clause,{error,{timeout_waiting_for_tables, [rabbit_user,
> rabbit_user_permission, rabbit_vhost, rabbit_config, rabbit_listener,
> rabbit_durable_route, rabbit_route, rabbit_reverse_route,
> rabbit_durable_exchange, rabbit_exchange, rabbit_durable_queue,
> rabbit_queue]}}}, [{rabbit,'-run_boot_step/1-lc$^1/1-1-',1},
> {rabbit,run_boot_step,1}, {rabbit,'-start/2-lc$^0/1-0-',1}, {rabbit,start,2},
> {application_master, start_it_old,4}]}}}}}}}, [{init,start_it,1},
> {init,start_em,1}]}}
> 
> Crash dump was written to: erl_crash.dump
> init terminating in do_boot ()
> 
> 
> 
> 
> 
> There's also an erlang daemon process running in the background.  I'm not sure
> if this is important or not.
> 
> $ ps aux | grep rabbit
> rabbitmq   714  0.0  0.0   1980   412 ?        S    Dec04   0:01
> /usr/lib/erlang/erts-5.7.4/bin/epmd -daemon
> 
> Any ideas on how to further diagnose/solve this problem?
> 
> 
> Thanks in advance!
> - Abe
> 
> 
> PS: I posted this question to serverfault before realizing that this might be a
> better place to ask it:http://serverfault.com/questions/337982/
> 
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list