DIQ'S DEN - WWW.COUYON.NET
  • Home
  • Blog
  • Photos

So you want to run RabbitMQ on RHEL/CentOS 6 ?

7/13/2012

 
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.

  • 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.
Yay computers or something.

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.
Cristian
11/12/2012 05:34:49 pm

Hi,

Thanks very much for this post !

We have also found that sssd causes the su command to return the wrong exit status. We were looking for a fix/workaround and we found this article :)

Do you by any chance know if the sssd people have fixed this issue yet ?

diq link
11/13/2012 02:11:18 am

Cristian, glad you enjoyed the post. No I haven't found a fix for it yet. I think that I once looked and that it was in the sssd bug database, but it's been so long that I forgot. Maybe I will poke around again this afternoon and see if they have it.

Cristian
11/13/2012 04:38:54 pm

We have tested sssd version 1.9.2 ( from here - http://repos.fedorapeople.org/repos/jhrozek/sssd/epel-6/x86_64/ ) which doesn't have this issue any more. So it seems they have fixed it at some point. Hoping RedHat release an official update for us to use soon.

Soichi Hayashi
11/13/2012 05:19:35 am

Hi. Thank you for posting the modified init script. I was having problem starting rabbitmq on RHEL6 and now I can thanks to your script. Have you reported this issue to RabbitMQ maintainer?

diqster link
11/13/2012 05:56:55 am

The problem isn't with RabbitMQ. The problem is with Fedora's sssd software. Not much the RabbitMQ guys should do.

Doug
11/17/2012 10:55:32 am

Worked for me, thanks!

Tommy
12/18/2012 05:14:28 pm

I have a trouble...
I stopped a rabbitmq service, killed epmd, replaced my init script and started service again, but it still starting. Nothing in rabbitmq logs, in secure log I found:
Dec 19 10:03:37 zmonbm101 sudo: root : TTY=pts/1 ; PWD=/usr/sbin ; USER=rabbitmq ; COMMAND=/usr/sbin/rabbitmqctl -n rabbit@localhost status
Dec 19 10:03:37 zmonbm101 runuser: pam_unix(runuser:session): session opened for user rabbitmq by (uid=0)
Dec 19 10:03:37 zmonbm101 sudo: root : TTY=pts/1 ; PWD=/usr/sbin ; USER=rabbitmq ; COMMAND=/usr/sbin/rabbitmqctl wait /var/run/rabbitmq/pid
Dec 19 10:03:37 zmonbm101 runuser: pam_unix(runuser:session): session closed for user rabbitmq

Could you help me, please?
Regards,
Tommy

Tommy
1/8/2013 09:42:09 am

I resolved my problem. I read a documentation of rabbotmq and found that there are thresholds configured for memory and disk space. The problem was too small /var partition. Resized it and it work good.


Comments are closed.

    Author

    A NOLA native just trying to get by. I live in San Francisco and work as a digital plumber for the joint that runs this thing. (Square/Weebly) Thoughts are mine, not my company's.

    Picture
    Moi

    Archives

    May 2021
    April 2021
    March 2021
    February 2021
    December 2019
    April 2019
    July 2018
    February 2018
    January 2017
    August 2016
    May 2016
    June 2015
    May 2015
    December 2014
    July 2014
    March 2014
    December 2013
    November 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    October 2012
    July 2012
    June 2012
    April 2012
    March 2012
    February 2012
    November 2011
    September 2011
    August 2011
    June 2011
    May 2011

    Categories

    All
    Cajun
    Computers And Internet
    Cooking
    Creole
    Food
    Gumbo
    Nola
    Recipe
    Sf

    RSS Feed

Proudly powered by Weebly
  • Home
  • Blog
  • Photos