3

My Mosquitto broker stopped working and I think it might have something to do with me trying to use the same Raspberry Pi to run Tuya Convert.

I know Tuya Convert installs a bunch of stuff and I'm guessing one of those screwed my MQTT Broker, probably by running some other mosquito instance in the RPi or something like that. But I don't know what to uninstall without screwing it even worse.

I'm running Home Assistant supervised on Docker. On a 4Gb Raspberry Pi 4 Model B with Raspberry Pi OS.

These are the logs

Hassio general logs:

Logger: homeassistant.components.mqtt
Source: components/mqtt/__init__.py:907
Integration: MQTT (documentation, issues)
First occurred: 4:03:32 PM (3 occurrences)
Last logged: 4:03:35 PM

Unable to connect to the MQTT broker: Connection Refused: not authorised.

Mosquito Broker logs:

[16:02:32] INFO: Setup mosquitto configuration
[16:02:32] INFO: Found local users inside config
[16:02:32] INFO: Initialize Hass.io Add-on services
[16:02:32] INFO: Initialize Home Assistant discovery
[16:02:32] INFO: Start Mosquitto daemon
1604070152: mosquitto version 1.6.3 starting
1604070152: Config loaded from /etc/mosquitto.conf.
1604070152: Loading plugin: /usr/share/mosquitto/auth-plug.so
1604070152: |-- *** auth-plug: startup
1604070152:  ├── Username/password checking enabled.
1604070152:  ├── TLS-PSK checking enabled.
1604070152:  └── Extended authentication not enabled.
1604070152: Opening ipv4 listen socket on port 1883.
1604070152: Opening ipv6 listen socket on port 1883.
1604070152: Opening websockets listen socket on port 1884.
1604070153: Opening ipv4 listen socket on port 8883.
1604070153: Opening ipv6 listen socket on port 8883.
1604070153: Opening websockets listen socket on port 8884.
1604070153: Warning: Mosquitto should not be run as root/administrator.
1604070158: New connection from xxx.xxx.xxx.53 on port 1883.
[INFO] found myuser on local database
1604070159: New client connected from xxx.xxx.xxx.53 as DVES_8666BD (p2, c1, k30, u'myuser').
1604070159: New connection from xxx.xxx.xxx.52 on port 1883.
1604070159: New connection from xxx.xxx.xxx.54 on port 1883.
1604070159: New connection from xxx.xxx.xxx.62 on port 1883.
1604070159: New connection from xxx.xxx.xxx.44 on port 1883.
1604070159: New client connected from xxx.xxx.xxx.52 as DVES_9262E1 (p2, c1, k30, u'myuser').
1604070159: New client connected from xxx.xxx.xxx.54 as DVES_92846E (p2, c1, k30, u'myuser').
1604070159: New client connected from xxx.xxx.xxx.62 as DVES_B1089C (p2, c1, k30, u'myuser').
1604070159: New client connected from xxx.xxx.xxx.44 as DVES_43EEEE (p2, c1, k30, u'myuser').
1604070182: New connection from 172.30.32.1 on port 1883.
[WARN] Not found homeassistant on local database
1604070183: Socket error on client <unknown>, disconnecting.
1604070211: New connection from 172.30.32.1 on port 1883.
1604070211: Socket error on client <unknown>, disconnecting.
1604070213: New connection from 172.30.32.1 on port 1883.
1604070213: Socket error on client <unknown>, disconnecting.
1604070215: New connection from 172.30.32.1 on port 1883.
1604070215: Socket error on client <unknown>, disconnecting.
1604070219: New connection from 172.30.32.1 on port 1883.
1604070219: Socket error on client <unknown>, disconnecting.
1604070227: New connection from 172.30.32.1 on port 1883.
1604070227: Socket error on client <unknown>, disconnecting.
1604070243: New connection from 172.30.32.1 on port 1883.
1604070243: Socket error on client <unknown>, disconnecting.
1604070275: New connection from 172.30.32.1 on port 1883.
1604070275: Socket error on client <unknown>, disconnecting.
1604070339: New connection from 172.30.32.1 on port 1883.
1604070339: Socket error on client <unknown>, disconnecting.
1604070459: New connection from 172.30.32.1 on port 1883.
1604070459: Socket error on client <unknown>, disconnecting.

Please let me know if there's any other information or logs I can provide!

1
  • I have exactly the same problem (Socket error on client XXXX, disconnecting.) - tried @rebatoma's answer - exactly the same result remains after the fresh install. Did you get any further with this?
    – Hauns TM
    Jan 4 at 9:25
1

Probably the easy way to solve this would be proceed with a fresh reinstall.

Reinstalling the Mosquitto broker with all its components and settings you need will restore previous configuration and address the problem.

What is probably happened is Tuya Convert reinstalled and configure some of the Mosquitto MQTT Broker component changing its corresponding Integration.

Once you reinstall/reconfigure/start Mosquitto, after having done the above, you should see a successful connection in the logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.