[rabbitmq-discuss] rabbitmq-plugins not working as root user
tim at rabbitmq.com
Fri Dec 21 10:37:23 GMT 2012
I haven't been able to reproduce into this problem yet. Did you have a previous version installed on this machine?
On 20 Dec 2012, at 16:49, Tommy Odom wrote:
> Hi all,
> Just installed rabbitmq-server on Ubuntu 12.04 using the latest 3.0.1 package and I am running into a problem running the rabbitmq-plugins list/enable commands. I have 3.0.0 installed on a separate server as well and it seems to be working correctly for me.
> When I run "sudo rabbitmq-plugins list" I get an error "Failed to create cookie file". I looked at the /usr/sbin/rabbitmq-plugins script and I see that it has some logic for determining when to su over to the rabbitmq user so I tried explicitly running "sudo su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmq-plugins list" and that worked correctly. The rabbitmq-server is running and the /var/lib/rabbitmq directory is owned by rabbitmq user and does have a .erlang.cookie file present.
> However, when I try to run rabbitmq-plugins as the rabbitmq user to enable a plugin I get an error that it can't write the /etc/rabbitmq/enabled_plugins file because the /etc/rabbitmq directory is owned by root.
Yeah you should be running just with sudo and nothing else should be necessary. Did you customise any environment setup post-install?
> I verified that on my 3.0.0 server I am able to run "sudo /usr/lib/rabbitmq/bin/rabbitmq-plugins list" directly w/o the su to the rabbitmq user.
> Any ideas?
I'll try a clean install on 12.04 and see if I can reproduce the problem.
More information about the rabbitmq-discuss