-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with docker container - Unable to open config file /mosquitto/config/mosquitto.conf #620
Comments
Hi, not sure if this will help you, but I recently made a docker setup for the Paho Java client, you can check out my docker file and config here: https://github.com/eclipse/paho.mqtt.java/tree/master/test/tls-testing. The command I used to run it was:
Obviously, my setup and use case is slightly different to yours, but hopefuly it should help you get your image to read the config file. |
Does the file "/mosquitto/config/mosquitto.conf" exists ? |
Nope still error is there |
I encountered this error as well, I run Docker for Windows. What I did was change owner of the "/mosquitto" directory to root, then I can mount the config file, not sure why though. |
It's been a while since there was any activity on this issue, and the docker image has changed substantially since then, so I'm going to close it. If you're still having problems, please reopen the issue and provide details. |
I still have this problem when mounting an external /mosquitto/config volume... Inside the container, I set the owner of the whole files/folders to mosquitto:mosquitto with RW access. |
I managed to do the following: mounting a transfer folder and copied the original mosquitto.conf to the external volume. Also I checked the ownership. To make everything work I did the following:
This seem to have fixed the issue. Suggestion:
I installed the docker container/image in a QNAP NAS TS-653B. Not sure if the permission issue is QNAP specific... Thanks! |
I'm still having this problem on latest. |
Ah, we're not supposed to include the /mosquitto/config line if we don't already have a configuration file ready to go. That wasn't clear from the instructions. However, the image should check if the mosquitto.conf file exists before trying to import it; if it doesn't exist, it should create a default one. As it is, one has to remove the /mosquitto/config volume mounting on the first run, and then put it in every other run. |
Hi Guys,
having issue with running the docker container, can someone please guide on the below errors?
Any help is appreciated..
This is the command below.
docker run -d --name mqtt-broker --restart always -p 1883:1883 -p 9001:9001 -v /mosquitto/:/mosquitto eclipse-mosquitto
The text was updated successfully, but these errors were encountered: