Zigbee2mqtt Error while starting zigbee-herdsman

Tags: #<Tag:0x00007f73917cd100>


I having the following error in the zigbee2mqtt repeatedly:

Zigbee2MQTT:info  2020-09-07 15:43:34: Logging to console and directory: '/share/zigbee2mqtt/log/2020-09-07.15-43-33' filename: log.txt
Zigbee2MQTT:info  2020-09-07 15:43:46: Starting Zigbee2MQTT version 1.14.4 (commit #unknown)
Zigbee2MQTT:info  2020-09-07 15:43:46: Starting zigbee-herdsman...
Zigbee2MQTT:error 2020-09-07 15:43:49: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2020-09-07 15:43:49: Failed to start zigbee
Zigbee2MQTT:error 2020-09-07 15:43:49: Exiting...
Zigbee2MQTT:error 2020-09-07 15:43:49: Error: Error while opening serialport 'Error: Error Resource temporarily unavailable Cannot lock port'
    at Znp.<anonymous> (/zigbee2mqtt-1.14.4/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:136:32)
    at Generator.next (<anonymous>)
    at /zigbee2mqtt-1.14.4/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/zigbee2mqtt-1.14.4/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
    at SerialPort.<anonymous> (/zigbee2mqtt-1.14.4/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)
    at SerialPort._error (/zigbee2mqtt-1.14.4/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
    at /zigbee2mqtt-1.14.4/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
npm ERR! 
errno 1
 [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script.
npm ERR!
 This is probably not a problem with npm. There is likely additional logging output above.
 ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-07T12_43_49_644Z-debug.log
2020-09-07T15:43:51: PM2 log: App [npm:0] exited with code [1] via signal [SIGINT]
2020-09-07T15:43:51: PM2 log: App [npm:0] starting in -fork mode-
2020-09-07T15:43:52: PM2 log: App [npm:0] online
> [email protected] start /zigbee2mqtt-1.14.4
> node index.js

I get this sometimes when I reboot, never worked out why, but to fix it (presuming your problem is the same as mine) stop the addon, unplug the USB, count to 10, plug it back in, restart the addon.

If that doesn’t work I’m out of suggestions, but always works for me here.

Thank you. I can remove the issue by restart of zigbee2mqtt addon. However, it resurfaces again in few days.I don’t know what triggers it!

Nor me. As I say it only happens for me after reboots, and even then it’s only occasionally so I have no idea :man_shrugging: