zigbee2mqtt / hassio-zigbee2mqtt

Official Zigbee2MQTT Home Assistant add-on
https://www.zigbee2mqtt.io
Apache License 2.0
1.19k stars 436 forks source link

zigbee2mqtt wont start - MQTT error: connect ECONNREFUSED #530

Closed geidorei closed 1 year ago

geidorei commented 1 year ago

Description of the issue

After core update this week zignbee2mqtt wont start: Zigbee2MQTT:error 2023-11-11 12:15:25: MQTT error: connect ECONNREFUSED 172.30.33.0:1883 Zigbee2MQTT:error 2023-11-11 12:15:25: MQTT failed to connect, exiting...

I have not changed any settings and also looked for a solution, to no avail. Passwords etc are correct.

This is what I have done so far: Rebooted Turn RPi4 on/off Unplugged the Sonoff stick CC2531, and also the extension cable, swapped USB ports, swapped cables.... Confirmed LED is on.

Any suggestions and help much appreciated. Thanks folks.

Addon version

System Information version | core-2023.6.3 -- | -- installation_type | Home Assistant OS dev | false hassio | true docker | true user | root virtualenv | false python_version | 3.11.4 os_name | Linux os_version | 6.1.21-v8 arch | aarch64 timezone | Europe/London config_dir | /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.32.1 Stage | running Available Repositories | 1343 Downloaded Repositories | 51 HACS Data | failed to load: unreachable
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | December 9, 2023 at 12:00 AM relayer_connected | true relayer_region | us-east-1 remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | true remote_server | us-east-1-7.ui.nabu.casa certificate_status | ready can_reach_cert_server | failed to load: unreachable can_reach_cloud_auth | failed to lo

Platform

Core 2023.11.2 Supervisor 2023.11.0 Operating System 11.1 Frontend 20231030.2

Logs of the issue (if applicable)

[12:15:06] INFO: Preparing to start... [12:15:07] INFO: Socat not enabled [12:15:12] INFO: Starting Zigbee2MQTT... Zigbee2MQTT:error 2023-11-11 12:15:25: MQTT error: connect ECONNREFUSED 172.30.33.0:1883 Zigbee2MQTT:error 2023-11-11 12:15:25: MQTT failed to connect, exiting...

MQTT: 2023-11-11 12:20:13: Warning: Mosquitto should not be run as root/administrator. mosquitto: persist_read.c:550: persist__restore_sub: Assertion `client_id' failed. [12:20:15] INFO: Successfully send discovery information to Home Assistant. [12:20:15] INFO: Service restart after closing [12:20:16] INFO: Successfully send service information to the Supervisor. [12:20:17] INFO: Starting mosquitto MQTT broker...

Which I believe is AOK.

geidorei commented 1 year ago

Sussed it - FYI for anyone else who has this issue.

It was down to a corrupt MQTT database. To fix this I copied the YAMA config, and then uninstalled, reinstalled and put the original YAML back. Fixed!

BrianHenryIE commented 10 months ago

Thanks.

I fixed with:

I'm not sure why that worked, but it did! I had stopped and started them a couple of times already, and updated to the latest version.

If this happens again, I'll reboot the entire host first.

I should probably back everything up.