[rabbitmq-discuss] Weird ansible-playbook behaviour when trying to start rabbitmq-server 2.8.2

Simon MacMullen simon at rabbitmq.com
Wed May 16 13:27:54 BST 2012

On 16/05/12 12:58, Cosmin Luță wrote:
> Hello,
> Please allow me to cross reference this thread
> <https://groups.google.com/forum/#%21topic/ansible-project/9XKZoqsshE0>
> ; I'm trying to install and start rabbitmq-server 2.8.2 (installed from
> a Debian package) using ansible (a tool that connects to remote machines
> using SSH and can performs various administrative tasks).
> Does anyone have an idea what has changed in the initialization scripts
> of rabbitmq since version 2.7.1 upwards that could cause the mentioned
> behaviour?

We changed a couple of things in the init script, mainly using 
start-stop-daemon instead of su to change the user, and using lsb-base 
functions instead of echo.

I can't reproduce what Michael DeHaan says over in the other thread:

> Ok, so the rabbitmq script sounds like it cares very much about the
> current directory, and when the current directory is gone, it blows
> up.   Please take this up with whoever maintains the distro init
> script, because it's doing stupid things
> and it should not care anything about the directory you first ran
> /sbin/service in.

I tried this from a deleted directory:

$ sudo service rabbitmq-server stop
sudo: cannot get working directory
sh: getcwd() failed: No such file or directory
  * Stopping message broker rabbitmq-server            [ OK ]

$ sudo service rabbitmq-server start
sudo: cannot get working directory
sh: getcwd() failed: No such file or directory
  * Starting message broker rabbitmq-server            [ OK ]

...and it worked fine. So I am not sure what's up here. If we are doing 
stupid things I would like to fix them, but I'm not sure we are.

Cheers, Simon

Simon MacMullen
RabbitMQ, VMware

More information about the rabbitmq-discuss mailing list