Mosquitto just updated and broke all of my external connections. I can connect to it from the machine it is running on but not other machines on the local network.
from it’s log file:
1614361328: Starting in local only mode. Connections will only be possible from cl
ients running on this machine.
1614361328: Create a configuration file which defines a listener to allow remote a
ccess.
1614361328: Opening ipv4 listen socket on port 1883.
1614361328: Opening ipv6 listen socket on port 1883.
I have not found the configuration setting for mosquitto to allow access from my local network.
to whit: “Create a configuration file which defines a listener to allow remote a
ccess.”
Starting with the release of Mosquitto version 2.0.0 (you are running v2.0.2) the default config will only bind to localhost as a move to a more secure default posture.
If you want to be able to access the broker from other machines you will need to explicitly edit the config files to either add a new listener that binds to the external IP address (or 0.0.0.0) or add a bind entry for the default listener.
More details can be found in the 2.0 release notes here
Hello All, reading this to try and solve my issue and wondered if anyone could possibly help.
I have a sonoff s26 switch flashed with Tasmota and I’m trying to get it to connect to mosquitto over the LAN.
I set Listener as suggested and changed allow_anonymous true but the tasmota is still giving me an RC-2 error. I have two switches on different firmware and the other is giving me an RC -5 error which I’m guessing is the same issue.
17:10:57 MQT: Connect failed to 192.168.0.61:1883, rc -2. Retry in 10 sec
17:06:21.246 MQT: Connect failed to 192.168.0.61:1883, rc -2. Retry in 70 sec
I am trying to get Mosquitto exposed to my LAN, but cannot get it working. My HA runs ons HA-OS and I’ve added this config to a custom .conf file:
listener 1882 0.0.0.0
allow_anonymous true
In the logs I can see the listener is started, still the port is not reachable. Probably because an port exposure of the add-on Docker container is needed. Can anyone help?
I currently assemble a project to start an HA Container-based stack from scratch, incl. MQTT and Zigbee2MQTT. From the docker-compose file in my Github repository, here’s an excerpt to start Eclipse Mosquitto for anonymous access. The Mosquitto image comes with an appropriate configuration for this:
There might be some bug with eclipse-mosquitto v2 … I tried all the suggestions from you but still did not manage to make it work (without allowing anonymous access).
So I decided to use mosquitto version 1.6 and it works! Here are my configs