FS#46908 - [rabbitmq] missing a configuration option to work correctly

Attached to Project: Community Packages
Opened by vnoel (kaouete) - Thursday, 29 October 2015, 09:32 GMT
Last edited by Levente Polyak (anthraxx) - Tuesday, 12 September 2017, 10:35 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,

Apparently, rabbitmq needs to have an explicit home directory specified so that it can correctly use the erlang cookie used for authentication defined in /var/lib/rabbitmq.

We just need to add the following line to /etc/rabbitmq/rabbitmq-env.conf:
HOME=/var/lib/rabbitmq

See https://bbs.archlinux.org/viewtopic.php?id=191587 also for someone else with the same problem and solution.
This task depends upon

Closed by  Levente Polyak (anthraxx)
Tuesday, 12 September 2017, 10:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  3.6.12-1
Comment by Levente Polyak (anthraxx) - Tuesday, 17 November 2015, 18:23 GMT
hm that should be obsolete since the new way to create the rabbitmq user.

I have the feeling you do not have the new rabbitmq user setup, can you give me the output of:

# getent passwd rabbitmq
Comment by vnoel (kaouete) - Wednesday, 18 November 2015, 08:48 GMT
Hi, that's what I get:

[vnoel@jamon ~]$ getent passwd rabbitmq
rabbitmq:x:197:197:RabbitMQ user:/var/lib/rabbitmq:/bin/bash

So I guess it has the right home directory… and of course the daemon is running as the rabbitmq user…

I think I know where the problem is: it is rabbitmqctl that has a problem and not the server.
If HOME is not set in the rabbitmq-env.conf, rabbitmqctl use a different erlang cookie… I'm not sure why because I use the same file for root and the rabbitmq user and I'm running rabbitmqctl as root.
Comment by Levente Polyak (anthraxx) - Wednesday, 18 November 2015, 15:08 GMT
doing thus as root is considered harmful as you may end up with files owned by root in the /var/lib/rabbitmq directory that will be unaccessible/unwritable.

please try using rabbitmqctl via:

sudo -u rabbitmq rabbitmqctl status

I may think a bit and maybe include some changes to the rabbitmqctl script to switch automatically to the rabbitmq user if executed with uid=0.
Also adding HOME to the env.conf is bad and shouldn't be needed if it is properly executed. I may add a cd to the home-dir of rabbitmq user to the rabbitmqctl script file to properly handle this.
Comment by Eli Schwartz (eschwartz) - Friday, 08 September 2017, 19:18 GMT
Is this a bug or user error, and if the former is it still an issue?

Loading...