Zigbee2mqtt failing to restart after power outage

I have managed to get an amazing HA automated hydroponic grow system working 100% reliably for about a year, even though I have no programing abilities We had a major power outage last night and now I cannot communicate with any Zigbee devices in Z2MQTT. I rebooted Z2MQTT is set for auto turn on after reboot and always has. The ERROR message say "SOCAT not enabled " I am not sure what step to take next.

[12:51:13] INFO: Preparing to start...
[12:51:14] INFO: Socat not enabled
[12:51:15] ERROR: Got unexpected response from the API: Service not enabled
[12:51:15] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2023-03-10 12:51:21: Logging to console and directory: '/config/zigbee2mqtt/log/2023-03-10.12-51-21' filename: log.txt
Zigbee2MQTT:info  2023-03-10 12:51:21: Starting Zigbee2MQTT version 1.30.2 (commit #unknown)
Zigbee2MQTT:info  2023-03-10 12:51:21: Starting zigbee-herdsman (0.14.96)
Zigbee2MQTT:info  2023-03-10 12:51:22: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2023-03-10 12:51:22: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20220219,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2023-03-10 12:51:22: Currently 29 devices are joined:
Zigbee2MQTT:info  2023-03-10 12:51:22: Pump 1-f (0x00124b00226cb487): BASICZBR3 - SONOFF Zigbee smart switch (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H  Flower (0x00124b00251ec44c): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: CO2-Meter (0xf4ce36de85abd142): Alab-CO2-1.0 - Alab [DiY CO2 Sensor](https://github.com/9zigen/) (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: pH (0xf4ce363b6f08b298): Alab-PhSensor-1.0 - Alab [DiY Wireless PH Sensor](https://github.com/9zigen/zigbee-ph-sensor) (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: CO2 RELAY  (0x00124b00226c90e7): BASICZBR3 - SONOFF Zigbee smart switch (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Main Pump and aeration (0x00124b0022631839): BASICZBR3 - SONOFF Zigbee smart switch (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Humidifier Relay (0x00124b0022d2e9ee): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Airconditioner (0x00124b0022d2f71a): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Roof Fan (0x00124b0022d2f379): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Flower Light relay N-2-a (0x00124b0022d2e791): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Flower Light relay N-1-a (0x00124b0022d2ef56): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Flower Light relay S-3-w (0x00124b0022d2e2c2): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Flower Light relay S-3-e (0x00124b0022d2e096): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Flower Light relay S-1-w (0x00124b0022d2f374): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: Flower Light relay S-2-e (0x00124b0022d2ed81): SA-003-Zigbee - eWeLink Zigbee smart plug (Router)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H-cure  (0x00124b0025155bee): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H Vent (0x00124b002515750c): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H Veg (0x00124b0025155501): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: Loading dock door motion  (0x00124b00244507fb): SNZB-03 - SONOFF Motion sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H FL 2 (0x00124b0025155f35): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: Loading dock Porch light (0x00124b0024bf40b7): ZBMINI-L - SONOFF Zigbee smart switch (no neutral) (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H F-3 CURE 2 (0x00124b0025152333): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H Bag 1 (0x00124b00251565e9): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H Bag 2 (0x00124b002515202c): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T-H Bag 3 (0x00124b00251568d9): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:info  2023-03-10 12:51:22: T=H Bag 4 (0x00124b00251579b7): SNZB-02 - SONOFF Temperature and humidity sensor (EndDevice)
Zigbee2MQTT:warn  2023-03-10 12:51:22: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2023-03-10 12:51:22: Allowing new devices to join.
Zigbee2MQTT:warn  2023-03-10 12:51:22: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2023-03-10 12:51:22: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2023-03-10 12:51:22: Connecting to MQTT server at mqtt://core-mosquitto:1883
Zigbee2MQTT:error 2023-03-10 12:51:26: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
Zigbee2MQTT:error 2023-03-10 12:51:26: MQTT failed to connect, exiting...
Zigbee2MQTT:info  2023-03-10 12:51:26: Stopping zigbee-herdsman...
Zigbee2MQTT:error 2023-03-10 12:51:27: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
Zigbee2MQTT:error 2023-03-10 12:51:28: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
Zigbee2MQTT:error 2023-03-10 12:51:29: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
Zigbee2MQTT:error 2023-03-10 12:51:30: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
Zigbee2MQTT:error 2023-03-10 12:51:34: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
Zigbee2MQTT:error 2023-03-10 12:51:35: MQTT error: getaddrinfo ENOTFOUND core-mosquitto
Zigbee2MQTT:info  2023-03-10 12:51:36: Stopped zigbee-herdsman

Seems like mqtt is failing to connect and crashing zigbee2mqtt. I would check the settings in both zigbee2mqtt (related to mqtt) and the mosquitto addon. Is the mosquitto addon up and running?

1 Like

Exactly…

Also refrain from duplicate posts.

Sorry for the duplicate post, I didn’t think the first message posted…

The mosquito broker appears to be working and lists the 29 devices and their entities. Z"MQTT is blank.
Z2MQTT says " Addon is not working, Please start it first"
I Press OK and the Z2MQTT window opens and lets me press start. CPU usage goes up to 23% RAM is 2%But, it drops to 0%,0% and if I open web UI it is blank…

On the configuration page it shows
SOCAT

enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: "-d -d"
log: false

MQTT
1
SERIAL
1 Port /dev/ttyUSBo
NETWORK
8486

Unless your zstick is on a different machine from the one running Home-assistant socat as expected should not be enabled. Socat isn’t your problem- per the log it is a failure to connect to mqtt. This is either on the zigbee2mqtt side or mosquitto side (or both). Go back and double check all mqtt settings, including user names and passwords, in both zigbee2mqtt and mosquitto are configured correctly. The devices will still show in mqtt from the last time it worked properly so that really doesn’t tell you much that they are there and does not rule out a current mqtt issue.

When things like this happen after a power outage it is highly likely caused by sd or storage media corruption. How are you running home assistant and what kind of drive are you using for it?

Thank you so much, It was the MQTT. The “start on Boot” button was disabled…
I Was not aware of the INFO page for the MQTT ADDON. I found the page by accident. I would look at MQTT through the integrations tab. there was no way to tell from that page if mqtt was on.
This is a the kind of thing that happens to me, i am definitely over my head .
I would never have gotten this far without the help of the forum.