MQTT-unable to connect

New to this HA lark, and have just setup a dedicated thin i386 HAOS install- trying to get the MQTT broker up and running ready for when dongle arrives. so far the auto intergration fails so have tried it manually but still cannot manage to connect to the broker :frowning:
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[21:04:47] INFO: SSL is not enabled
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
[21:04:48] INFO: Starting NGINX for authentication handling…
s6-rc: info: service legacy-services successfully started
[21:04:48] INFO: Starting mosquitto MQTT broker…
2024-03-18 21:04:48: Warning: Mosquitto should not be run as root/administrator.
2024-03-18 21:04:48: mosquitto version 2.0.18 starting
2024-03-18 21:04:48: Config loaded from /etc/mosquitto/mosquitto.conf.
2024-03-18 21:04:48: Loading plugin: /usr/share/mosquitto/go-auth.so
2024-03-18 21:04:48: ├── Username/password checking enabled.
2024-03-18 21:04:48: ├── TLS-PSK checking enabled.
2024-03-18 21:04:48: └── Extended authentication not enabled.
2024-03-18 21:04:48: Opening ipv4 listen socket on port 1883.
2024-03-18 21:04:48: Opening ipv6 listen socket on port 1883.
2024-03-18 21:04:48: Opening websockets listen socket on port 1884.
2024-03-18 21:04:48: mosquitto version 2.0.18 running
2024-03-18 21:04:49: New connection from 127.0.0.1:46574 on port 1883.
2024-03-18 21:04:49: Client disconnected due to protocol error.
[21:04:49] INFO: Successfully send discovery information to Home Assistant.
[21:04:50] INFO: Successfully send service information to the Supervisor.
2024-03-18 21:07:40: New connection from 172.30.32.2:46478 on port 1883.
2024-03-18 21:07:40: Client closed its connection.
2024-03-18 21:07:59: New connection from 192.168.0.32:36819 on port 1883.
error: received null username or password for unpwd check
2024-03-18 21:07:59: Client 3lQcgEvLY6p1EKAZmSBMBC disconnected, not authorised.
2024-03-18 21:09:09: New connection from 192.168.0.32:39043 on port 1883.
2024-03-18 21:09:09: Client 0oGMBkkYe4h7ZJqJjgGEzM disconnected, not authorised.
2024-03-18 21:09:40: New connection from 172.30.32.2:44558 on port 1883.
2024-03-18 21:09:40: Client closed its connection.
2024-03-18 21:11:40: New connection from 172.30.32.2:51346 on port 1883.
2024-03-18 21:11:40: Client closed its connection.
2024-03-18 21:13:40: New connection from 172.30.32.2:39636 on port 1883.
2024-03-18 21:13:40: Client closed its connection.
2024-03-18 21:14:04: New connection from 192.168.0.32:53071 on port 1883.
2024-03-18 21:14:04: Client 4I7Y75JEtg5fMFSgnASnHS disconnected, not authorised.

any ideas, other that reverting to a fresh install and just trying again?

Hi,
Here’s a guide to setting up the MQTT broker and MQTT-native relevant add-ons which might help:

The Client closed its connection. messages are normal (integrations seem to re-connect regularly), however Client 4I7Y75JEtg5fMFSgnASnHS disconnected, not authorised. suggests you have an incorrect username / password.

Your comment “ready for when dongle arrives” suggests you may not be using a device using MQTT natively (such as Shelly, Tasmota, Sonoff, etc), but a Zigbee device paired with a Zigbee2MQTT co-ordinator which just happens to use MQTT to talk to HASS.

If so, a more Zigbee2MQTT-based guide might be best to search for. There’s usually a post every few days about Zigbee2MQTT, so there may well be a post about just the error message you are seeing.

(I use ZHA so don’t know Z2M).

If this helps, :heart: this post!

Thanks for the reply, correct waiting for the Sonoff to arrive, but also want to use the MQTT to setup givtcp.

I have tried following the instructions.

Will do a complete fresh install this evening got a feeling it’s dns related…

It’s always DNS… (except when it’s BGP :grin: :man_mage: ! )

If you are using DNS names in clients like Tasmota, there’s an IPv6 trap that newer network kit that resolves AAAA as well as A records…

The test is to use IPv4 addresses directly in Tasmota (note Tasmota doesn’t compile-in mDNS to save space).

If this helps, :heart: this post!

1 Like

thank reinstalled it all and sorted its self out, annoyingly keep getting IP conflicts and it won;t let me assign an ip above 192.168.0.35…