addons: Mosquitto Broker Socket Error

The problem

Unsure what I done but it was working last week, but this week i’m not getting the published messages into HA, they are being sent from my devices as I have subscribed to the topics on other brokers and I am receiving them.

I have done full reboots, uninstalls and the problem remains.

Environment

  • Add-on with the issue: Mosquitto broker
  • Add-on release with the issue: 6.0.1
  • Last working add-on release (if known):
  • Operating environment (OS/Supervised): Supervised

Problem-relevant configuration

logins: []
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Traceback/Error logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] mosquitto.sh: executing... 
[08:20:15] INFO: Certificates found: SSL is available
[cont-init.d] mosquitto.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[08:20:15] INFO: Starting NGINX for authentication handling...
[08:20:16] INFO: Starting mosquitto MQTT broker...
1624926016: mosquitto version 1.6.12 starting
1624926016: |-- *** auth-plug: startup
[08:20:16] INFO: Successfully send discovery information to Home Assistant.
[08:20:17] INFO: Successfully send service information to the Supervisor.
1624926016: Config loaded from /etc/mosquitto/mosquitto.conf.
1624926016: Loading plugin: /usr/share/mosquitto/auth-plug.so
1624926016:  ├── Username/password checking enabled.
1624926016:  ├── TLS-PSK checking enabled.
1624926016:  └── Extended authentication not enabled.
1624926016: Opening ipv4 listen socket on port 1883.
1624926016: Opening ipv6 listen socket on port 1883.
1624926016: Opening websockets listen socket on port 1884.
1624926016: Opening ipv4 listen socket on port 8883.
1624926016: Opening ipv6 listen socket on port 8883.
1624926016: Opening websockets listen socket on port 8884.
1624926016: Warning: Mosquitto should not be run as root/administrator.
1624926016: mosquitto version 1.6.12 running
1624926016: New connection from 127.0.0.1 on port 1883.
1624926016: Socket error on client <unknown>, disconnecting.
1624926016: New connection from 172.30.32.1 on port 1883.
1624926016: New client connected from 172.30.32.1 as mqttjs_dec8d72b (p2, c1, k60, u'addons').
1624926017: New connection from 192.168.1.4 on port 1883.
1624926017: New client connected from 192.168.1.4 as mqtt-explorer-0cd99e23 (p2, c1, k60).
1624926017: New connection from 172.30.32.1 on port 1883.
1624926017: New client connected from 172.30.32.1 as 64fpGnTXcGnpKwRBx48aPL (p2, c1, k60, u'homeassistant').
1624926018: New connection from 192.168.1.34 on port 1883.
1624926018: New client connected from 192.168.1.34 as auto-9F3815E0-18E0-88AF-6E09-5DCCDF3850A9 (p2, c1, k60).
1624926018: New connection from 192.168.1.23 on port 1883.
{"result": "ok", "data": {}}1624926018: New client connected from 192.168.1.23 as DVES_4A98B7 (p2, c1, k30, u'kane').
1624926019: New connection from 192.168.1.50 on port 1883.
1624926019: New client connected from 192.168.1.50 as DVES_58883C (p2, c1, k30, u'kane').
1624926019: New connection from 192.168.1.55 on port 1883.
1624926019: New client connected from 192.168.1.55 as DVES_3330FD (p2, c1, k30, u'kane').
1624926039: New connection from 192.168.1.22 on port 1883.
1624926039: New client connected from 192.168.1.22 as DVES_4AA443 (p2, c1, k30, u'kane').
1624926061: New connection from 172.30.32.2 on port 1883.
1624926061: Socket error on client <unknown>, disconnecting.
1624926181: New connection from 172.30.32.2 on port 1883.
1624926181: Socket error on client <unknown>, disconnecting.
1624926301: New connection from 172.30.32.2 on port 1883.
1624926301: Socket error on client <unknown>, disconnecting.
1624926421: New connection from 172.30.32.2 on port 1883.
1624926421: Socket error on client <unknown>, disconnecting.
1624926541: New connection from 172.30.32.2 on port 1883.
1624926541: Socket error on client <unknown>, disconnecting.
1624926661: New connection from 172.30.32.2 on port 1883.
1624926661: Socket error on client <unknown>, disconnecting.
1624926781: New connection from 172.30.32.2 on port 1883.
1624926781: Socket error on client <unknown>, disconnecting.
1624926901: New connection from 172.30.32.2 on port 1883.
1624926901: Socket error on client <unknown>, disconnecting.
1624927021: New connection from 172.30.32.2 on port 1883.
1624927021: Socket error on client <unknown>, disconnecting.
1624927141: New connection from 172.30.32.2 on port 1883.
1624927141: Socket error on client <unknown>, disconnecting.
1624927261: New connection from 172.30.32.2 on port 1883.
1624927261: Socket error on client <unknown>, disconnecting.
1624927288: Client mqtt-explorer-0cd99e23 disconnected.
1624927290: New connection from 192.168.1.4 on port 1883.
1624927290: New client connected from 192.168.1.4 as mqtt-explorer-0cd99e23 (p2, c1, k60).
1624927381: New connection from 172.30.32.2 on port 1883.
1624927381: Socket error on client <unknown>, disconnecting.
1624927392: Client mqtt-explorer-0cd99e23 disconnected.
1624927501: New connection from 172.30.32.2 on port 1883.
1624927501: Socket error on client <unknown>, disconnecting.
1624927621: New connection from 172.30.32.2 on port 1883.
1624927621: Socket error on client <unknown>, disconnecting.
1624927741: New connection from 172.30.32.2 on port 1883.
1624927741: Socket error on client <unknown>, disconnecting.

Additional information

HA Log:

Logger: homeassistant.components.mqtt Source: components/mqtt/init.py:913 Integration: MQTT (documentation, issues) First occurred: 3:53:50 PM (1 occurrences) Last logged: 3:53:50 PM

Disconnected from MQTT server core-mosquitto:1883 (1)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 7
  • Comments: 60 (4 by maintainers)

Most upvoted comments

Still not resolved

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I made my own Mosquitto addon for hassio that allows anonymous logins (allow_anonymous true) and completely removed authentication. Just add https://github.com/SharkyRawr/hass-mqtt-fix to your addon store repositories, click check for updates and install Mosquitto broker (fix).

Since anyone can connect and publish any topic, it’s not recommended to run this on public networks – but this works for me.