home-assistant / supervisor

:house_with_garden: Home Assistant Supervisor
https://home-assistant.io/hassio/
Apache License 2.0
1.73k stars 630 forks source link

Mosquitto broker connections problems #1100

Closed marcor78 closed 5 years ago

marcor78 commented 5 years ago

Home Assistant release with the issue:

0.93.2 **Operating environment (HassOS/Generic):** HassOS 2.12 **Supervisor logs:**

19-05-26 00:25:55 INFO (MainThread) [hassio.api.security] /host/info access from a0d7b954_sonweb 19-05-26 00:31:14 INFO (MainThread) [hassio.homeassistant] Detect a running Home Assistant instance 19-05-26 00:31:14 INFO (MainThread) [hassio.addons] Phase 'application' start 1 add-ons 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options username 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options password 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options ssl 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options certfile 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options keyfile 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options allowed_networks 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options banned_ips 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options banlimit 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options notify_service 19-05-26 00:31:14 WARNING (MainThread) [hassio.addons.validate] Unknown options sesame 19-05-26 00:31:51 INFO (SyncWorker_13) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-configurator with version 3.3 19-05-26 00:31:56 INFO (MainThread) [hassio.tasks] All core tasks are scheduled 19-05-26 00:31:56 INFO (MainThread) [hassio.core] Hass.io is up and running 19-05-26 00:32:31 INFO (SyncWorker_2) [hassio.docker.interface] Stop addon_7ad98f9c_zigbee2mqtt application 19-05-26 00:32:37 INFO (SyncWorker_2) [hassio.docker.interface] Clean addon_7ad98f9c_zigbee2mqtt application 19-05-26 00:33:06 INFO (SyncWorker_10) [hassio.docker.addon] Start Docker add-on dwelch2101/zigbee2mqtt-armhf with version 1.4.0 19-05-26 00:44:16 INFO (SyncWorker_18) [hassio.docker.interface] Stop addon_core_mosquitto application 19-05-26 00:44:39 INFO (SyncWorker_18) [hassio.docker.interface] Clean addon_core_mosquitto application 19-05-26 00:45:31 INFO (SyncWorker_7) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-mosquitto with version 4.2 19-05-26 00:45:36 INFO (MainThread) [hassio.services.modules.mqtt] Set core_mosquitto as service provider for mqtt 19-05-26 00:45:36 INFO (MainThread) [hassio.discovery] Duplicate discovery message from core_mosquitto 19-05-26 00:46:57 INFO (SyncWorker_6) [hassio.docker.interface] Stop addon_core_mosquitto application 19-05-26 00:47:07 INFO (SyncWorker_6) [hassio.docker.interface] Clean addon_core_mosquitto application 19-05-26 00:47:55 INFO (MainThread) [hassio.services.modules.mqtt] Set core_mosquitto as service provider for mqtt 19-05-26 00:47:55 INFO (MainThread) [hassio.discovery] Duplicate discovery message from core_mosquitto 19-05-26 00:47:59 INFO (SyncWorker_1) [hassio.docker.addon] Start Docker add-on homeassistant/armv7-addon-mosquitto with version 4.2

Description of problem: Very often after restarting home assistant my mosquitto addon doesn't work. I have over 20 devices with Tasmota connected to MQTT broker, plus zigbee2mqtt dongle with 23 zigbee devices (some of them acting as routers). Devices simply can't connect to the broker after restart and the only way to have them working is disconnecting them from the broker (by changing their settings about host - command "MqttHost 0") then restarting the broker without devices trying to connect to it, and then re-add every single device one-by-one (by setting the host again - command "MqttHost XXX.XXX.XXX") and finally restarting the zigbee2mqtt addon too. This is obviously very annoying procedure and I hope there is something I can do to fix it. Here following the log in the Mosquitto addon from the start and until a few seconds after (then repeats again and again):

[INFO] Setup mosquitto configuration [INFO] Found local users inside config [INFO] Initialize Hass.io Add-on services [INFO] Initialize Home Assistant discovery [INFO] Start Mosquitto daemon 1558832347: mosquitto version 1.5.6 starting 1558832347: Config loaded from /etc/mosquitto.conf. 1558832347: |-- *** auth-plug: startup 1558832347: Opening ipv4 listen socket on port 1883. 1558832347: Opening ipv6 listen socket on port 1883. 1558832347: Opening websockets listen socket on port 1884. 1558832347: Opening ipv4 listen socket on port 8883. 1558832347: Opening ipv6 listen socket on port 8883. 1558832347: Opening websockets listen socket on port 8884. 1558832347: Warning: Mosquitto should not be run as root/administrator. 1558832347: New connection from 172.30.32.1 on port 1883. [INFO] found marcomqtt on local database 1558832351: New client connected from 172.30.32.1 as mqttjs_d0333150 (c1, k60, u'marcomqtt'). 1558832351: New connection from 192.168.1.103 on port 1883. 1558832351: New connection from 192.168.1.90 on port 1883. 1558832351: New connection from 192.168.1.87 on port 1883. 1558832351: New connection from 192.168.1.107 on port 1883. 1558832351: New connection from 192.168.1.106 on port 1883. 1558832351: New connection from 192.168.1.98 on port 1883. 1558832351: New connection from 192.168.1.73 on port 1883. 1558832351: New connection from 192.168.1.97 on port 1883. 1558832351: New connection from 192.168.1.105 on port 1883. 1558832351: New connection from 192.168.1.101 on port 1883. 1558832351: New connection from 192.168.1.76 on port 1883. 1558832351: New connection from 192.168.1.93 on port 1883. [INFO] found marcomqtt on local database 1558832354: New client connected from 192.168.1.103 as DVES_51C819 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832356: New client connected from 192.168.1.90 as DVES_EED185 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832357: New client connected from 192.168.1.87 as DVES_47984F (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832358: New client connected from 192.168.1.107 as DVES_92444A (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832359: New client connected from 192.168.1.106 as DVES_BC8EAC (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832362: New client connected from 192.168.1.98 as DVES_DFE5C0 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832363: New client connected from 192.168.1.73 as DVES_BFF796 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832365: New client connected from 192.168.1.97 as DVES_DE85F0 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832368: New client connected from 192.168.1.105 as DVES_BB6D65 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832371: New client connected from 192.168.1.101 as DVES_DFF065 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832373: New client connected from 192.168.1.76 as DVES_EDBA94 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832375: New client connected from 192.168.1.93 as DVES_D58871 (c1, k10, u'marcomqtt'). 1558832375: Client DVES_51C819 has exceeded timeout, disconnecting. 1558832375: Socket error on client DVES_51C819, disconnecting. 1558832375: Client DVES_EED185 has exceeded timeout, disconnecting. 1558832375: Socket error on client DVES_EED185, disconnecting. 1558832375: Client DVES_47984F has exceeded timeout, disconnecting. 1558832375: Socket error on client DVES_47984F, disconnecting. 1558832375: Client DVES_92444A has exceeded timeout, disconnecting. 1558832375: Socket error on client DVES_92444A, disconnecting. 1558832375: Socket error on client DVES_DE85F0, disconnecting. 1558832375: Socket error on client DVES_BB6D65, disconnecting. 1558832375: Socket error on client DVES_DFF065, disconnecting. 1558832375: Socket error on client DVES_EDBA94, disconnecting. 1558832375: Socket error on client DVES_D58871, disconnecting. 1558832376: New connection from 192.168.1.89 on port 1883. 1558832376: New connection from 192.168.1.110 on port 1883. 1558832376: New connection from 192.168.1.102 on port 1883. 1558832376: New connection from 192.168.1.85 on port 1883. 1558832376: New connection from 192.168.1.105 on port 1883. 1558832376: New connection from 192.168.1.97 on port 1883. 1558832376: New connection from 192.168.1.101 on port 1883. 1558832376: New connection from 192.168.1.76 on port 1883. 1558832376: New connection from 192.168.1.103 on port 1883. 1558832376: New connection from 192.168.1.93 on port 1883. 1558832376: New connection from 192.168.1.90 on port 1883. 1558832376: New connection from 192.168.1.107 on port 1883. 1558832376: New connection from 192.168.1.87 on port 1883. [INFO] found marcomqtt on local database 1558832377: New client connected from 192.168.1.89 as DVES_BFE4F5 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832378: New client connected from 192.168.1.110 as DVES_EEDC82 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832379: New client connected from 192.168.1.102 as DVES_DEDF04 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832380: New client connected from 192.168.1.85 as DVES_405CBF (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832381: New client connected from 192.168.1.105 as DVES_BB6D65 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832382: New client connected from 192.168.1.97 as DVES_DE85F0 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832383: New client connected from 192.168.1.101 as DVES_DFF065 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832386: New client connected from 192.168.1.76 as DVES_EDBA94 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832387: New client connected from 192.168.1.103 as DVES_51C819 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832388: New client connected from 192.168.1.93 as DVES_D58871 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832389: New client connected from 192.168.1.90 as DVES_EED185 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832390: New client connected from 192.168.1.107 as DVES_92444A (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832392: New client connected from 192.168.1.87 as DVES_47984F (c1, k10, u'marcomqtt'). 1558832392: Client DVES_BC8EAC has exceeded timeout, disconnecting. 1558832392: Socket error on client DVES_BC8EAC, disconnecting. 1558832392: Client DVES_DFE5C0 has exceeded timeout, disconnecting. 1558832392: Socket error on client DVES_DFE5C0, disconnecting. 1558832392: Client DVES_BFF796 has exceeded timeout, disconnecting. 1558832392: Socket error on client DVES_BFF796, disconnecting. 1558832392: Client DVES_BFE4F5 has exceeded timeout, disconnecting. 1558832392: Socket error on client DVES_BFE4F5, disconnecting. 1558832392: Socket error on client DVES_EEDC82, disconnecting. 1558832392: Socket error on client DVES_DEDF04, disconnecting. 1558832392: Socket error on client DVES_405CBF, disconnecting. 1558832392: Socket error on client DVES_47984F, disconnecting. 1558832392: New connection from 192.168.1.89 on port 1883. 1558832392: New connection from 192.168.1.106 on port 1883. 1558832392: New connection from 192.168.1.110 on port 1883. 1558832392: New connection from 192.168.1.102 on port 1883. 1558832392: New connection from 192.168.1.98 on port 1883. 1558832392: New connection from 192.168.1.85 on port 1883. 1558832392: New connection from 192.168.1.73 on port 1883. [INFO] found marcomqtt on local database 1558832394: New client connected from 192.168.1.89 as DVES_BFE4F5 (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832395: New client connected from 192.168.1.106 as DVES_BC8EAC (c1, k10, u'marcomqtt'). [INFO] found marcomqtt on local database 1558832396: New client connected from 192.168.1.110 as DVES_EEDC82 (c1, k10, u'marcomqtt').

stale[bot] commented 5 years ago

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.