Looks like we should add this "fix". Before starting the rabbitmq service, rm -rf /var/run/rabbitmq.
Tested this in a Docker container, works fine with starting, stopping and restarting. Before that I had issues with rabbit failing to start.
See also https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92
Seems that ktd could use it too ?

Marcel
---------- Forwarded message ---------
Van: Marcel de Rooy <rooy.de.m@gmail.com>
Date: di 16 nov. 2021 om 14:11
Subject: Rabbitmq
To: koha-devel <koha-devel@lists.koha-community.org>


Hi all,

Nobody seeing things like this?

mkdir: cannot create directory ‘/var/run/rabbitmq’: Permission denied
Failed to create directory: /var/run/rabbitmq
/usr/lib/rabbitmq/bin/rabbitmq-server: 51: /usr/lib/rabbitmq/bin/rabbitmq-server: cannot create /var/run/rabbitmq/pid: Permission denied

Look in /var/log/rabbitmq. Does your rabbitmq service start when you run or restart a container?

The solution is simple (mkdir and chown), but it needs to be placed somewhere.

Marcel