Skip to content
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

Losing connection to mqtt broker #212

Closed
Kolbi opened this issue Nov 13, 2024 · 7 comments
Closed

Losing connection to mqtt broker #212

Kolbi opened this issue Nov 13, 2024 · 7 comments

Comments

@Kolbi
Copy link
Contributor

Kolbi commented Nov 13, 2024

Describe the bug
Sometimes after a time (very often between 10-11am) the deye-mqtt docker container looses the connection to the mqtt broker. After restarting the deye-mqtt container everything works again.

Expected behavior
After a disconnect from the mqtt broker a new connection should be tried to establish. Sadly I can't find something interesting in the logs...

@kbialek
Copy link
Owner

kbialek commented Nov 14, 2024

You need to enable DEBUG logs to get more info. Maybe you will catch the cause this way.

@Kolbi
Copy link
Contributor Author

Kolbi commented Nov 20, 2024

Thanks, last data at around 10:24:44.

Only those two lines are looking a little bit suspicious:

2024-11-20T09:25:06.537591243Z 2024-11-20 10:25:06,537 - paho.mqtt.client - DEBUG - Sending CONNECT (u1, p1, wr1, wq1, wf1, c1, k60) client_id=b'deye-inverter-[SNremoved]'
2024-11-20T09:25:06.538880301Z 2024-11-20 10:25:06,538 - paho.mqtt.client - DEBUG - Received CONNACK (0, 0)

Log (SN removed):
log.log

@Kolbi
Copy link
Contributor Author

Kolbi commented Nov 25, 2024

Seems to be daily now and always at the same time.

@kbialek
Copy link
Owner

kbialek commented Nov 25, 2024

Sorry to say that, but I belive that the problem is on your end. Maybe something is off with your network or infra setup.

@Kolbi
Copy link
Contributor Author

Kolbi commented Nov 25, 2024

Okay need to check. Mosquitto and your solution are running as two separate docker instances on the same machine.

@Kolbi
Copy link
Contributor Author

Kolbi commented Nov 28, 2024

I reference it as bookmark for me :) eclipse-mosquitto/mosquitto#3168

@kbialek kbialek closed this as completed Dec 2, 2024
@Kolbi
Copy link
Contributor Author

Kolbi commented Dec 5, 2024

Still not fixed but workaround:
`services:
restart-notifier:
container_name: restart-notifier
image: index.docker.io/deduard/tools:restart-notifier-latest
env_file:
- stack.env
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
-
ENV:
RESTART_CONTAINERS deye-mqtt-deye-mqtt-1
CRON_SCHEDULE 30 10 * * *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants