Zigbee2MQTT container restarts permanently

Zigbee2MQTT was running perfectly, just rebooted the machine and it was offline. Looking at the Docker GUI it is coming up for 1-2sec, then restarting immediately.

So I did docker logs zigbee2mqtt which was giving me

Using '/app/data' as data directory

/app/node_modules/js-yaml/lib/loader.js:183
  return new YAMLException(message, mark);
         ^
YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key (9:7)

  6 | serial:
  7 |   port: /dev/ttyUSB0
  8 | frontend:true
  9 |   port: 8080
------------^
 10 | devices:
 11 |   '0xa4c13892dc7528d5':
    at generateError (/app/node_modules/js-yaml/lib/loader.js:183:10)
    at throwError (/app/node_modules/js-yaml/lib/loader.js:187:9)
    at readBlockMapping (/app/node_modules/js-yaml/lib/loader.js:1145:9)
    at composeNode (/app/node_modules/js-yaml/lib/loader.js:1441:12)
    at readDocument (/app/node_modules/js-yaml/lib/loader.js:1625:3)
    at loadDocuments (/app/node_modules/js-yaml/lib/loader.js:1688:5)
    at Object.load (/app/node_modules/js-yaml/lib/loader.js:1714:19)
    at Object.read (/app/lib/util/yaml.ts:7:21)
    at read (/app/lib/util/settings.ts:328:20)
    at getInternalSettings (/app/lib/util/settings.ts:433:21)

So let’s look at the Docker-Compose file

version: '3.8'
services:
  mqtt:
    container_name: mqtt
    image: eclipse-mosquitto:2.0
    restart: unless-stopped
    volumes:
      - "./mosquitto-data:/mosquitto"
    ports:
      - "1883:1883"
      - "9001:9001"
    command: "mosquitto -c /mosquitto-no-auth.conf"

  zigbee2mqtt:
    container_name: zigbee2mqtt
    restart: unless-stopped
    image: koenkk/zigbee2mqtt
    volumes:
      - ./zigbee2mqtt-data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - 8080:8080
    environment:
      - TZ=Europe/Berlin
    devices:
      - /dev/ttyUSB0:/dev/ttyUSB0

Zigbee2MQTT configuration yaml

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://mqtt:1883'
serial:
  port: /dev/ttyUSB0
frontend: true
  port: 8080
devices:
  '0xa4c13892dc7528d5':
    friendly_name: '0xa4c13892dc7528d5'
  '0x54ef441000712dae':
    friendly_name: '0x54ef441000712dae'

What I found/checked after previous research here:
USB-Stick (Coordinator) is properly connected, LED is on
No changes in the two devices connected
No added spaces / '/"
Switching off the two connected devices did not help

Any hint what I could try would be amazing

That’s not right, and not what the docs show.

It’s either:

frontend: true

or:

frontend:
  port: 8080
1 Like

Many thanks - now it is running! What is really weird: It used to run NOT when I had id like this the last time and actually needed the frontend: true to start. Now I removed it and it is up and running. Yes, according to the documentation.