[rabbitmq-discuss] RabbitMQ - 3.0.0 multi node with detach command
simon at rabbitmq.com
Thu Dec 6 10:38:05 GMT 2012
On 06/12/12 10:05, PONMUTHU M wrote:
> i read in website, detached key can used to start multiple nodes in same
> machine after load the new environment (node & port)
> but when i use that am getting the following error
> [root at RMQ-NIV-T2 ~]# RABBITMQ_NODE_PORT=5676
> RABBITMQ_NODENAME=rabbit_b at RMQ-NIV-T2
> /usr/sbin/rabbitmq-server -detached
> Warning: PID file not written; -detached was passed.
That's a warning, not an error. It's just telling you that we don't
write a PID file when -detached is passed, since we're unable to
determine the PID early enough to make it useful.
> if i use " rabbitmq-server & "(after load new node & port) instead of
> detached , new node getting started .
> now my question is .
> what is the difference between detached & start the rabbitmq service in
> different environment.
"-detached" tells Erlang to fork the process.
"&" tells the shell to fork the process.
> if both are same . which types is recommended to follow in server level
The only difference is that you get a PID file with "&", which then lets
you use "rabbitmqctl wait" to make sure you know when the server has
finished starting. That's what the init.s scripts for our .deb and RPM
Of course, I would recommend that you use those packages rather than
sorting this out yourself, if you possibly can.
More information about the rabbitmq-discuss