[rabbitmq-discuss] Gracefully shutting down rabbitmq

Ben Hood 0x6e6562 at gmail.com
Tue Sep 2 07:02:41 BST 2008


Aman,

On Mon, Sep 1, 2008 at 10:44 PM, Aman Gupta <rabbitmq at tmm1.net> wrote:
> The error was being thrown by the original rabbitmq daemon, not the
> controller erlang process. The controller process exited cleanly.. the
> rabbitmq daemon received the halt signal and then proceeded to throw that
> duplicate name error.

Yes, it's really strange that it initiates the shutdown procedure,
gets through it sucessfully (the Rabbit application does actually
stop) and then it barfs.

To try to reproduce this I ran a second Erlang shell with the same
name as the shutdown controller, i.e.

$ erl -sname rabbitmq_controller

and then tried to shutdown:

$ erl -sname rabbitmq_controller -noinput -s rabbit_control -extra -n
rabbit stop

which results in the "Protocol: ~p: register error: ~p~n" that was
orginally reported, but this in the VM that is running the shutdown
command, not in the broker itself.

Also, having TCP connections open to the broker when you send the
shutdown command is handled as well, so having a few clients connected
during shutdown doesn't provoke the problem for me.

Ben




More information about the rabbitmq-discuss mailing list