Reputation: 79
I am new to docker and I'm working with a container, which was working fine. I stopped it to test something and now I can't start it again and it keeps restarting because apparently there are 2 configuration files. Is there a method to enter the Container (i. e. docker exec -it <containerID> bash
) to fix this problem?
when I start the container:
docker start mosquitto
returns
mosquitto
then
docker exec -it mosquitto bash
returns
Error response from daemon: Container 5cd7191016f772729776779551e08719701700ad0dd135d87633a17351ab9208 is restarting, wait until the container is running
and docker logs
docker logs mosquitto
returns
1668704116: Loading config file /etc/mosquitto/conf.d/mosquitto.conf
1668704116: Error: Duplicate pid_file value in configuration.
1668704116: Error found at /etc/mosquitto/conf.d/mosquitto.conf:7.
1668704116: Error found at /etc/mosquitto/mosquitto.conf:13.
Thanks in advance :)
Upvotes: 1
Views: 573
Reputation: 59628
The short version here is, delete line 7 of the file you have mounted on /etc/mosquitto/conf.d/mosquitto.conf
You can only specific the pid_file
once and the default config file has already defined it (on line 13 of the /etc/mosquitto/mosquitto.conf
file)
Upvotes: 1