Docker Zigbee2MQTT error

Hello,

I am having an error with Zigbee2MQTT.

docker logs gladys-z2m-zigbee2mqtt
Using '/app/data' as data directory
Zigbee2MQTT:info  2021-08-11 10:14:29: Logging to console and directory: '/app/data/log/2021-08-11.10-14-27' filename: log.txt
Zigbee2MQTT:info  2021-08-11 10:14:29: Starting Zigbee2MQTT version 1.19.1 (commit #9bd4693)
Zigbee2MQTT:info  2021-08-11 10:14:29: Starting zigbee-herdsman (0.13.111)
Zigbee2MQTT:info  2021-08-11 10:14:32: zigbee-herdsman started
Zigbee2MQTT:info  2021-08-11 10:14:32: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210120,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2021-08-11 10:14:32: Currently 9 devices are joined:
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d0003d43a15 (0x00158d0003d43a15): WXKG01LM - Xiaomi MiJia wireless switch (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d0002a65e93 (0x00158d0002a65e93): MCCGQ01LM - Xiaomi MiJia door & window contact sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d00044f23e9 (0x00158d00044f23e9): MCCGQ01LM - Xiaomi MiJia door & window contact sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d0002a6e6e6 (0x00158d0002a6e6e6): MCCGQ01LM - Xiaomi MiJia door & window contact sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d00044f24a8 (0x00158d00044f24a8): MCCGQ01LM - Xiaomi MiJia door & window contact sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d000247747b (0x00158d000247747b): RTCGQ01LM - Xiaomi MiJia human body movement sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d00024773c2 (0x00158d00024773c2): RTCGQ01LM - Xiaomi MiJia human body movement sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d0006d5736c (0x00158d0006d5736c): WSDCGQ11LM - Xiaomi Aqara temperature, humidity and pressure sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: 0x00158d0006e4902e (0x00158d0006e4902e): WSDCGQ11LM - Xiaomi Aqara temperature, humidity and pressure sensor (EndDevice)
Zigbee2MQTT:info  2021-08-11 10:14:32: Zigbee: disabling joining new devices.
Zigbee2MQTT:info  2021-08-11 10:14:32: Started frontend on port 0.0.0.0:8080
events.js:353
      throw er; // Unhandled 'error' event
      ^
Error: listen EADDRINUSE: address already in use 0.0.0.0:8080
    at Server.setupListenHandle [as _listen2] (net.js:1318:16)
    at listenInCluster (net.js:1366:12)
    at doListen (net.js:1503:7)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)
Emitted 'error' event on Server instance at:
    at emitErrorNT (net.js:1345:8)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  code: 'EADDRINUSE',
  errno: -98,
  syscall: 'listen',
  address: '0.0.0.0',
  port: 8080
}

It seems to be blocking related elements, I no longer receive new values.

My key is a zzh!.

Any ideas?

Thanks :slight_smile:

Hello, the error Error: listen EADDRINUSE: address already in use 0.0.0.0:8080 indicates that a process is already using port 8080. Indeed, the container gladys-z2m-zigbee2mqtt exposes a debug interface.

Two solutions are available:

  • identify the process (external to Gladys) and change its port
  • modify the configuration.yaml file in /var/lib/gladysassistant/zigbee2mqtt/z2m and restart the container
frontend:
  port: 8080

Thanks a lot, indeed, by changing the port in the configuration file, everything works again :slight_smile:

In my opinion, the one already using port 8080 is the watcher for the update.

Hi, no because in the official gladys image there are all these containers and it doesn’t prevent the zigbee service from working :wink:

It’s strange, because it’s the only recent thing I’ve done that clearly uses port 8080.

In any case, manually changing the port worked very well :slight_smile:

And for the record, since I changed the port, the Gladys update went smoothly whereas nothing was happening before…