HI,
I have been using “Mosquitto Broker” for a few years to connect my SwitchBot devices to HA via ESP32.
For a couple of days I no longer had my devices connected and after some tests I saw that Mosquitto was unable to start because the 4 default ports (1883, 1884, 8883, 8884) were already occupied.
I tried to check what was using those ports, but to no avail. Later I tried to solve the problem by changing the ports (from 1883 to 1885 etc.), also updating the router port and the one present in the ESP32. In this case Mosquitto started, but in the logs I still saw attempts to connect to port 1883.
However in the Mosquitto logs I always receive the following:
error: received null username, clientid or topic, or access is equal or less than 0 for acl check
I have Home Assistant OS on a Raspberry Pi3B (which I only use for that):
HA OS: 12.4
HA Core: 2024.8.0
Mosquitto Broker: 6.4.1
I tried looking for solutions to similar problems here, but to no avail. Does anyone have any advice?
Hi,
If you mean the command netstat -tulpn | grep LISTEN
I tried to give it, but it didn’t give me anything back about the port in question.
Yes I have an add-on for MQTT. I tried restarting everything several times, restoring old backups of 1-3-7 days, with no solution.
However, among the restart options I saw the option restart in safe mode. I rebooted like that, tried to put the default ports back and that way the Mosquitto Broker add-on started without giving me port problems.
At this point I tried restarting in normal mode and now it works correctly as it did a week ago. Well, I don’t understand what could be causing this problem which seems to have resolved “by itself”…