Hi guys,
I wanted to bring to your attention a problem that’s been bugging me for a few days.
It often happens that the Home Assistant host is no longer reachable from some clients.
I noticed this because some devices connected to the MQTT gateway are no longer connected, and their logs show the error: notice: Connection to MQTT server failed, rc=-2. Checking from the interface, I see that other devices not connected to MQTT are also offline.
I verified that all these devices are properly connected to the network, reachable, and manageable normally.
Only after a complete system reboot are all the devices available again.
I should add that during this downtime, even a normal ping from a client to the Home Assistant host IP fails.
Do you have any suggestions on what the problem might be or what logs I can retrieve to try to understand the cause of this problem?
So I assume you are using the mosquitto add-on ?
So you can’t reach the HA web-interface in these moments ? How do you initiate the system reboot at that time ?
The web interface is reachable, and I can reboot.
However, some devices, including MQTT, are offline.
From my analysis:
- those same devices are reachable with ping;
- you can manage them from their TASMOTA or WThermostat 1.17 interface by directly pointing to their IP;
- from the logs, I see that the connection to the Mosquito Broker fails.
- the Mosquito Broker is up and running, and other devices continue to function;
- pinging from some devices to the HA host fails.
After rebooting, everything starts working again.
rc=-2 indicates a failure to create a network connection to the server, which is usually a network or authentication problem.
Does HA have a fixed IP address ?
How are your Tasmotas configured ?
Yes rc=-2 indicates a failure to create a netowrk connection because host on 192.168.1.2 is unreachable.
Ping from any client towards 192.168.1.2 fails, and contemporary works fine from other ones.
This seems like typical ACL rules, but I don’t think there are any configurations like this.
For completeness of information I attach the MQTT client configurations.
Hello megagenio,
Is your Home Assistant server device using WIFI? If Ethernet is the cable/switch OK?
HA host is connected directly to the home router with an Ethernet cable. A mesh Wi-Fi repeater is connected to the router via Ethernet cable. The devices are connected to the Wi-Fi network. No ACL rules are configured on the router or the Wi-Fi repeater.
I’m sending you an update. The problem has recurred, and in the HA/Mosquitto Broker log I see the following message:
time=“2025-11-05T11:21:07+01:00” level=debug msg=“setting acl cache (granted = true) for mqtt-user”
From that precise moment, all MQTT devices lost connection.
Any suggestions?
I’m going crazy. Some devices are correctly connected to the MQTT server and are working.
Others can’t connect.
I tried connecting from a PC with an MQTT client, but the connection fails.
I tried pinging the host IP, but that also fails. I restarted the Mosquitto Broker and HA, but nothing happens; the situation persists. I restarted the host, and everything works again.



