Error while starting zigbee-herdsman Failed to start zigbee

Hi all!

Did anyone find a solution? I have the same issue, but I am running Home Assistant on a virtual machine on a NUC.
The problem started after I updated my Home Assistant OS to 9.3.

I have a similar configuration in Home Assistant as @mikkelsiggaard , but I have the CC2531 as Zigbee coordinator.

The error I’m getting is:
Zigbee2MQTT:info 2022-11-04 15:14:55: Logging to console and directory: ‘/config/zigbee2mqtt/log/2022-11-04.15-14-55’ filename: log.txt
Zigbee2MQTT:info 2022-11-04 15:14:55: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info 2022-11-04 15:14:55: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:error 2022-11-04 15:15:02: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-11-04 15:15:02: Failed to start zigbee
Zigbee2MQTT:error 2022-11-04 15:15:02: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
Zigbee2MQTT:error 2022-11-04 15:15:02: Exiting…
Zigbee2MQTT:error 2022-11-04 15:15:02: Error: network commissioning failed - panId collision detected (expected=6754, actual=6755)
at ZnpAdapterManager.beginCommissioning (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:370:19)
at ZnpAdapterManager.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:77:17)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
at Zigbee.start (/app/lib/zigbee.ts:58:27)
at Controller.start (/app/lib/controller.ts:101:27)
at start (/app/index.js:109:5)

I tried updating Zigbee2mqtt, but if I do that, the add-on will not start at all…

I’m still a newbee and I’m really stuck here. Can anyone help me out?

I have the same problem:

I have also the same problem!!
[11:39:29] INFO: Preparing to start…
[11:39:32] INFO: Socat not enabled
[11:39:38] INFO: Starting Zigbee2MQTT…
Zigbee2MQTT:info 2022-11-29 11:39:50: Logging to console and directory: ‘/config/zigbee2mqtt/log/2022-11-29.11-39-50’ filename: log.txt
Zigbee2MQTT:info 2022-11-29 11:39:50: Starting Zigbee2MQTT version 1.28.2 (commit #unknown)
Zigbee2MQTT:info 2022-11-29 11:39:50: Starting zigbee-herdsman (0.14.68)
Zigbee2MQTT:error 2022-11-29 11:39:51: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-11-29 11:39:51: Failed to start zigbee
Zigbee2MQTT:error 2022-11-29 11:39:51: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
Zigbee2MQTT:error 2022-11-29 11:39:51: Exiting…
Zigbee2MQTT:error 2022-11-29 11:39:51: Error: Error while opening serialport ‘Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2487124-if00’
at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/deconz/driver/driver.ts:200:28)
at SerialPort._error (/app/node_modules/@serialport/stream/lib/index.js:198:14)
at /app/node_modules/@serialport/stream/lib/index.js:242:12

Having the same problem! Please, someone help…

I have the same problem too, i.e., it fails to start zigbee-herdsman for reasons unknown. I cannot figure out how to resolve this issue.

[22:38:09] INFO: Preparing to start...
[22:38:09] INFO: Socat not enabled
[22:38:10] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2022-12-21 22:38:12: Logging to console and directory: '/config/zigbee2mqtt/log/2022-12-21.22-38-12' filename: log.txt
Zigbee2MQTT:info  2022-12-21 22:38:12: Starting Zigbee2MQTT version 1.28.4 (commit #unknown)
Zigbee2MQTT:info  2022-12-21 22:38:12: Starting zigbee-herdsman (0.14.76)
Zigbee2MQTT:error 2022-12-21 22:38:12: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-12-21 22:38:12: Failed to start zigbee
Zigbee2MQTT:error 2022-12-21 22:38:12: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-12-21 22:38:12: Exiting...
Zigbee2MQTT:error 2022-12-21 22:38:12: Error: spawn udevadm ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:478:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

My Zigbee chip is Sonoff 3.0 USB Dongle Plus V2.

Hi Marko,

I had the exact same error message and was going in circles trying to figure it out.
Basically there are 2 versions of your stick with the same name.
There is -P version and -E version, as you can see in Supported Adapters | Zigbee2MQTT they actually mentioned it.

So -P version works out of the box but the -E not so much - the one I had.
If you have the -E version, same as me check this youtube video

However, while this did fix an issue of starting the zigbee-herdsman I was still getting a different error, I think ping 600. So I had to remove the newly created mqtt-user and leave that portion blank. Also if you are using RPi make sure dongle is connected to usb2.0 port.

in the end, I used the following configuration.yaml, which automatically added user/pass under mqtt field (not showed here)

homeassistant: true
mqtt:
  server: mqtt://core-mosquitto:1883
serial:
  port: >-
    /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220818082811-if00
  adapter: ezsp
11 Likes

Thanks man you made my day, writing the mqtt and serial infos to configuration.yaml of zigbee2mqtt make it works. Also i had to replace localhost with the local IP address…

2 Likes

Hello, i am having the same problem but i am running HA in the HA yellow with an integraded Zigbee adapter. i am a nooby in this so i hope that anyone can help me :slight_smile:

this is the error i am getting:

info 2023-01-20 18:07:01: Logging to console and directory: ‘/config/zigbee2mqtt/log/2023-01-20.18-07-01’ filename: log.txt
info 2023-01-20 18:07:01: Starting Zigbee2MQTT version 1.29.2 (commit #unknown)
info 2023-01-20 18:07:01: Starting zigbee-herdsman (0.14.83-hotfix.0)
error 2023-01-20 18:07:21: Error while starting zigbee-herdsman
error 2023-01-20 18:07:21: Failed to start zigbee
error 2023-01-20 18:07:21: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
error 2023-01-20 18:07:21: Exiting…
error 2023-01-20 18:07:22: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:103:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
at Zigbee.start (/app/lib/zigbee.ts:58:27)
at Controller.start (/app/lib/controller.ts:101:27)
at start (/app/index.js:107:5)

and the configuration is:

This is the fix:

port: /dev/ttyACM0
adapter: deconz

Screenshot 2023-02-10 113945|539x500

2 Likes

thank you, it works for me :grinning:

Did you ever get this fixed. I have exactly the same error message, I can’t get z2m running.

I have it running perfectly with this config:

data_path: /config/zigbee2mqtt
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: {}
serial:
  port: /dev/ttyUSB0

However, I can’t remember the exact things I changed, so I guess this is as far as I can help.
But if you have a similar setup as me, you can try it out.

Hi guys have issue with configuration of zigbee2mqtt with skyconnect dongle
still getting this message

[19:58:58] INFO: Preparing to start…
[19:58:59] INFO: Socat not enabled
[19:59:00] INFO: Zigbee Herdsman debug logging enabled
[19:59:02] INFO: Starting Zigbee2MQTT…
Zigbee2MQTT:debug 2023-06-18 19:59:08: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info 2023-06-18 19:59:08: Logging to console and directory: ‘/config/zigbee2mqtt/log/2023-06-18.19-59-08’ filename: log.txt
Zigbee2MQTT:debug 2023-06-18 19:59:08: Removing old log directory ‘/config/zigbee2mqtt/log/2023-06-18.19-47-12’
Zigbee2MQTT:info 2023-06-18 19:59:08: Starting Zigbee2MQTT version 1.31.2 (commit #unknown)
Zigbee2MQTT:info 2023-06-18 19:59:09: Starting zigbee-herdsman (0.14.117)
Zigbee2MQTT:debug 2023-06-18 19:59:09: Using zigbee-herdsman with settings: ‘{“adapter”:{“concurrent”:null,“delay”:null,“disableLED”:false},“backupPath”:"/config/zigbee2mqtt/coordinator_backup.json",“databaseBackupPath”:"/config/zigbee2mqtt/database.db.backup",“databasePath”:"/config/zigbee2mqtt/database.db",“network”:{“channelList”:[11],“extendedPanID”:[221,221,221,221,221,221,221,221],“networkKey”:“HIDDEN”,“panID”:6754},“serialPort”:{“path”:"/dev/ttyUSB0"}}’
2023-06-18T17:59:09.437Z zigbee-herdsman:adapter Failed to validate path: ‘Error: spawn udevadm ENOENT’
2023-06-18T17:59:09.441Z zigbee-herdsman:controller:log Starting with options ‘{“network”:{“networkKeyDistribute”:false,“networkKey”:[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],“panID”:6754,“extendedPanID”:[221,221,221,221,221,221,221,221],“channelList”:[11]},“serialPort”:{“path”:"/dev/ttyUSB0"},“databasePath”:"/config/zigbee2mqtt/database.db",“databaseBackupPath”:"/config/zigbee2mqtt/database.db.backup",“backupPath”:"/config/zigbee2mqtt/coordinator_backup.json",“adapter”:{“disableLED”:false,“concurrent”:null,“delay”:null}}’
2023-06-18T17:59:09.444Z zigbee-herdsman:adapter:zStack:znp:log Opening SerialPort with {“path”:"/dev/ttyUSB0",“baudRate”:115200,“rtscts”:false,“autoOpen”:false}
Zigbee2MQTT:error 2023-06-18 19:59:09: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-06-18 19:59:09: Failed to start zigbee
Zigbee2MQTT:error 2023-06-18 19:59:09: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
Zigbee2MQTT:error 2023-06-18 19:59:09: Exiting…
Zigbee2MQTT:error 2023-06-18 19:59:09: Error: Error while opening serialport ‘Error: Error Resource temporarily unavailable Cannot lock port’
at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:75:22)
at /app/node_modules/@serialport/stream/dist/index.js:111:18

configuration as follows

data_path: /config/zigbee2mqtt
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: {}
serial:
port: /dev/ttyUSB0
zigbee_herdsman_debug: true

Just had to set it up with the same problem.
localhost didn’t work, so had to put in device ip (I’m running a RasPi4).
your_user and your_password is for the HA user set up for MQTT.

This made it work:

data_path: /config/zigbee2mqtt
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:
  server: mqtt://your_ip:1883
  user: your_user
  password: your_password
serial:
  port: >-
    /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_0262de24c214ed118c21bc8be054580b-if00-port0
  adapter: ezsp
1 Like

So cool, this fixed it for me!!! THANK YOU!!!

Dear all, I have read all the post carefully but still can’t solve my issue.

I can’t maintain my mqtt2zigbee installation up. I always get same error:

Zigbee2MQTT:error 2023-08-19 20:41:52: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-08-19 20:41:52: Failed to start zigbee
Zigbee2MQTT:error 2023-08-19 20:41:52: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-08-19 20:41:52: Exiting...
Zigbee2MQTT:error 2023-08-19 20:41:52: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyUSB0'
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/deconz/driver/driver.ts:200:28)
    at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:75:22)
    at /app/node_modules/@serialport/stream/dist/index.js:111:18

I think the origin of the error could be here:

Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyUSB0'
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/deconz/driver/driver.ts:200:28)
    at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:75:22)
    at /app/node_modules/@serialport/stream/dist/index.js:111:18

I get that error even after following the steps on this feed and can see properly the ttyUSB0 device when listing under dev$ directory.

Let me tell you that I’m running mosquito-mqtt docker with no issues under Synology NAS and that issue is after installing docker of zigbee2mqtt and try to start up the docker service.

Can someone help me to find the solution to my issue?

From the link in your post:

" Error: Resource temporarily unavailable Cannot lock port

This error occurs when another program is already using (and thus locking) the adapter. You can find out which via the following command: ls -l /proc/[0-9]/fd/ |grep /dev/ttyACM0 (replace /dev/ttyACM0 with your adapter port)."

Have you verified that you do not have something else accessing the port? ZHA for example?

serial:
port: >-
/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230525094313-if00
adapter: ezsp

worked for me finally

2 Likes

I have been struggling with the problem of inability to start for two weeks. I had over 30 devices configured over Z2M and, perfected the backup and restoration process of Z2M database (the only solution that worked was to delete the configuration files and reinstall Z2M addon). Today I noticed HA while booting said “starting ZHA” :smiley:
I removed ZHA and Z2M started up like nothing happened, so if your Zigbee2MQTT fails to start without reason, check your integrations pane and delete ZHA :sunny:

2 Likes

Here I am - with a similar problem, desperate for any help available.
I’ve installed Z2M but it fails to start something called “zigbee-herdsman” according to the log:

debug 2023-10-31 22:03:55: Can't load state from file /app/data/state.json (doesn't exist)
info  2023-10-31 22:03:55: Logging to console and directory: '/app/data/log/2023-10-31.22-03-55' filename: log.txt
info  2023-10-31 22:03:55: Starting Zigbee2MQTT version 1.33.1 (commit #7e63039)
info  2023-10-31 22:03:55: Starting zigbee-herdsman (0.19.0)
debug 2023-10-31 22:03:55: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/app/data/coordinator_backup.json","databaseBackupPath":"/app/data/database.db.backup","databasePath":"/app/data/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"path":"tcp://192.168.117:8888"}}'
error 2023-10-31 22:06:06: Error while starting zigbee-herdsman
error 2023-10-31 22:06:06: Failed to start zigbee
error 2023-10-31 22:06:06: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
error 2023-10-31 22:06:06: Exiting...
error 2023-10-31 22:06:06: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:198:24)
    at Socket.emit (node:events:526:35)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

I’ve installed Z2M on a QNAP NAS in a docker container. Here’s my compose yaml:

version: '3'
services:
  zigbee2mqtt:
    image: koenkk/zigbee2mqtt:latest
    restart: "no"
    ports:
      - 9080:8080
    environment:
      TZ: Europe/Oslo
    volumes:
      - /share/Public/Z2M:/app/data
      - /share/Public/Z2M/run/udev:/run/udev:ro
 

My ZigBee device is the Sonoff ZbBridge flashed with Tasmota 13.2.0 and the ncp-uart-nsw_6.7.9_115200 firmware. I’m using Blackadders ZHA Template and the Bridge runs just fine and the WebUI console shows all activities. Here’s my Z2M configuation.yaml file:

homeassistant: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.1.8:1883
serial:
  port: tcp://192.168.117:8888
frontend: true
advanced:
  log_level: debug
  network_key: GENERATE

My MQTT server is Mosquitto 2.0.4 and it has been running for a long time and works well.
Any help to resolve my issue is much apreciated.