rabbitmq-server: PID file is not created, rc-service commands fail
I noticed that rc-service commands fail, for example:
# rc-service rabbitmq-server status * status: crashed
Apparently, rc-service depends on the PID file, but the directory
/run/rabbitmq/ is empty, there is no pid file, even though rabbitmq-server is running fine.
Interestingly, the file
/etc/init.d/rabbitmq-server properly tries to set the pid file environment variable:
pidfile=/run/rabbitmq/rabbitmq.pid ... start-stop-daemon --start \ --env RABBITMQ_PID_FILE=$pidfile \ ...
If I create the pid file as
/run/rabbitmq/rabbitmq.pid and reboot the server, the file is removed on startup.