Bug 869415 - init script does not work as rabbitmqctl status returns 0 for a nodedown
init script does not work as rabbitmqctl status returns 0 for a nodedown
Product: Fedora EPEL
Classification: Fedora
Component: rabbitmq-server (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Lemenkov
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-10-23 15:59 EDT by Julian C. Dunn
Modified: 2014-11-17 05:31 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-11-17 05:31:42 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Julian C. Dunn 2012-10-23 15:59:15 EDT
Description of problem:

The init script that comes with rabbitmq-server does not work properly to start RabbitMQ.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Install rabbitmq-server.
2. Try to start it.
Actual results:

Does not start with:

[root@foo ec2-user]$ /etc/init.d/rabbitmq-server start
Starting rabbitmq-server: RabbitMQ is currently running

Expected results:

Can start rabbitmq normally.

Additional info:

The problem is that the init script contains a fragment like:

     status_rabbitmq quiet
     if [ $RETVAL = 0 ] ; then
         echo RabbitMQ is currently running

The status_rabbitmq function calls "rabbitmqctl status", which returns 0 even if there is no node running:

[root@foo rabbitmq]$ /etc/init.d/rabbitmq-server start
Starting rabbitmq-server: Status of node rabbit@chef1 ...
Error: unable to connect to node rabbit@foo: nodedown
- nodes and their ports on chef1: [{rabbitmqctl10423,50219}]
- current node: rabbitmqctl10423@foo
- current node home dir: /var/lib/rabbitmq
- current node cookie hash: emi4ETUoBL1ALyHizJ1BIg==
[root@foo rabbitmq]$ echo $?

So a non-zero return value of "rabbitmqctl status" is not a good canonical test for whether RabbitMQ is actually running.
Comment 1 Peter Lemenkov 2014-11-17 05:31:42 EST
Erlang was abandonded in EPEL6 and removed along with all dependent packages.

Note You need to log in before you can comment on or make changes to this bug.