Zigbee2Mqtt down after update

Hello,

Since the OS 11 update I did on Saturday my Zigbee2MQTT devices are not working anymore into HA. They are greyed out in the dashboard. When going to Zigbee2MQTT in the sidebar it says: The add-on is not running. Do you want to start it now? When running it goes to a 502 bad gateway page.

Log is saying the following:
Zigbee2MQTT:error 2023-10-17 22:32:04: MQTT error: connect ECONNREFUSED 172.30.33.1:1883

The Mosquitto broker add-on log is saying the following:

[20:39:15] INFO: Service restart after closing
[22:39:16] INFO: Successfully send service information to the Supervisor.
[22:39:17] INFO: Starting mosquitto MQTT broker...
2023-10-17 22:39:18: Warning: Mosquitto should not be run as root/administrator.
2023-10-17 22:39:18: mosquitto version 2.0.17 starting
2023-10-17 22:39:18: Config loaded from /etc/mosquitto/mosquitto.conf.
2023-10-17 22:39:18: Loading plugin: /usr/share/mosquitto/go-auth.so
2023-10-17 22:39:18:  ├── Username/password checking enabled.
2023-10-17 22:39:18:  ├── TLS-PSK checking enabled.
2023-10-17 22:39:18:  └── Extended authentication not enabled.
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x7ff352d39833]

runtime stack:
runtime.throw(0x7ff353857642, 0x2a)
	/usr/lib/go-1.15/src/runtime/panic.go:1116 +0x74
runtime.sigpanic()
	/usr/lib/go-1.15/src/runtime/signal_unix.go:726 +0x4ac
runtime.adjustpointer(...)
	/usr/lib/go-1.15/src/runtime/stack.go:546
runtime.adjustframe(0x7ff352464ad8, 0x7ff352464bc8, 0x7ff35420aca0)
	/usr/lib/go-1.15/src/runtime/stack.go:707 +0x1f3
runtime.gentraceback(0xffffffffffffffff, 0xffffffffffffffff, 0x0, 0xc000000180, 0x0, 0x0, 0x7fffffff, 0x7ff353c6b880, 0x7ff352464bc8, 0x0, ...)
	/usr/lib/go-1.15/src/runtime/traceback.go:334 +0x1195
runtime.copystack(0xc000000180, 0x1000)
	/usr/lib/go-1.15/src/runtime/stack.go:910 +0x287
runtime.newstack()
	/usr/lib/go-1.15/src/runtime/stack.go:1076 +0x28d
runtime.morestack()
	/usr/lib/go-1.15/src/runtime/asm_amd64.s:449 +0x84

goroutine 1 [copystack, locked to thread]:
runtime.(*mheap).alloc(0x7ff35426d280, 0x1, 0x7ff352d00109, 0x7ff3510fcc00)
	/usr/lib/go-1.15/src/runtime/mheap.go:896 +0xdc fp=0xc000062ba8 sp=0xc000062ba0 pc=0x7ff352d124dc
runtime.(*mcentral).grow(0x7ff35427e038, 0x0)
	/usr/lib/go-1.15/src/runtime/mcentral.go:506 +0x7c fp=0xc000062bf0 sp=0xc000062ba8 pc=0x7ff352d0357c
runtime.(*mcentral).cacheSpan(0x7ff35427e038, 0x7ff3512f3fff)
	/usr/lib/go-1.15/src/runtime/mcentral.go:177 +0x3e5 fp=0xc000062c68 sp=0xc000062bf0 pc=0x7ff352d03305
runtime.(*mcache).refill(0x7ff351c257d0, 0x9)
	/usr/lib/go-1.15/src/runtime/mcache.go:142 +0xa5 fp=0xc000062c88 sp=0xc000062c68 pc=0x7ff352d02ca5
runtime.(*mcache).nextFree(0x7ff351c257d0, 0x7ff352d03109, 0x7ff350793910, 0x0, 0x7ff3512f3fff)
	/usr/lib/go-1.15/src/runtime/malloc.go:880 +0x8d fp=0xc000062cc0 sp=0xc000062c88 pc=0x7ff352cf7d8d
runtime.mallocgc(0x30, 0x0, 0x0, 0x203000)
	/usr/lib/go-1.15/src/runtime/malloc.go:1061 +0x854 fp=0xc000062d60 sp=0xc000062cc0 pc=0x7ff352cf8794
runtime.rawstring(0x26, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go-1.15/src/runtime/string.go:263 +0x51 fp=0xc000062d90 sp=0xc000062d60 pc=0x7ff352d3c891
runtime.rawstringtmp(0x0, 0x26, 0xd0, 0x7ff350793aa8, 0x8, 0x10, 0x7ff351c257d0)
	/usr/lib/go-1.15/src/runtime/string.go:131 +0x76 fp=0xc000062dd0 sp=0xc000062d90 pc=0x7ff352d3c256
runtime.concatstrings(0x0, 0xc0000546b0, 0x2, 0x2, 0x0, 0x0)
	/usr/lib/go-1.15/src/runtime/string.go:50 +0xc5 fp=0xc000062e68 sp=0xc000062dd0 pc=0x7ff352d3bca5
runtime.concatstring2(0x0, 0x7ff353a3c240, 0x10, 0x7ff35383f98b, 0x16, 0xc0000546f0, 0x7ff352cf986f)
	/usr/lib/go-1.15/src/runtime/string.go:59 +0x49 fp=0xc000062ea8 sp=0xc000062e68 pc=0x7ff352d3bf29
time.init()
	/usr/lib/go-1.15/src/time/zoneinfo_unix.go:25 +0x3ba fp=0xc000062ef8 sp=0xc000062ea8 pc=0x7ff352d8233a
runtime.doInit(0x7ff3541ff500)
	/usr/lib/go-1.15/src/runtime/proc.go:5652 +0x8c fp=0xc000062f28 sp=0xc000062ef8 pc=0x7ff352d30a6c
runtime.doInit(0x7ff3541ff740)
	/usr/lib/go-1.15/src/runtime/proc.go:5647 +0x59 fp=0xc000062f58 sp=0xc000062f28 pc=0x7ff352d30a39
runtime.doInit(0x7ff354202a40)
	/usr/lib/go-1.15/src/runtime/proc.go:5647 +0x59 fp=0xc000062f88 sp=0xc000062f58 pc=0x7ff352d30a39
runtime.main()
	/usr/lib/go-1.15/src/runtime/proc.go:191 +0x1c5 fp=0xc000062fe0 sp=0xc000062f88 pc=0x7ff352d236a5
runtime.goexit()
	/usr/lib/go-1.15/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc000062fe8 sp=0xc000062fe0 pc=0x7ff352d576e1

goroutine 17 [runnable, locked to thread]:
runtime.goexit()
	/usr/lib/go-1.15/src/runtime/asm_amd64.s:1374 +0x1

When trying to reconfigure MQTT it says: Failed to connect

Does anyone know how to solve this?

I’m running HA via Proxmox on a mini PC. Never had any issues with Zigbee2MQTT

Thanks!

From you posted log file, it looks more like your Mosquitto MQTT broker is failing to start. Since Zigbee2MQTT is dependent on having a working MQTT broker, if I am correct, I would suggest starting with a tool like MQTT Explorer and turning on Mosquitto debug logs to make sure MQTT is running successfully.

Loading plugin: /usr/share/mosquitto/go-auth.so

if this library that seems to be loading right before the fatal signal is the cause, you might see if you can disable it’s functions in the mosquitto.conf as a test. Looks like your MQTT setup is requiring authentication and some type of SSL. I never understood why setting these on was really very helpful if your MQTT messages never leave your private LAN…

You did not do a proxmox upgrades along this path did you?

I know this last comment here is not really helpful to fixing what you have. However, since you are running proxmox, why not spin up a lxc container or VM and run a docker side by side with your Home Assistant VM. Run MQTT broker and Zigbee2MQTT in docker containers, get them out of HA, let HA do minimally more that it’s core functions. This is how I have my proxmox setup, being able to bring up and down MQTT and Zigbee2MQTT (and well as upgrade them) without touching Home Assistant gives a lot more flexibility and stability to you overall home automation stack, with little added complexity. And you are kind of already down the complexity rabbit hole running proxmox…

Good hunting!

1 Like

Thanks so much for your reply!

Yesterday I did some more research and found on Github that more people have issues like this. The developer suggested to remove the Mosquitto Broker addon and re-install. After that everything worked as before.

Easy fix :slight_smile:

2 Likes

Did the OS update couple of days ago and mqtt broker stopped working this morning with the same 502 bad gateway result in z2m. Removing mqtt helped, thanks for the hint.