eclipse / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
8.97k stars 2.38k forks source link

Container running but no message in terminal // config file error ? #2387

Open Knaoser opened 2 years ago

Knaoser commented 2 years ago

Hello,

Whenever i'm mounting my config file into the container, the container is running but there is no message displaying in terminal like :

1637225920: mosquitto version 2.0.14 running

And when i'm trying to communicate with it with inputs like :

docker container exec mosquitto mosquitto_pub

I receive nothing in terminal.

It is strange since Docker Desktop shows me that the container is running without problems... Everything works fine excepts for when I'm trying to mount the config file, here is what is written inside the file :

allow_anonymous true listener 1883 persistence true persistence_location /mosquitto/data/ log_dest file /mosquitto/log/mosquitto.log

And here is the command used to start the container :

docker run -it --network=iot -p 1883:1883 -p 9001:9001 -v C:/mosquitto/config/mosquitto.conf:/mosquitto/config/mosquitto.conf --name mosquitto eclipse-mosquitto Am I missing something ? By the way, the path used is the right one...

Been struggling for 2 days since the terminal does not show me anything and docker shows me that everything is working fine. I will try with another version of mosquitto (which is the only thing I didn't do since I assumed this one is working fine, but maybe something is off with my configuration ?)

bug

Knaoser commented 2 years ago

Found what the issue was, I just had to open up another terminal and run

docker container exec mosquitto mosquitto -v

but now I have another error, the config file doesn't seem to work, I will work further on this and will go back to 1.6.14 if I can't make it work out