Unable boot rabbitmq 3.9 on docker compose: failed to open log file at '/var/log/rabbitmq/rabbit@xxxxxx_upgrade.log', reason: permission denied #561
Replies: 10 comments 5 replies
-
It wants access to that upgrade.log but your bind-mounted volume doesn't allow for the The container runs as rabbitmq not root, and running docker-compose as root doesn't affect what user the container runs as. $ docker run -d --name rabbit rabbitmq:management
2e9395be4a14324b28b669918b761b68f811f7a2ce403a2003b82136e1cee360
$ docker exec -it rabbit bash
root@2e9395be4a14:/# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
rabbitmq 1 0.3 0.0 2612 1648 ? Ss 16:32 0:00 /bin/sh /opt/rabbitmq/sbin/rabbitmq-server
rabbitmq 20 55.8 7.2 1820000 148808 ? Sl 16:32 0:07 /usr/local/lib/erlang/erts-12.1.3/bin/beam.smp -W w -MBas ageffcbf -MHas ageffcbf -MBlm
rabbitmq 27 0.0 0.0 2508 524 ? Ss 16:32 0:00 erl_child_setup 1048576
rabbitmq 51 0.0 0.0 3888 92 ? S 16:32 0:00 /usr/local/lib/erlang/erts-12.1.3/bin/epmd -daemon
rabbitmq 72 0.0 0.0 3888 852 ? Ss 16:32 0:00 inet_gethost 4
rabbitmq 73 0.0 0.0 3968 1756 ? S 16:32 0:00 inet_gethost 4
root 74 1.0 0.1 5996 3700 pts/0 Ss 16:32 0:00 bash
root 87 0.0 0.1 7652 3340 pts/0 R+ 16:32 0:00 ps aux |
Beta Was this translation helpful? Give feedback.
-
I have the same problem. The container does create its directories (in my case under user@machine:~/.docker/rabbitmq$ ll -n
total 16
drwxr-xr-x 4 0 0 4096 Jan 12 15:58 ./
drwxr-xr-x 3 0 0 4096 Jan 12 15:58 ../
drwxr-xr-x 3 999 0 4096 Jan 12 15:58 data/
drwxr-xr-x 2 0 0 4096 Jan 12 15:58 log/ Both 3.8 and 3.9 fail to write to
3.9:
They also crash on different files. It does not matter if its the "normal" or Is
but it did not throw an error when I removed it. Btw: That Now I'm out of ideas. |
Beta Was this translation helpful? Give feedback.
-
@smorokin, the It looks like you are doing the same volume mount Possible solutions:
|
Beta Was this translation helpful? Give feedback.
-
@yosifkit thank you for the fast reply. Yes, I have the same setup as juanbassist. Is it possible for the entrypoint script to also change the permissions of the log folder? Or can i just remove the volume mount for log and just lose that one migration log? As far as I saw that was the only thing written to disk. |
Beta Was this translation helpful? Give feedback.
-
@yosifkit You can ignore my last reply. I have just used docker volumes.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello
|
Beta Was this translation helpful? Give feedback.
-
@mojtabajahannia No, you can put the logs anywhere. Note that if it is Linux, the first boot may fail. Tip |
Beta Was this translation helpful? Give feedback.
-
Hello, I solved this problem in this way: |
Beta Was this translation helpful? Give feedback.
-
If someone has the same problem, but the solution will not be found for a long time: take a closer look at the paths that you specified in the volume bindings. For example, my docker compose yml that caused the error looked something like this:
Downgrading to version 3.6-management-alpine helped eliminate the error, but later, when I had to go back to version 3.11-management-alpine, I found that the error was caused by an incorrect path inside the container, which is specified in the bindings. For example:
need to fix as following:
That is, remove the slash at the end of the path that leads to the RabbitMQ data inside the container. |
Beta Was this translation helpful? Give feedback.
-
Hello I am expirementing with docker compose, the update to rabbitmq 3.9 but I always get the following error regarding permission problems. If I do the same exercise in rabbitmq 3.8, it works without a problem.
Ubuntu 20.04 LTS, uname -a:
Linux server 5.4.0-89-generic # 100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 x86_64 x86_64 x86_64 GNU / Linux
Docker compose RabbitMq 3.9 - Fail
Error Logs....
I tried
Unsuccessfully.
Docker compose RabbitMq 3.8 - works Fine
regards.
Beta Was this translation helpful? Give feedback.
All reactions