Zigbee2MQTT setup - 502 Bad Gateway

Hi,

Sort of a newbie to this all. So I have replaced my Sonoff dongle with a SLZB-06M (I was using ZHA Zigbee integration before) I wanted to start to use Zigbee2MQTT but unable to get it working. I get a 502 Bad Gateway error. I removed any old data I could (or so I hope). I installed MQTT and Zigbee2MQTT and followed this guy’s link for setup.

https://thebloody.cloud/posts/Installing-Zigbee2MQTT/

I’ve tried this at least twice and checked my configuration but not sure what I am missing?

mosquitto log:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[23:18:50] INFO: Certificates found: SSL is available
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
[23:18:51] INFO: Starting NGINX for authentication handling...
[23:18:51] INFO: Starting mosquitto MQTT broker...
2025-05-24 23:18:51: Warning: Mosquitto should not be run as root/administrator.
2025-05-24 23:18:51: mosquitto version 2.0.21 starting
2025-05-24 23:18:51: Config loaded from /etc/mosquitto/mosquitto.conf.
2025-05-24 23:18:51: Loading plugin: /usr/share/mosquitto/go-auth.so
2025-05-24 23:18:51:  ├── Username/password checking enabled.
2025-05-24 23:18:51:  ├── TLS-PSK checking enabled.
2025-05-24 23:18:51:  └── Extended authentication not enabled.
2025-05-24 23:18:51: Opening ipv4 listen socket on port 1883.
2025-05-24 23:18:51: Opening ipv6 listen socket on port 1883.
2025-05-24 23:18:51: Opening websockets listen socket on port 1884.
s6-rc: info: service legacy-services successfully started
2025-05-24 23:18:51: Opening ipv4 listen socket on port 8883.
2025-05-24 23:18:51: Opening ipv6 listen socket on port 8883.
2025-05-24 23:18:51: Opening websockets listen socket on port 8884.
2025-05-24 23:18:51: mosquitto version 2.0.21 running
2025-05-24 23:18:51: New connection from ::1:37302 on port 1883.
2025-05-24 23:18:51: Client <unknown> disconnected due to protocol error.
[23:18:51] INFO: Successfully send discovery information to Home Assistant.
[23:18:51] INFO: Successfully send service information to the Supervisor.
2025-05-24 23:19:40: New connection from 172.30.32.2:46440 on port 1883.
2025-05-24 23:19:40: Client <unknown> closed its connection.
2025-05-24 23:21:40: New connection from 172.30.32.2:34150 on port 1883.
2025-05-24 23:21:40: Client <unknown> closed its connection.
2025-05-24 23:23:40: New connection from 172.30.32.2:42418 on port 1883.
2025-05-24 23:23:40: Client <unknown> closed its connection.
2025-05-24 23:25:40: New connection from 172.30.32.2:51526 on port 1883.
2025-05-24 23:25:40: Client <unknown> closed its connection.
2025-05-24 23:27:40: New connection from 172.30.32.2:33890 on port 1883.
2025-05-24 23:27:40: Client <unknown> closed its connection.
2025-05-24 23:29:40: New connection from 172.30.32.2:34784 on port 1883.
2025-05-24 23:29:40: Client <unknown> closed its connection.
2025-05-24 23:31:40: New connection from 172.30.32.2:58694 on port 1883.
2025-05-24 23:31:40: Client <unknown> closed its connection.
2025-05-24 23:33:40: New connection from 172.30.32.2:55488 on port 1883.
2025-05-24 23:33:40: Client <unknown> closed its connection.
2025-05-24 23:35:40: New connection from 172.30.32.2:39848 on port 1883.
2025-05-24 23:35:40: Client <unknown> closed its connection.
2025-05-24 23:37:40: New connection from 172.30.32.2:59312 on port 1883.
2025-05-24 23:37:40: Client <unknown> closed its connection.
2025-05-24 23:39:40: New connection from 172.30.32.2:59732 on port 1883.
2025-05-24 23:39:40: Client <unknown> closed its connection.
2025-05-24 23:41:40: New connection from 172.30.32.2:33304 on port 1883.
2025-05-24 23:41:40: Client <unknown> closed its connection.
2025-05-24 23:43:40: New connection from 172.30.32.2:55260 on port 1883.
2025-05-24 23:43:40: Client <unknown> closed its connection.
2025-05-24 23:45:40: New connection from 172.30.32.2:58994 on port 1883.
2025-05-24 23:45:40: Client <unknown> closed its connection.
2025-05-24 23:47:40: New connection from 172.30.32.2:34048 on port 1883.
2025-05-24 23:47:40: Client <unknown> closed its connection.
2025-05-24 23:48:52: Saving in-memory database to /data//mosquitto.db.
2025-05-24 23:49:40: New connection from 172.30.32.2:40716 on port 1883.
2025-05-24 23:49:40: Client <unknown> closed its connection.
2025-05-24 23:51:40: New connection from 172.30.32.2:46984 on port 1883.
2025-05-24 23:51:40: Client <unknown> closed its connection.
2025-05-24 23:53:40: New connection from 172.30.32.2:39932 on port 1883.
2025-05-24 23:53:40: Client <unknown> closed its connection.
2025-05-24 23:55:40: New connection from 172.30.32.2:42804 on port 1883.

log from Zigbee2MQTT addon:

[23:17:36] INFO: Preparing to start...
[23:17:36] INFO: Socat not enabled
[23:17:36] ERROR: Got unexpected response from the API: Service not enabled
[23:17:36] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
Onboarding page is available at http://0.0.0.0:8099/
{"homeassistant":{"enabled":true,"discovery_topic":"homeassistant","status_topic":"homeassistant/status","legacy_action_sensor":false,"experimental_event_entities":false},"availability":{"enabled":false,"active":{"timeout":10,"max_jitter":30000,"backoff":true,"pause_on_backoff_gt":0},"passive":{"timeout":1500}},"frontend":{"enabled":true,"port":8099,"base_url":"/"},"mqtt":{"base_topic":"zigbee2mqtt","include_device_information":false,"force_disable_retain":false,"maximum_packet_size":1048576,"server":"mqtt://localhost:1883"},"serial":{"disable_led":false},"passlist":[],"blocklist":[],"map_options":{"graphviz":{"colors":{"fill":{"enddevice":"#fff8ce","coordinator":"#e04e5d","router":"#4ea3e0"},"font":{"coordinator":"#ffffff","router":"#ffffff","enddevice":"#000000"},"line":{"active":"#009900","inactive":"#994444"}}}},"ota":{"update_check_interval":1440,"disable_automatic_update_check":false,"image_block_response_delay":250,"default_maximum_data_size":50},"device_options":{},"advanced":{"log_rotation":true,"log_console_json":false,"log_symlink_current":false,"log_output":["console","file"],"log_directory":"/config/zigbee2mqtt/log/%TIMESTAMP%","log_file":"log.log","log_level":"info","log_namespaced_levels":{},"log_syslog":{},"log_debug_to_mqtt_frontend":false,"log_debug_namespace_ignore":"","log_directories_to_keep":10,"pan_id":"GENERATE","ext_pan_id":"GENERATE","channel":11,"cache_state":true,"cache_state_persistent":true,"cache_state_send_on_startup":true,"last_seen":"disable","elapsed":false,"network_key":"GENERATE","timestamp_format":"YYYY-MM-DD HH:mm:ss","output":"json"},"version":4,"devices":{},"groups":{}}
{"serial_port":"/dev/ttyUSB0","serial_adapter":"ember","serial_baudrate":"115200","network_channel":"11","network_key":"GENERATE","network_pan_id":"GENERATE","network_ext_pan_id":"GENERATE","mqtt_base_topic":"zigbee2mqtt","mqtt_server":"mqtt://localhost:1883","mqtt_user":"","mqtt_password":"","homeassistant_enabled":"on","log_level":"info"}
[2025-05-25 11:33:57] info: 	z2m: Logging to console, file (filename: log.log)
[2025-05-25 11:33:57] info: 	z2m: Starting Zigbee2MQTT version 2.3.0 (commit #unknown)
[2025-05-25 11:33:57] info: 	z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-25 11:33:57] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"a6f6f0ae8a38ef1196dd357af3d9b1e5","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0","vendorId":"10c4","productId":"ea60"} => ember: 4
[2025-05-25 11:33:57] info: 	zh:ember: Using default stack config.
[2025-05-25 11:33:57] info: 	zh:ember: ======== Ember Adapter Starting ========
[2025-05-25 11:33:57] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash: ASH COUNTERS since last clear:
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Total frames: RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Cancelled   : RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   DATA frames : RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   DATA bytes  : RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Retry frames: RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   ACK frames  : RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   NAK frames  : RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   CRC errors      : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Comm errors     : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2025-05-25 11:33:57] error: 	zh:ember:uart:ash: Failed to init port with error Error: Error Resource temporarily unavailable Cannot lock port
[2025-05-25 11:33:57] error: 	z2m: Error while starting zigbee-herdsman
[2025-05-25 11:33:57] error: 	z2m: Failed to start zigbee-herdsman
[2025-05-25 11:33:57] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 11:33:57] error: 	z2m: Exiting...
[2025-05-25 11:33:57] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:666:19)
    at EmberAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1548:24)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
    at Controller.start (/app/lib/controller.ts:104:13)
    at start (/app/index.js:149:5)
[11:33:57] INFO: Preparing to start...
[11:33:57] INFO: Socat not enabled
[11:33:57] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-05-25 11:33:58] info: 	z2m: Logging to console, file (filename: log.log)
[2025-05-25 11:33:58] info: 	z2m: Starting Zigbee2MQTT version 2.3.0 (commit #unknown)
[2025-05-25 11:33:58] info: 	z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-25 11:33:58] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"a6f6f0ae8a38ef1196dd357af3d9b1e5","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0","vendorId":"10c4","productId":"ea60"} => ember: 4
[2025-05-25 11:33:58] info: 	zh:ember: Using default stack config.
[2025-05-25 11:33:58] info: 	zh:ember: ======== Ember Adapter Starting ========
[2025-05-25 11:33:58] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash: ASH COUNTERS since last clear:
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Total frames: RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Cancelled   : RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   DATA frames : RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   DATA bytes  : RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Retry frames: RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   ACK frames  : RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   NAK frames  : RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   CRC errors      : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Comm errors     : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2025-05-25 11:33:58] error: 	zh:ember:uart:ash: Failed to init port with error Error: Error Resource temporarily unavailable Cannot lock port
[2025-05-25 11:33:58] error: 	z2m: Error while starting zigbee-herdsman
[2025-05-25 11:33:58] error: 	z2m: Failed to start zigbee-herdsman
[2025-05-25 11:33:58] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 11:33:58] error: 	z2m: Exiting...
[2025-05-25 11:33:58] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:666:19)
    at EmberAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1548:24)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
    at Controller.start (/app/lib/controller.ts:104:13)
    at start (/app/index.js:149:5)
[11:33:59] INFO: Preparing to start...
[11:33:59] INFO: Socat not enabled
[11:33:59] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2025-05-25 11:33:57] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2025-05-25 11:33:57] error: 	zh:ember:uart:ash: Failed to init port with error Error: Error Resource temporarily unavailable Cannot lock port
[2025-05-25 11:33:57] error: 	z2m: Error while starting zigbee-herdsman
[2025-05-25 11:33:57] error: 	z2m: Failed to start zigbee-herdsman
[2025-05-25 11:33:57] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 11:33:57] error: 	z2m: Exiting...
[2025-05-25 11:33:57] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:666:19)
    at EmberAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1548:24)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
    at Controller.start (/app/lib/controller.ts:104:13)
    at start (/app/index.js:149:5)
[11:33:57] INFO: Preparing to start...
[11:33:57] INFO: Socat not enabled
[11:33:57] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-05-25 11:33:58] info: 	z2m: Logging to console, file (filename: log.log)
[2025-05-25 11:33:58] info: 	z2m: Starting Zigbee2MQTT version 2.3.0 (commit #unknown)
[2025-05-25 11:33:58] info: 	z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-25 11:33:58] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"a6f6f0ae8a38ef1196dd357af3d9b1e5","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0","vendorId":"10c4","productId":"ea60"} => ember: 4
[2025-05-25 11:33:58] info: 	zh:ember: Using default stack config.
[2025-05-25 11:33:58] info: 	zh:ember: ======== Ember Adapter Starting ========
[2025-05-25 11:33:58] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-05-25 11:33:58] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
========
[2025-05-25 11:33:58] error: 	zh:ember:uart:ash: Failed to init port with error Error: Error Resource temporarily unavailable Cannot lock port
[2025-05-25 11:33:58] error: 	z2m: Error while starting zigbee-herdsman
[2025-05-25 11:33:58] error: 	z2m: Failed to start zigbee-herdsman
[2025-05-25 11:33:58] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 11:33:58] error: 	z2m: Exiting...
[2025-05-25 11:33:58] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:666:19)
    at EmberAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1548:24)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
    at Controller.start (/app/lib/controller.ts:104:13)
    at start (/app/index.js:149:5)
[11:33:59] INFO: Preparing to start...
[11:33:59] INFO: Socat not enabled
[11:33:59] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-05-25 11:34:00] info: 	z2m: Logging to console, file (filename: log.log)
[2025-05-25 11:34:00] info: 	z2m: Starting Zigbee2MQTT version 2.3.0 (commit #unknown)
[2025-05-25 11:34:00] info: 	z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-25 11:34:00] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"a6f6f0ae8a38ef1196dd357af3d9b1e5","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0","vendorId":"10c4","productId":"ea60"} => ember: 4
[2025-05-25 11:34:00] info: 	zh:ember: Using default stack config.
[2025-05-25 11:34:00] info: 	zh:ember: ======== Ember Adapter Starting ========
[2025-05-25 11:34:00] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash: ASH COUNTERS since last clear:
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Total frames: RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Cancelled   : RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   DATA frames : RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   DATA bytes  : RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Retry frames: RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   ACK frames  : RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   NAK frames  : RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   CRC errors      : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Comm errors     : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2025-05-25 11:34:00] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2025-05-25 11:34:00] error: 	zh:ember:uart:ash: Failed to init port with error Error: Error Resource temporarily unavailable Cannot lock port
[2025-05-25 11:34:00] error: 	z2m: Error while starting zigbee-herdsman
[2025-05-25 11:34:00] error: 	z2m: Failed to start zigbee-herdsman
[2025-05-25 11:34:00] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 11:34:00] error: 	z2m: Exiting...
[2025-05-25 11:34:00] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:666:19)
    at EmberAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1548:24)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
    at Controller.start (/app/lib/controller.ts:104:13)
    at start (/app/index.js:149:5)
[11:34:01] INFO: Preparing to start...
[11:34:01] INFO: Socat not enabled
[11:34:01] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-05-25 11:34:02] info: 	z2m: Logging to console, file (filename: log.log)
[2025-05-25 11:34:02] info: 	z2m: Starting Zigbee2MQTT version 2.3.0 (commit #unknown)
[2025-05-25 11:34:02] info: 	z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-25 11:34:02] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"a6f6f0ae8a38ef1196dd357af3d9b1e5","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0","vendorId":"10c4","productId":"ea60"} => ember: 4
[2025-05-25 11:34:02] info: 	zh:ember: Using default stack config.
[2025-05-25 11:34:02] info: 	zh:ember: ======== Ember Adapter Starting ========
[2025-05-25 11:34:02] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash: ASH COUNTERS since last clear:
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Total frames: RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Cancelled   : RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   DATA frames : RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   DATA bytes  : RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Retry frames: RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   ACK frames  : RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   NAK frames  : RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   CRC errors      : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Comm errors     : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2025-05-25 11:34:02] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2025-05-25 11:34:02] error: 	zh:ember:uart:ash: Failed to init port with error Error: Error Resource temporarily unavailable Cannot lock port
[2025-05-25 11:34:02] error: 	z2m: Error while starting zigbee-herdsman
[2025-05-25 11:34:02] error: 	z2m: Failed to start zigbee-herdsman
[2025-05-25 11:34:02] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 11:34:02] error: 	z2m: Exiting...
[2025-05-25 11:34:02] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.
    at EmberAdapter.initEzsp (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:666:19)
    at EmberAdapter.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/adapter/ember/adapter/emberAdapter.ts:1548:24)
    at Controller.start (/app/node_modules/.pnpm/[email protected]/node_modules/zigbee-herdsman/src/controller/controller.ts:133:29)
    at Zigbee.start (/app/lib/zigbee.ts:70:27)
    at Controller.start (/app/lib/controller.ts:104:13)
    at start (/app/index.js:149:5)
[11:34:02] INFO: Preparing to start...
[11:34:02] INFO: Socat not enabled
[11:34:02] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2025-05-25 11:34:03] info: 	z2m: Logging to console, file (filename: log.log)
[2025-05-25 11:34:03] info: 	z2m: Starting Zigbee2MQTT version 2.3.0 (commit #unknown)
[2025-05-25 11:34:03] info: 	z2m: Starting zigbee-herdsman (4.0.0)
[2025-05-25 11:34:03] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"a6f6f0ae8a38ef1196dd357af3d9b1e5","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0","vendorId":"10c4","productId":"ea60"} => ember: 4
[2025-05-25 11:34:03] info: 	zh:ember: Using default stack config.
[2025-05-25 11:34:03] info: 	zh:ember: ======== Ember Adapter Starting ========
[2025-05-25 11:34:03] info: 	zh:ember:ezsp: ======== EZSP starting ========
[2025-05-25 11:34:03] info: 	zh:ember:uart:ash: ======== ASH Adapter reset ========
[2025-05-25 11:34:03] info: 	zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash: ASH COUNTERS since last clear:
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Total frames: RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Cancelled   : RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   DATA frames : RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   DATA bytes  : RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Retry frames: RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   ACK frames  : RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   NAK frames  : RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   nRdy frames : RX=0, TX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   CRC errors      : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Comm errors     : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Length < minimum: RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Length > maximum: RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Bad controls    : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Bad lengths     : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Bad ACK numbers : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Out of buffers  : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Retry dupes     : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   Out of sequence : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash:   ACK timeouts    : RX=0
[2025-05-25 11:34:04] info: 	zh:ember:uart:ash: ======== ASH stopped ========
[2025-05-25 11:34:04] error: 	zh:ember:uart:ash: Failed to init port with error Error: Error Resource temporarily unavailable Cannot lock port
[2025-05-25 11:34:04] error: 	z2m: Error while starting zigbee-herdsman
[2025-05-25 11:34:04] error: 	z2m: Failed to start zigbee-herdsman
[2025-05-25 11:34:04] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start_crashes-runtime.html for possible solutions
[2025-05-25 11:34:04] error: 	z2m: Exiting...
[2025-05-25 11:34:04] error: 	z2m: Error: Failed to start EZSP layer with status=HOST_FATAL_ERROR.

I looked up the zigbee-herdsman failure (that was in the log) but not finding a fix that seems to work for me. I am getting a host failure. I’ve doublechecked my configuration, but can’t seem to find anythign that looks out of place when compared to what the link I used for setup of Zigbee2MQTT article mentioned. Anyone have any ideas?? I know I am new to Zigbee2MQTT so maybe I’m missing something obvious, but can’t seem to narrow it down! Is it some legacy config info for my old Sonoff that coudl be doing it? I did delete any old reference to it in my config file (or so I believe).

Did you try a total reboot of the host?
Check also your coordinator, the address and port match the one you configured?

Yes, looks like your old one is already in the new config, check all the settings or start from scratch:

[2025-05-25 11:34:03] info: 	zh:adapter:discovery: Matched adapter: {"path":"/dev/ttyUSB0","manufacturer":"Itead","serialNumber":"a6f6f0ae8a38ef1196dd357af3d9b1e5","pnpId":"usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0","vendorId":"10c4","productId":"ea60"} => ember: 4

I guess you removed the old one from the host, right?

And remember to stop the addon before making changes to the config.

1 Like

Thanks for pointing that out - I’m trying to dig now thru HA and check where I can remove it from. I did go into hardware, and yes indeed, it’s still showing as a connected device though I’ve physically removed it and deleted any addons related to it. I didn’t find anything in my config.yaml referring to it, and checking my zigbee folder (via file editor) and seeing if I can find any entries. Checking any of my VM settings as well (running HA via virtual on Virtualbox

Have you looked at the dashboard for the SLZB-06? There is a config editor built in.

Hi,

Yeah, I did use that to help configure Zigbee2MQTT and the configuration yaml does reflect that configuration

This is my SLZB-06 config. I have an extra M that I can use to compare settings.

homeassistant:
  enabled: true
advanced:
  network_key:
    - 80
    - 199
    - 35
    - 139
    - 86
    - 124
    - 114
    - 175
    - 158
    - 101
    - 153
    - 89
    - 249
    - 66
    - 74
    - 230
  pan_id: 25213
  ext_pan_id:
    - 90
    - 147
    - 117
    - 201
    - 99
    - 12
    - 68
    - 73
mqtt:
  server: mqtt://core-mosquitto:1883
  user: addons
  password: xxxxxxxxx
  base_topic: zigbee2mqtt_1
frontend:
  enabled: true
  port: 8099
serial:
  port: tcp://192.168.50.40:6638
  adapter: zstack
  baudrate: 115200
  rtscts: false
device_options: {}
devices:

Is the adapter discovered in Integrations?

1 Like

Yes, it is detected in integrations and I do have it added. I do currently have my devices (initially I have the motion sensors [aqara] added via ZHA. Do you think maybe if I delete all the devices, remove the Zigbee integration and then try-readding maybe it should wipe out any orphaned entries pointing to the now retired Sonoff?

I think that is a logical step because HA is seeing the device. Check this out…

Deleting the state.json file in the Z2M folder fixed the conflict for most folks.

There is a port conflict as @mcarty mentioned earlier and based on the error log it still looking for the USB device.

{“path”:“/dev/ttyUSB0”,“manufacturer”:“Itead”,“serialNumber”:“a6f6f0ae8a38ef1196dd357af3d9b1e5”,“pnpId”:“usb-Itead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_V2_a6f6f0ae8a38ef1196dd357af3d9b1e5-if00-port0”,“vendorId”:“10c4”,“productId”:“ea60”} => ember: 4

Ensure ZHA isn’t installed and I’d start from scratch with Z2M. I’d suggest verifying the Z2M folder doesn’t exist after the uninstall.
image

1 Like

thanks for the helpful info. I did in fact delete everything (the slzb-06m integration, zigbee integration, and deleted the entire zigbee2mqtt folder as well (didn’t find a json file in there interesting enough) and then started from scratch. Same thing: 502 Bad Gateway. I even went into my VM settings → USB, and removed any mention of the sonoff under there. Rebooted twice, and still getting the same error. This is really strange! The retired Sonoff must still be referenced somewhere, but for the life of me, I can’t seem to find it anywhere I look :frowning:

ZHA is uninstalled, correct?

Look through that list of installed devices and services. If you do see it listed. Then delete it and restart your HA instance afterwards.

Your photo shows it is installed

ZHA and Z2M can’t run on the same coordinator. It creates a port conflict.

1 Like

You are a godsend my friend!! Thank you :slight_smile: So it looks like ZHA was still enabled. I did go in and delete everything per the article you linked to (I don’t know why that one hadn’t come up in my search earlier regarding 502 Bad Gateway error, but that one was SO helpful or got me on the right path (I hadn’t previously removed the zigbee.db as I wasn’t sure if it was needed to be, but once I removed everything including that, and then rebooted, and then started from scratch (ignoring the ZHA integration that prompted to be added in integration) and setup the SLZB-06M from scratch and followed the article I previously referred to everything worked flawlessly! Thanks again, I’m happy to finally have it working - just now need to add on re-adding those zigbee devices that were in ZHA before.

1 Like

I am happy to assist knowing how frustrating ZigBee installs can be.

If you can, please take the time to mark my previous post as the Solution.

That will ensure this thread is closed out and more importantly, useful to other users who encounter similar issues.

on a side note….Welcome to the HA community!

1 Like

The error log in your first post literally links you to this.
Point 4 of that page tells you to make sure ZHA is disabled.

You could have fixed your issue in 5 minutes if you’d taken the time to read the error on the screen & pasted the link in the logs.