Bug 869415 - init script does not work as rabbitmqctl status returns 0 for a nodedown
Summary: init script does not work as rabbitmqctl status returns 0 for a nodedown
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rabbitmq-server
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Lemenkov
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-23 19:59 UTC by Julian C. Dunn
Modified: 2014-11-17 10:31 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-11-17 10:31:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Julian C. Dunn 2012-10-23 19:59:15 UTC
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):

2.6.1-1.el6

How reproducible:

Always

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

Does not start with:

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


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
     else

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
diagnostics:
- 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 $?
0


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 10:31:42 UTC
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.