[rabbitmq-discuss] Stopping rabbitmq-server: FAILED

Matthias Radestock matthias at rabbitmq.com
Mon Mar 17 08:09:41 GMT 2014


Punit,

On 06/03/14 13:59, Jain, Punit wrote:
> In this case “service rabbitmq-server stop” failed with the exit status
> 2, but, in actual, rabbitmq-server was stopped fine. I verified it by
> checking processes and the broker’s status.

What's happening here is that the server gets told to stop - which it 
evidently does - but because 'rabbitmqctl stop' (which is that 'service 
rabbitmq-server stop' invokes) cannot read the pid file it is unable to 
figure out when the server process has actually terminated.

> Could you please explain the meaning of the return code ‘2’?  [...]
> Also, is there any other return code we should check? It would be best
> if we could know all the possible return code and their meaning.

2 is returned for all errors except those that indicate incorrect usage 
of rabbitmqctl (e.g. invalid command or arguments), in which case 1 is 
returned.

Matthias.


More information about the rabbitmq-discuss mailing list