Resolved: zigbee2mqtt crash

Hello,

following the 4.62 update, nothing works anymore :frowning:

The zigbee2mqtt web page is no longer accessible.

docker images
REPOSITORY               TAG       IMAGE ID       CREATED         SIZE
gladysassistant/gladys   v4        d052f365771b   3 days ago      1.41GB
koenkk/zigbee2mqtt       2.4.0     7706f8947dde   3 months ago    192MB
nodered/node-red         3.1       85c60175d24a   5 months ago    559MB
koenkk/zigbee2mqtt       1.42.0    b9ab0b017b28   9 months ago    120MB
koenkk/zigbee2mqtt       latest    b9ab0b017b28   9 months ago    120MB
containrrr/watchtower    latest    e7dd50d07b86   22 months ago   14.7MB
eclipse-mosquitto        2         97ac6de756a3   2 years ago     13.3MB
eclipse-mosquitto        2.0.15    2b1de2694efa   2 years ago     13.3MB
docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED         STATUS                    PORTS      NAMES
914acaeb7a22   gladysassistant/gladys:v4      "docker-entrypoint.s…"   6 hours ago     Up 11 minutes                        gladys
939ff965522a   containrrr/watchtower:latest   "/watchtower --clean…"   22 months ago   Up 11 minutes (healthy)   8080/tcp   watchtower
c61d905371cc   eclipse-mosquitto:2.0.15       "/docker-entrypoint.…"   2 years ago     Up 11 minutes                        eclipse-mosquitto
7ae91e628a97   eclipse-mosquitto:2.0.15       "/docker-entrypoint.…"   2 years ago     Up 11 minutes                        gladys-z2m-mqtt
docker run koenkk/zigbee2mqtt
Using '/app/data' as data directory
Creating configuration file...
Starting Zigbee2MQTT without watchdog.
[2025-09-26 06:56:00] info:     z2m: Logging to console, file (filename: log.log)
[2025-09-26 06:56:00] info:     z2m: Starting Zigbee2MQTT version 1.42.0 (commit #861cba6)
[2025-09-26 06:56:00] info:     z2m: Starting zigbee-herdsman (2.1.9)
[2025-09-26 06:56:00] error:    zh:zstack:znp: Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/dev/ttyACM0''
[2025-09-26 06:56:00] info:     zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyACM0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-09-26 06:56:00] error:    z2m: Error while starting zigbee-herdsman
[2025-09-26 06:56:00] error:    z2m: Failed to start zigbee
[2025-09-26 06:56:00] error:    z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2025-09-26 06:56:00] error:    z2m: Exiting...
[2025-09-26 06:56:00] error:    z2m: Error: Error: No such file or directory, cannot open /dev/ttyACM0

And the link to the documentation is a 404.
So the problem is /dev/ttyACM0.
I changed the yaml file to /dev/ttyUSB0

docker start -ai zigbee2mqtt
Using '/app/data' as data directory
Starting Zigbee2MQTT without watchdog.
[2025-09-26 09:09:00] info:     z2m: Logging to console, file (filename: log.log)
[2025-09-26 09:09:00] info:     z2m: Starting Zigbee2MQTT version 1.42.0 (commit #861cba6)
[2025-09-26 09:09:00] info:     z2m: Starting zigbee-herdsman (2.1.9)
[2025-09-26 09:09:01] info:     zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-09-26 09:09:01] info:     zh:zstack:znp: Serialport opened
[2025-09-26 09:09:01] info:     z2m: zigbee-herdsman started (resumed)
[2025-09-26 09:09:01] info:     z2m: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210120,"transportrev":2},"type":"zStack3x0"}'
[2025-09-26 09:09:01] info:     z2m: Currently 0 devices are joined.
[2025-09-26 09:09:01] info:     z2m: Zigbee: disabling joining new devices.
[2025-09-26 09:09:02] info:     z2m: Connecting to MQTT server at mqtt://localhost
[2025-09-26 09:09:02] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:02] error:    z2m: MQTT failed to connect, exiting... (connect ECONNREFUSED ::1:1883)
[2025-09-26 09:09:02] info:     z2m: Stopping zigbee-herdsman...
[2025-09-26 09:09:03] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:04] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:05] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:06] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:07] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:08] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:09] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:10] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:11] error:    z2m: MQTT error: connect ECONNREFUSED ::1:1883
[2025-09-26 09:09:11] info:     zh:controller: Wrote coordinator backup to '/app/data/coordinator_backup.json'
[2025-09-26 09:09:11] info:     zh:zstack:znp: closing
[2025-09-26 09:09:11] info:     zh:zstack:znp: Port closed
[2025-09-26 09:09:11] info:     z2m: Stopped zigbee-herdsman

I modified the yaml by replacing mqtt://localhost with mqtt://my_ip:1883

docker start -ai zigbee2mqtt
Using '/app/data' as data directory
Starting Zigbee2MQTT without watchdog.
[2025-09-26 11:10:34] info:     z2m: Logging to console, file (filename: log.log)
[2025-09-26 11:10:34] info:     z2m: Starting Zigbee2MQTT version 1.42.0 (commit #861cba6)
[2025-09-26 11:10:34] info:     z2m: Starting zigbee-herdsman (2.1.9)
[2025-09-26 11:10:35] info:     zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2025-09-26 11:10:35] info:     zh:zstack:znp: Serialport opened
[2025-09-26 11:10:35] info:     z2m: zigbee-herdsman started (resumed)
[2025-09-26 11:10:35] info:     z2m: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210120,"transportrev":2},"type":"zStack3x0"}'
[2025-09-26 11:10:35] info:     z2m: Currently 0 devices are joined.
[2025-09-26 11:10:35] info:     z2m: Zigbee: disabling joining new devices.
[2025-09-26 11:10:35] info:     z2m: Connecting to MQTT server at mqtt://x.x.x.x:1883
[2025-09-26 11:10:35] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:35] error:    z2m: MQTT failed to connect, exiting... (Connection refused: Not authorized)
[2025-09-26 11:10:35] info:     z2m: Stopping zigbee-herdsman...
[2025-09-26 11:10:36] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:37] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:38] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:39] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:40] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:41] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:42] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:44] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:45] error:    z2m: MQTT error: Connection refused: Not authorized
[2025-09-26 11:10:45] info:     zh:controller: Wrote coordinator backup to '/app/data/coordinator_backup.json'
[2025-09-26 11:10:45] info:     zh:zstack:znp: closing
[2025-09-26 11:10:45] info:     zh:zstack:znp: Port closed
[2025-09-26 11:10:45] info:     z2m: Stopped zigbee-herdsman

This is getting a bit much for me now :frowning:

Any idea how to fix all this?

Thanks!

PS, I rebooted several times just in case…

PS the zigbee2mqtt page in the documentation is not up to date.

Hi, you absolutely must not do that, the configuration was fine.

This is a mapping of the path inside the Docker container that never changes.

If your USB device has changed ports, you need to change it in the Zigbee2mqtt integration on the Gladys side, but you must never touch the files on the disk :smiley:

I see that the model of the Zigbee dongle is not selected in Gladys, is that normal?

Edit: Also, I don’t understand what you’re doing with all those commands; you shouldn’t do that if you’re in an installation managed by Gladys… :sweat_smile:

I wanted to try a few things before coming -_-
I put everything back the way it was.

Yes, I can’t find my key in the list…

lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:c821 Realtek Semiconductor Corp. Bluetooth Radio
Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I reboot and:
bc4b85e98c0e koenkk/zigbee2mqtt:2.6.1 "docker-entrypoint.s…" 30 minutes ago Up Less than a second gladys-z2m-zigbee2mqtt
it restarts every 20-30s

So there’s no point looking any further — if your key doesn’t appear, Zigbee2mqtt won’t be able to work!

You can try a few things: unplug/replug the key, restart the mini-PC (even if you’ve apparently already done so), but the key has to appear

The thing is that it’s properly detected by lsusb and that everything had been working for a while…
and if I’m not mistaken, gladys only offered the keys that it saw, right?

changing the port doesn’t change anything, lsusb still sees it but nothing particular in gladys.

Ah sorry, we misunderstood each other — I thought you couldn’t see the key with lsusb.

How did you start Gladys? With [the command from the site](Commencer avec Gladys | Gladys Assistant

No particular command that I can recall.

How can we find the command that was executed at startup?

This is really bad timing, I’m leaving for the weekend :frowning:

I sent you a PM with the output of docker inspect /gladys

The docker inspect looks fine to me, the container does have access to /dev:/dev to see the USB ports.

Are you available quickly for a call to sort this out together?

If so, I’ll send you a link privately

It was a DNS resolution problem…
Nothing to do with Gladys!

Thank you very much!

1 Like

Great that it’s working now — it was a good idea to call each other to debug it together; it’s often simpler! :grin:

Have a good weekend!