RabbitMQ 3.12.3 Fails to Start Due to Incorrect erlang.cookie Permissions in Docker Environment #11856
-
Describe the bugI am running the RabbitMQ 3.12.3 Docker image in a Linux environment. The RabbitMQ image operates alongside other Docker images, one of which uses RabbitMQ as its message broker. The issue arose when the Docker containers were restarted: RabbitMQ failed to start correctly because the erlang.cookie had the wrong permissions. I do not map the erlang.cookie to any folder, nor do I pass a custom value to it, as I do not use multiple nodes. I have not been able to replicate this issue again naturally. The only way I managed to recreate it was by connecting to the Docker container through a shell, changing the permissions of /var/lib/rabbitmq/.erlang.cookie to something other than 400 (e.g., 100), and then restarting the RabbitMQ container. This forced RabbitMQ to fail because the erlang.cookie did not have the correct permissions. However, in my case, the erlang.cookie was not modified by any process, not Docker, nor any other container, and it was not mapped to a specific folder on the host machine. Restarting RabbitMQ after it failed to start due to the permission issue resolved the problem because the cookie was regenerated. However, I want to prevent this issue from occurring again. While I was able to notice and fix the issue quickly, I would prefer it not to happen in the first place. I will attach the log, rabbitmq.conf, and the list of plugins I am using at the end of this issue.
Reproduction stepsSteps to Recreate (Forceful Recreation):
Expected behavior
Additional contextRabbitmq.conf: #RABBITMQ CONFIGURATION FILE #Authentication Properties default_user = el_test log.console.formatter.single_line = on plugins: Log: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I doubt that. Without a way to reproduce this issue, the simplest explanation is that something happened in your environment to change the file permissions. In addition, please see Team RabbitMQ's community support policy. If you wish to receive free support from Team RabbitMQ, you MUST follow those guidelines. |
Beta Was this translation helpful? Give feedback.
-
This would be a catastrophically bad idea, for a piece of software to tamper with its own shared secrets. RabbitMQ 3.12 is out of community support => locking. |
Beta Was this translation helpful? Give feedback.
To answer your questions:
No, this is not possible.
Yes, this is how the Erlang VM works.