[rabbitmq-discuss] Bug(?) in stopping multiple instances of rabbitmq-server
Terry Jones
terry at jon.es
Wed Oct 22 00:59:29 BST 2008
The following is run in the scripts directory of the rabbitmq-server-1.4.0
distribution. I'm using Ubuntu Hardy latest & greatest.
First I start and stop rabbitmq manually:
# ./rabbitmq-multi start_all 1
[snip]
# ps aux | grep rabbitmq | grep -v grep
root 24785 0.0 0.0 3944 592 ? Ss 01:41 0:00 /bin/sh ./rabbitmq-server -noinput
# ./rabbitmq-multi stop_all
[snip]
That's all fine. I can also start it specifying a port via NODE_PORT=22222
on the command line. That starts fine and I can telnet localhost 22222 and
get connected. I can then stop it via *either*
NODE_PORT=22222 ./rabbitmq-multi stop_all
or
./rabbitmq-multi stop_all
I'm not sure how it knows how to stop itself when I don't tell it the port
number. That's presumably logged somewhere. It may be related to this:
# ./rabbitmq-multi start_all 1
Starting all nodes...
[snip]
# NODENAME=fred NODE_PORT=30000 ./rabbitmq-multi start_all 1
Starting all nodes...
[snip]
I now have 2 instances of rabbitmq-server running (verified by ps and
telnet). I stop one:
# NODENAME=fred NODE_PORT=30000 ./rabbitmq-multi stop_all
Stopping all nodes...
[snip]
So far so good. There's just one rabbitmq-server running, I can telnet to
it on 5672, but I can no longer stop it:
# ./rabbitmq-multi stop_all
Stopping all nodes...
rabbit_multi action stop_all failed:
no_nodes_running
Even though ps shows the process is still there. I have to kill it manually.
Terry
More information about the rabbitmq-discuss
mailing list