HAOS crashing when stopping ZHA or Zigbee2MQTT

Hi everyone,

I was originally trying to use Zigbee2MQTT, but noticed it would crash the whole of HAOS when the process is stopped. So I decided to try and switch to ZHA. However, this still shows the same behaviour. When I stop ZHA, it also crashes the whole OS.

HAOS is running in a virtual machine on VirtualBox. The host is running Ubuntu 24.04. I’ve already found a similar issue on GitHub, but it doesn’t give me anything to work with: Home Assistant becomes unresponsive with newest zigbee2mqtt add-on version. · Issue #609 · zigbee2mqtt/hassio-zigbee2mqtt · GitHub.

Is there anyone able to help me further?

1 Like

My hypothesis is that it’s VirtualBox. While there are plenty of folks that run on VB just fine, I’ve read far more posts with VB problems than with well functioning VB systems. I was actually starting down a VB route myself and after reading one post after another of strange crashes and what-not I decided against it.

So, more to your point, one reason I suspect VB is that both Z2MQTT and ZHA are both causing the same problem, the problem goes back to something about the USB driver perhaps, and this goes to likely OS issues. It’s not an HA issue, it could just be that VB can’t handle the change in data.

Hypothetical and it doesn’t give you a way to fix your problem, but perhaps some ideas. I have also read that people with VB issues can sometimes resolve them by spinning up a new virtual system and copying the virtual disk to the new virtual.

I would install Zigbee2MQTT outside Virtualbox, straight on Ubuntu.

That is indeed a solution I haven’t thought of! Gonna try that, I’ll keep you posted.

Well, I’ve even tried with a completely new installation and set it up again. Didn’t work either unfortunately. Gonna try to run Zigbee2MQTT as a separate docker instance.

I’m afraid I can’t help, as I’ve got exactly the same issue! The recent update to 1.39.0-1 obviously needs to stop the addon and then update it. I tried to update and it just crashed my whole HAOS (which also runs in a VirtualBox container coincidentally…) I am almost certain this did not happen in the past (specifically I think 1.37 was probably OK), so I’m very suspicious that some update, either to HAOS or Z2M is causing the issue.

For now I had to restart HAOS, catch it before it loaded the addons, do the update, then start the new version to get the update to install. I also did an uninstall and reinstall just in case something was messed up with the installation but when I click on stop, it still crashes my HAOS. Just confirmed it on the HAOS core update from today

  • Core 2024.7.0
  • Supervisor 2024.06.2
  • Operating System 12.4
  • Frontend 20240703.0

Would appreciate it if anyone has any updates! I’m not sure it matters but I have my sonoff stick on a USB 3 port and run it as a USB 2 port in the USB section of Virtual Box. I also after much tinkering managed to get Hyper-V completely disabled so it’s not that, although it took me ages to figure out how and it caused me no end of issues and crashes, which may have corrupted my installation somehow also, but when it’s running, everything seems to be OK!

I just completely let go of doing it with HAOS, and I use containers instead now

might be onto something with the VirtualBox USB driver… Had the same issue just kept on crashing updating. Was trying to update to 1.40.0-1 Zigbee2MQTT recently and the stop just kills it. Went into VirtualBox and disabled the USB (Sonoff device attached) and everything was OK - stopped, upgraded, started…replugged the USB and everything is working.

Thanks for the tip. This worked for me as well.

Hi Francisp. I am looking for a professional to help me setting up my smart home using HAOS. Please reply to me on email [email protected].
Thank you.
Vikram

Just thought i would join in and say I agree it seems to be the usb driver in VirtualBox. I have had sooo many issues with the OS crashing during updates and randomly at times.

When I did what others have suggested by disabling the coordinator usb, stopping the zigbee2mqtt add on, updating, and restarting, that finally did the trick!! thanks all.