homebridge / homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
https://homebridge.io
MIT License
2.63k stars 379 forks source link

Debian/Ubuntu crash as soon as accessing the UI #679

Closed glbnz closed 4 years ago

glbnz commented 4 years ago

Hi all, Fresh install using the commands on https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Debian-or-Ubuntu-Linux, https://github.com/oznu/homebridge-config-ui-x/wiki/Homebridge-&-Systemd-(Raspbian,-Ubuntu,-Debian), and https://github.com/jvmahon/Homebridge-HomeSeer4/wiki/Linux-Installation-and-Errors .

I have tried on Ubuntu Server 20.04/18.04 and Debian 10.4.0 so far. Installs go fine, able to install Homebridge, Homebridge UI, and Homeseer plugin. However, as soon as I browse to the Homebridge UI page the CPU/RAM usage shoots up to 100% on the VM and the entire VM becomes unresponsive. Wondering if you can suggest any troubleshooting steps, or if you have heard of similar issues. If I do not browse to the UI page, the system will remain stable... 😢

Troubleshooting steps taken so far: 1) installation in VMWare and on Azure (no luck in either environment, same behavior) 2) setting permissions to /usr/lib/node_modules so that homebridge user owns folder/subfolders 3) reviewing available log messages in /var/log (nothing relevant found)

oznu commented 4 years ago
sudo hb-service logs

I validated these instructions on Ubuntu 20.04 just last week.

glbnz commented 4 years ago

Thanks. Dug deeper into this and totally unrelated to Homebridge which is now working. In case anyone else stumbles into this problem. Multiple versions of Ubuntu/Debian were crashing in VMware ESXi (just so happened to be when I connected to the Homebridge UI - I guess because that was network traffic 🤷). Looked in VMware logs on ESXi host (/vmfs/volumes/datastore/<name of virtual machine>/vmware.log) and saw: vcpu-0| I125: APIC THERMLVT write: 0x10000

Followed the instructions linked below and used this command: ethtool -K <name of network adapter> lro off

When I realized this resolved the issue, I created the file /usr/lib/networkd-dispatcher/routable.d/10-disable-lro with the following content

#!bin/sh ethtool -K <name of network adapter> lro off

I made this file executable with sudo chmod +x /usr/lib/networkd-dispatcher/routable.d/10-disable-lro, and then the issue was fixed and the fix persisted across reboots.

Resources used: https://forums.plex.tv/t/plex-crashes-vm-esxi-when-calling-it-from-outside-the-network/180183/21 https://kb.vmware.com/s/article/2151480

oznu commented 4 years ago

That's good. I wasn't looking forward to debugging this one! 😆