Error on start on docker
Bug Report
What happened
Docker environment: First start after creating container zigbee2mqtt refuses to start with an error. Second time starting the container zigbee2mqtt comes up.
What did you expect to happen
Clean start
How to reproduce it (minimal and precise)
Latest docker image - create and start container
Debug Info
zigbee2mqtt version: latest dev (zigbee2mqtt version 1.6.0 (commit #d53e133)) CC253X firmware version: latest
zigbee2mqqt debug log: https://pastebin.com/RNeTxrWP npm log: https://pastebin.com/EsZMUxss
Can you provide the logging with DEBUG=* npm start? (for docker set environment variable DEBUG to *)
Here you are (this is the "docker container logs <
The log in /app/data/log/2019-09-13.09-32-47/log.txt is rather unmeaning https://pastebin.com/bwa6XhqR
Can you check if the issue has been fixed in the latest dev branch?
Hello, I also have a problem using the newest docker image. I flashed my CC2530 with the latest Stack Firmware, then updated the zigbee2mqtt docker container (build 4 days ago). The container keeps crashing every time I start it.
Here is the part from docker-compose.yaml: `zigbee: container_name: zigbee2mqtt image: koenkk/zigbee2mqtt volumes: - ./zigbee2mqqt/data:/app/data devices: - /dev/ttyUSB0:/dev/ttyUSB0 restart: always networks: - fhem-network
networks: fhem-network: driver: bridge `
Here is the log from zigbee2mqtt
9/14/2019, 8:51:31 AM - info: Logging to directory: '/app/data/log/2019-09-14.08-51-31'
9/14/2019, 8:51:31 AM - info: Starting zigbee2mqtt version 1.6.0 (commit #e26ad2a)
9/14/2019, 8:51:31 AM - info: Starting zigbee-shepherd
9/14/2019, 8:51:33 AM - info: Error while starting zigbee-shepherd, attempting to fix... (takes 60 seconds) (Error: Cluster with key '64527' does not exist)
9/14/2019, 8:52:33 AM - info: Starting zigbee-shepherd
9/14/2019, 8:52:35 AM - error: Error while starting zigbee-shepherd! (Error: dev exists, unregister it first.)
And here the log from docker: `sing '/app/data' as data directory
[email protected] start /app node index.js
[32m zigbee2mqtt:info[39m 9/14/2019, 8:52:37 AM Logging to directory: '/app/data/log/2019-09-14.08-52-37'
[32m zigbee2mqtt:info[39m 9/14/2019, 8:52:37 AM Starting zigbee2mqtt version 1.6.0 (commit #e26ad2a)
[32m zigbee2mqtt:info[39m 9/14/2019, 8:52:37 AM Starting zigbee-shepherd
[32m zigbee2mqtt:info[39m 9/14/2019, 8:52:39 AM Error while starting zigbee-shepherd, attempting to fix... (takes 60 seconds) (Error: Cluster with key '64527' does not exist)
[32m zigbee2mqtt:info[39m 9/14/2019, 8:53:39 AM Starting zigbee-shepherd
[31m zigbee2mqtt:error[39m 9/14/2019, 8:53:40 AM Error while starting zigbee-shepherd! (Error: dev exists, unregister it first.)
[31m zigbee2mqtt:error[39m 9/14/2019, 8:53:40 AM Press the reset button on the stick (the one closest to the USB) and start again
[31m zigbee2mqtt:error[39m 9/14/2019, 8:53:40 AM Failed to start
{"message":"dev exists, unregister it first.","stack":"Error: dev exists, unregister it first.\n at /app/node_modules/zigbee-herdsman/dist/lib/shepherd.js:449:19\n at Promise.apply (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:1185:26)\n at Promise.promise.promiseDispatch (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:808:41)\n at /app/node_modules/zigbee-herdsman/node_modules/q/q.js:1411:14\n at runSingle (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:137:13)\n at flush (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:125:13)\n at process._tickCallback (internal/process/next_tick.js:61:11)"}
[31m zigbee2mqtt:error[39m 9/14/2019, 8:53:40 AM Exiting...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [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.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-09-14T08_53_40_769Z-debug.log Using '/app/data' as data directory
[email protected] start /app node index.js
[32m zigbee2mqtt:info[39m 9/14/2019, 8:53:43 AM Logging to directory: '/app/data/log/2019-09-14.08-53-42'
[32m zigbee2mqtt:info[39m 9/14/2019, 8:53:43 AM Starting zigbee2mqtt version 1.6.0 (commit #e26ad2a)
[32m zigbee2mqtt:info[39m 9/14/2019, 8:53:43 AM Starting zigbee-shepherd
[32m zigbee2mqtt:info[39m 9/14/2019, 8:53:44 AM Error while starting zigbee-shepherd, attempting to fix... (takes 60 seconds) (Error: Cluster with key '64527' does not exist)
[32m zigbee2mqtt:info[39m 9/14/2019, 8:54:44 AM Starting zigbee-shepherd
[31m zigbee2mqtt:error[39m 9/14/2019, 8:54:46 AM Error while starting zigbee-shepherd! (Error: dev exists, unregister it first.)
[31m zigbee2mqtt:error[39m 9/14/2019, 8:54:46 AM Press the reset button on the stick (the one closest to the USB) and start again
[31m zigbee2mqtt:error[39m 9/14/2019, 8:54:46 AM Failed to start
{"message":"dev exists, unregister it first.","stack":"Error: dev exists, unregister it first.\n at /app/node_modules/zigbee-herdsman/dist/lib/shepherd.js:449:19\n at Promise.apply (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:1185:26)\n at Promise.promise.promiseDispatch (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:808:41)\n at /app/node_modules/zigbee-herdsman/node_modules/q/q.js:1411:14\n at runSingle (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:137:13)\n at flush (/app/node_modules/zigbee-herdsman/node_modules/q/q.js:125:13)\n at process._tickCallback (internal/process/next_tick.js:61:11)"}
[31m zigbee2mqtt:error[39m 9/14/2019, 8:54:46 AM Exiting...
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [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.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-09-14T08_54_46_303Z-debug.log Using '/app/data' as data directory
[email protected] start /app node index.js
[32m zigbee2mqtt:info[39m 9/14/2019, 8:54:48 AM Logging to directory: '/app/data/log/2019-09-14.08-54-48' [32m zigbee2mqtt:info[39m 9/14/2019, 8:54:48 AM Starting zigbee2mqtt version 1.6.0 (commit #e26ad2a) [32m zigbee2mqtt:info[39m 9/14/2019, 8:54:48 AM Starting zigbee-shepherd [32m zigbee2mqtt:info[39m 9/14/2019, 8:54:50 AM Error while starting zigbee-shepherd, attempting to fix... (takes 60 seconds) (Error: Cluster with key '64527' does not exist)`
Thank you for your help!!!
@opl-git please check the dev branch.
@Koenkk Thank you for your effort.
Just pulled the latest dev. The error (failure on first start) seems to be disappeared. The log throws some strange errors but at least z2m runs through.
https://pastebin.com/KP6CYNzH
I'll do some more testing before closing the issue. Ok?
@3DIRK can you check if that issue also has been fixed?
Hello,
Same here.
CC2531 firmware version: latest
I use the latest dev hass.io plugin (zigbee2mqtt version 1.6.0 (commit #a987aff08187b974c9dea2730421d599efabc673)) and I get the same messages as the first issue : https://pastebin.com/wB3gMLYP
I can provide more log if needed.
Thanks
Hello j'ai un problem avec docker merci
root@pi:/home/pi# docker run \
-it
-v $(pwd)/data:/app/data
--device=/dev/ttyACM2
-e TZ=Europe/Amsterdam
koenkk/zigbee2mqtt Using '/app/data' as data directory
[email protected] start /app node index.js
zigbee2mqtt:info 9/16/2019, 10:54:12 PM Logging to directory: '/app/data/log/2019-09-16.22-54-10' zigbee2mqtt:info 9/16/2019, 10:54:12 PM Starting zigbee2mqtt version 1.6.0 (commit #e26ad2a) zigbee2mqtt:info 9/16/2019, 10:54:12 PM Starting zigbee-shepherd events.js:167 throw er; // Unhandled 'error' event ^
Error: Port is not open
at SerialPort.close (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/stream.js:425:29)
at Znp.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.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2019-09-16T20_54_12_610Z-debug.log
@Koenkk Bad news, the errors still persists --> https://pastebin.com/hx5jDCqe
- Small feature request: pls. remove non printable chars from logging as this log broke my console. ;-)
@3DIRK with what commit? I've done some more fixes yesterday (https://github.com/Koenkk/zigbee2mqtt/commit/ef7049f899d0ed136824be079a85087368e5045c)
@Koenkk still the same issue as @3DIRK with the latest Hass.io addon : version 1.6.0 (commit #14a9ec9f11e12ab43401b8c4945158965e0167e0)
https://pastebin.com/tszcKQwX
@Koenkk Latest. Should be d7401c817c6247f8020c13cc356378775797b9e5
@3DIRK why is the zigbee2mqtt logging missing from your pastebin? I only see the DEBUG logs.
@Koenkk These were the docker logs. /app/data/log/<DATE_TIME>/* was empty.
But I forgot to set "LOG_LEVEL = DEBUG" in configuration.yaml. So, created a new log --> https://pastebin.com/c5wgY6Dx /app/data/log/<DATE_TIME>/* is still empty.
Btw. how does "LOG_LEVEL = DEBUG" in configuration.yaml and "ENV DEBUG=*" in docker interact? What about the npm log (in the container) under /root?
@3DIRK I did another attempt to fix this, can you check again with latest dev?
@Koenkk Done. See here https://pastebin.com/HE6u1rQV
I think i found it, can you try again?
@Koenkk
Looks great. No error messages anymore.
https://pastebin.com/N93SFgUk
... but wait: now I do not get any logs (neither docker stdout / stderror nor /app/data/log/*). configuration.yaml says "log_level: DEBUG"