TL;DR Replace your init script with this one. It uses sudo to change to the RabbitMQ user before starting, stopping, and checking the status.
Here's a link that corroborates what I found: http://www.mentby.com/Group/rabbitmq-discuss/issues-on-rhel-62-with-rabbitmq-282.html
We're doing an upgrade of RabbitMQ here at Weebly. Moving from a CentOS 5 single node to CentOS 6 with DRBD and Pacemaker. Going from RabbitMQ 2.old-and-busted to 2.8.new-hotness. How hard could it be? Well a few things.
Here's an example of output you'll get with the bad (stock) RabbitMQ init script:
root@rabbit1-a:~# rabbitmq rabbitmqctl status
Status of node rabbit@localhost ...
Error: unable to connect to node rabbit@localhost: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit@localhost]
hosts, their running nodes and ports:
- localhost: [{rabbitmqctl8732,17442}]
current node details:
- node name: 'rabbitmqctl8732@rabbit1-a'
- home dir: /var/lib/rabbitmq
- cookie hash: somethingsomething
root@rabbit1-a:~# echo $?
0
See that exit code of 0? It should be 2. If you do the same thing with sudo -u rabbitmq, it will show an exit code of 2 (which is what you need). That's how I fixed the init script.
Here's a link that corroborates what I found: http://www.mentby.com/Group/rabbitmq-discuss/issues-on-rhel-62-with-rabbitmq-282.html
We're doing an upgrade of RabbitMQ here at Weebly. Moving from a CentOS 5 single node to CentOS 6 with DRBD and Pacemaker. Going from RabbitMQ 2.old-and-busted to 2.8.new-hotness. How hard could it be? Well a few things.
- RHEL kinda sorta dropped support for Pacemaker clusters. There's some licensing/you gotta pay for it stuff, going on but I didn't bother reading the whole thing. Luckily, CentOS has the binaries so you're good. One thing to keep in mind is that the cluster-glue libs which RHEL builds are severely hamstrung. In short, change use_logd to no in your corosync file. Otherwise none of the resources will start.
- The old STONITH agents for Pacemaker are gone in RHEL6. Now you gotta use the fence-agents package and change up your definitions.
- Serial lines for heartbeat are gone. :(
- DRBD still isn't in the RHEL kernel, so if you want something recent you still have to build your own.
- RabbitMQ's init script doesn't work on RHEL/CentOS 6 with sssd enabled. If you run with LDAP, you should be using sssd, so keep that in mind. Use this init script that I threw together, and you're good. Alternatively, you could use daemontools, but I found that RabbitMQ doesn't like responding to UNIX signals properly. I know it's not an Erlang thing since we ran tons of Erlang apps out of daemontools at Mochi Media. Appreciate it if someone could point out what's going on there.
Here's an example of output you'll get with the bad (stock) RabbitMQ init script:
root@rabbit1-a:~# rabbitmq rabbitmqctl status
Status of node rabbit@localhost ...
Error: unable to connect to node rabbit@localhost: nodedown
DIAGNOSTICS
===========
nodes in question: [rabbit@localhost]
hosts, their running nodes and ports:
- localhost: [{rabbitmqctl8732,17442}]
current node details:
- node name: 'rabbitmqctl8732@rabbit1-a'
- home dir: /var/lib/rabbitmq
- cookie hash: somethingsomething
root@rabbit1-a:~# echo $?
0
See that exit code of 0? It should be 2. If you do the same thing with sudo -u rabbitmq, it will show an exit code of 2 (which is what you need). That's how I fixed the init script.

RSS Feed