zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Cant start z2m after upgrade to version: 1.37.0-1 get 502: bad gateway

Open mickt34 opened this issue 1 year ago • 16 comments

What happened?

Upgraded to 1.37.0-1 nothing else has been changed for months

What did you expect to happen?

To start correctly after the upgrade.

How to reproduce it (minimal and precise)

Just upgraded thats all

Zigbee2MQTT version

1.37.0-1

Adapter firmware version

Core 2024.5.0 Supervisor 2024.04.4 Operating System 12.2 Frontend 20240501.0

Adapter

/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0

Setup

Add-on via hacs on raspi 8gb ssd disk

Debug log

[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [20,0,0,0] - 67
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":20}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvRead - {"sysid":1,"itemid":4,"subid":199,"offset":0,"len":20}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,8,33,51,1,4,0,199,0,0,0,20,204]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,22,97,51,0,20,97,10,0,0,178,0,0,0,43,0,27,254,255,129,246,140,2,0,9,0,72]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,22,97,51,0,20,97,10,0,0,178,0,0,0,43,0,27,254,255,129,246,140,2,0,9,0,72]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 22 - 3 - 1 - 51 - [0,20,97,10,0,0,178,0,0,0,43,0,27,254,255,129,246,140,2,0,9,0] - 72
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvRead - {"status":0,"len":20,"value":{"type":"Buffer","data":[97,10,0,0,178,0,0,0,43,0,27,254,255,129,246,140,2,0,9,0]}}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvLength - {"sysid":1,"itemid":4,"subid":200}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,5,33,50,1,4,0,200,0,219]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,4,97,50,0,0,0,0,87]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,4,97,50,0,0,0,0,87]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [0,0,0,0] - 87
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":0}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:backup: fetched adapter tclk table (capacity=20, used=20)
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvLength - {"sysid":1,"itemid":7,"subid":0}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,5,33,50,1,7,0,0,0,16]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [12,0,0,0] - 91
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvRead - {"sysid":1,"itemid":7,"subid":0,"offset":0,"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,8,33,51,1,7,0,0,0,0,0,12,16]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,14,97,51,0,12,16,44,77,0,163,18,227,38,0,75,18,0,12]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,14,97,51,0,12,16,44,77,0,163,18,227,38,0,75,18,0,12]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 14 - 3 - 1 - 51 - [0,12,16,44,77,0,163,18,227,38,0,75,18,0] - 12
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvRead - {"status":0,"len":12,"value":{"type":"Buffer","data":[16,44,77,0,163,18,227,38,0,75,18,0]}}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvLength - {"sysid":1,"itemid":7,"subid":1}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,5,33,50,1,7,0,1,0,17]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [12,0,0,0] - 91
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvRead - {"sysid":1,"itemid":7,"subid":1,"offset":0,"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,8,33,51,1,7,0,1,0,0,0,12,17]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 14 - 3 - 1 - 51 - [0,12,0,0,0,0,0,0,0,0,0,0,0,0] - 80
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvRead - {"status":0,"len":12,"value":{"type":"Buffer","data":[0,0,0,0,0,0,0,0,0,0,0,0]}}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvLength - {"sysid":1,"itemid":7,"subid":2}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,5,33,50,1,7,0,2,0,18]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [12,0,0,0] - 91
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvRead - {"sysid":1,"itemid":7,"subid":2,"offset":0,"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,8,33,51,1,7,0,2,0,0,0,12,18]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 14 - 3 - 1 - 51 - [0,12,0,0,0,0,0,0,0,0,0,0,0,0] - 80
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvRead - {"status":0,"len":12,"value":{"type":"Buffer","data":[0,0,0,0,0,0,0,0,0,0,0,0]}}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvLength - {"sysid":1,"itemid":7,"subid":3}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,5,33,50,1,7,0,3,0,19]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [12,0,0,0] - 91
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvRead - {"sysid":1,"itemid":7,"subid":3,"offset":0,"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,8,33,51,1,7,0,3,0,0,0,12,19]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 14 - 3 - 1 - 51 - [0,12,0,0,0,0,0,0,0,0,0,0,0,0] - 80
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvRead - {"status":0,"len":12,"value":{"type":"Buffer","data":[0,0,0,0,0,0,0,0,0,0,0,0]}}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvLength - {"sysid":1,"itemid":7,"subid":4}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,5,33,50,1,7,0,4,0,20]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,4,97,50,12,0,0,0,91]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [12,0,0,0] - 91
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvRead - {"sysid":1,"itemid":7,"subid":4,"offset":0,"len":12}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,8,33,51,1,7,0,4,0,0,0,12,20]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,14,97,51,0,12,0,0,0,0,0,0,0,0,0,0,0,0,80]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 14 - 3 - 1 - 51 - [0,12,0,0,0,0,0,0,0,0,0,0,0,0] - 80
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvRead - {"status":0,"len":12,"value":{"type":"Buffer","data":[0,0,0,0,0,0,0,0,0,0,0,0]}}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SREQ: --> SYS - nvLength - {"sysid":1,"itemid":7,"subid":5}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:writer: --> frame [254,5,33,50,1,7,0,5,0,21]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: <-- [254,4,97,50,0,0,0,0,87]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext [254,4,97,50,0,0,0,0,87]
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --> parsed 4 - 3 - 1 - 50 - [0,0,0,0] - 87
[2024-05-03 08:45:58] debug: 	zh:zstack:znp: SRSP: <-- SYS - nvLength - {"len":0}
[2024-05-03 08:45:58] debug: 	zh:zstack:unpi:parser: --- parseNext []
[2024-05-03 08:45:58] debug: 	zh:zstack:backup: fetched adapter network security material table (capacity=1, used=1)
[2024-05-03 08:45:58] debug: 	zh:zstack:backup: Following devices with link key are missing from new backup but present in old backup and database, adding them back: 
[2024-05-03 08:45:58] info: 	zh:controller: Wrote coordinator backup to '/config/zigbee2mqtt/coordinator_backup.json'
[2024-05-03 08:45:58] info: 	zh:zstack:znp: closing
[2024-05-03 08:45:58] info: 	zh:zstack:znp: Port closed
[2024-05-03 08:45:58] info: 	z2m: Stopped zigbee-herdsman

mickt34 avatar May 03 '24 07:05 mickt34

Same issue ... so reverted back to v1.36

oliversweb avatar May 03 '24 11:05 oliversweb

Found my issue .. the mqtt url contained a / before the port no. which is a malformed url ... so removed and then reinstalled 1.37 and all is ok so far 👍

oliversweb avatar May 03 '24 13:05 oliversweb

After upgrade to 1.37.0, get “502 bad gateway”. Still on HA 2024.04.4, zigbee2mqtt update was last change on system.

Workaround: Restored backup created before upgrade (addon_45df7312_zigbee2mqtt_1.36.1-1); issue went away.

server: mqtt://core-mosquitto:1883/ base_topic: zigbee2mqtt user: zigbee2mqtt password: *************** include_device_information: true

evoncken avatar May 03 '24 13:05 evoncken

Same problem here. I tried updating the firmware of the zbdongle-e, changing the adapter: ezsp to ember, but nothing happens, just that Z2M does not boot.

wbeymar avatar May 03 '24 13:05 wbeymar

Try going into add-ons/ZigBee2MQTT/configuration and check the mqtt server URL is not malformed in anyway, I think v1.37 is less forgiving with malformed URLs than 1.36

oliversweb avatar May 03 '24 14:05 oliversweb

Looks OK server: http://192.168.0.35:1883

mickt34 avatar May 03 '24 14:05 mickt34

Looks OK server: http://192.168.0.35:1883

?

mickt34 avatar May 03 '24 14:05 mickt34

server: mqtt://homeassistant.local/ Like this? How do I know which one is correct?

wbeymar avatar May 03 '24 14:05 wbeymar

Mine is like mqtt://homeassistant.local:1883 ... note, no '/' after host and before port no.

oliversweb avatar May 03 '24 14:05 oliversweb

After several tries it appears that you cant use an IP address it has to be "homeassistant.local" I would have thought an IP address would be at least as good.

So im using mqtt://homeassistant.local:1883 and 1.37 works fine now.

mickt34 avatar May 03 '24 16:05 mickt34

Found my issue .. the mqtt url contained a / before the port no. which is a malformed url ... so removed and then reinstalled 1.37 and all is ok so far 👍

Hi, You have to read the doc: image

WarC0zes avatar May 03 '24 18:05 WarC0zes

Same problem here, url seems fine

jasperm22 avatar May 07 '24 20:05 jasperm22

Can you check if this is fixed in the latest dev branch?

Koenkk avatar May 07 '24 20:05 Koenkk

Finally I could find a solution and it was a dumb solutión. First, I upgraded the dongle-e firmware to the latest versión, later, upgraded Z2M. then, I changed, in Z2M configuration, the server from mqtt://homeassistant.local/ to mqtt://homeassistant.local:1883

Everything is working now

wbeymar avatar May 07 '24 20:05 wbeymar

@wbeymar does mqtt://homeassistant.local also work?

Koenkk avatar May 08 '24 20:05 Koenkk

@Koenkk Not for me. I had to write after local:1883. Just like mqtt://homeassistant.local does not work to me

wbeymar avatar May 08 '24 20:05 wbeymar