-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Mosquitto hanging on startup in docker image when log_dest = stdout #2338
Comments
Hi Alex, Thanks for the report. I've just tested this out and it works for me. I'll list what details I can think of below so you can compare to what you're doing and say where there is a difference. I'm on Linux 64-bit, running docker 19.03.13. My config file is at conf/mosquitto.conf and looks exactly like yours:
I ran an instance like this:
|
Thanks for looking into this. I spent best part of the day yesterday looking into my whole setup and can confirm everything works fine end-to-end. I added extra logging via callbacks on both publisher and subscriber to check each step was occurring as expected. What I found was the broker was dropping connections to both after some seconds. Without the extra logging on the publisher and subscriber I wouldn't have noticed. So improving the session management on each I am able to maintain a stable connection over n time. What I was missing though was (via stdout) the broker logging the the session disconnect messages, or any logging at all after the initial Will try your command for starting to see if I get more info via the stdout... |
Might be related to #2354? |
I am getting the same issue this is my mosquitto.conf
I get this output when I run
If I use the docker-compose.yml
I get this
|
I am running the latest eclipse-mosquitto docker image (currently 2.0.12) on a raspberry pi 4 with 'Raspian GNU /Linux 10 (buster)'.
I find that when I mount a config file that specifies
log_dest
to file:log_dest file /mosquitto/log/mosquitto.log
... the broker starts up straight away, accepts connections, receives and forwards messages etc.
However, when I mount the same config file but with
log_dest
to stdout:log_dest stdout
... the broker startup hangs on
<timestamp>: mosquitto version 2.0.12 starting
and doesn't progress any further, accepts no connections etc.I believe this very much related to the issue reported in this ticket: #773, but that seems to have been closed early before resolution.
I'm not sure what else to be looking at to investigate further, so please advise next steps to look into this.
My preference would be to not persist logs inside the docker container but have an external service collect them through the docker interface, hence wanting the stdout option.
The complete config file I am using:
The text was updated successfully, but these errors were encountered: