zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

MQTT error: connect EHOSTUNREACH

Open carlosnh96 opened this issue 1 year ago • 9 comments

What happened?

Good morning, I have my Docker container running perfectly for many versions, I do it from Container Station on a QNAP TS-453D NAS. Since I updated to version 1.35 or 1.35.1, it doesn't connect to the MQTT server, both are connected to the same bridge. To make the system operational again, I have to revert to version 1.34.0. Has anyone else experienced this and found a solution?

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

When I update to version 1.35 or 1.35.1

Zigbee2MQTT version

1.35.1

Adapter firmware version

20230507

Adapter

SONOFF TI CC2652P

Debug log

info 08-01-2024 10:02:45: Zigbee: disabling joining new devices. info 08-01-2024 10:02:46: Connecting to MQTT server at mqtt://192.168.1.55:1883 debug 08-01-2024 10:02:46: Using MQTT keepalive: 60 debug 08-01-2024 10:02:46: Using MQTT login with username: mqtt error 08-01-2024 10:02:49: MQTT error: connect EHOSTUNREACH 192.168.1.55:1883 error 08-01-2024 10:02:49: MQTT failed to connect, exiting... info 08-01-2024 10:02:49: Stopping zigbee-herdsman... error 08-01-2024 10:02:52: MQTT error: connect EHOSTUNREACH 192.168.1.55:1883 error 08-01-2024 10:02:55: MQTT error: connect EHOSTUNREACH 192.168.1.55:1883 error 08-01-2024 10:02:58: MQTT error: connect EHOSTUNREACH 192.168.1.55:1883

carlosnh96 avatar Jan 09 '24 09:01 carlosnh96

I have the same issue with version 1.35.1-1

aflegler avatar Jan 10 '24 12:01 aflegler

Your broker isn't reachable, which sounds like a networking problem.

connect EHOSTUNREACH 192.168.1.55:1883

DubhAd avatar Jan 10 '24 16:01 DubhAd

I agree, but the issues are resolved when reverting to version 1.34.0 using exactly the same configuration, so it seems to be a problem with the new versions.

carlosnh96 avatar Jan 10 '24 16:01 carlosnh96

@carlosnh96 I restored version 1.34.0 but had the same problem. I then discovered that Mosquitto Broker wasn't running because I had a problem with the SSL certificate. After I solved that, everything worked again - even with version 1.35.1-1.

aflegler avatar Jan 10 '24 19:01 aflegler

@carlosnh96

I restored version 1.34.0 but had the same problem. I then discovered that Mosquitto Broker wasn't running because I had a problem with the SSL certificate. After I solved that, everything worked again - even with version 1.35.1-1.

In my case, I don't use SSL/TLS authentication, I only use a username and password to access my MQTT broker.

Could you please specify the exact change you made to make it work?

Thank you.

carlosnh96 avatar Jan 11 '24 15:01 carlosnh96

Same issue, unable to upgrade to anything higher than 1.34. Did anyone find the cause or solution?

freddieleeman avatar Feb 29 '24 10:02 freddieleeman

I have the same issue, unable to upgrade to anything higher than 1.34. Has been running on Docker with SONOFF TI CC2652P for years without any problems. Any other Mosquito client can easily connect to mosquitto server via a Docker container on the same machine.

groggy99 avatar May 04 '24 19:05 groggy99

I was facing the same thing until I pulled the mqtt and portainer containers before restarting (not sure which one was was the culprit).

  • docker-compose pull mqtt
  • docker-compose pull portainer
  • docker-compose up -d

johnrobertcobbold avatar May 08 '24 06:05 johnrobertcobbold

I was facing the same thing until I pulled the mqtt and portainer containers before restarting (not sure which one was was the culprit).

  • docker-compose pull mqtt
  • docker-compose pull portainer
  • docker-compose up -d

This doesn't work for me.

But it's working again for me. I now have 1.37.1 running.

It worked again when I reconfigured the virtual switch on the qnap nas. I created a second virtual switch with the z2m-conatiner as the only participant. Then I added the z2m container back to the original switch and now it works. I can't explain it any further.

groggy99 avatar May 18 '24 15:05 groggy99