Broken HA installation

I’ve been running Home Assistant as part of a VM on a Synology NAS for a while now with no major issues. Unfortunately this morning some kind of power spike caused the NAS to reboot and now I have a non-functional HA installation.

If anyone can assist with troubleshooting and/or fixing i’d be very grateful.

The VM boots up ok and I eventually reach the banner page which all looks fine, but on trying to load the HA website I just get an error saying:

This page isn’t working right now
homeassistant.local didn’t send any data.

I’ve tried various commands in the HA tool such as ‘supervisor repair’ and ‘supervisor restart’ but nothing seems to work. I also did a login and ran a docker ps -a command and it looks like all of the associated containers have started up correctly.

Thanks

Anything in the logs?
Settings - > System → Logs

Edit: Logs can be accessed via

ha core logs

Did you try the IP address instead of homeassistant.local?
I.E. 192.168.2.1:8123

I’ve tried using the assign local IP and that does the same

Running ha core logs returns a lot of errors but as I only have access via the NAS console i’m not able to scroll back to review them. Does the core run as a Docker container and if so which one would it be under? Perhaps I can do a login and then use docker logs to pull them instead?

Do you have recent backups?

The unexpected reboot might have caused a database corruption. The way to troubleshoot this is to either restore a recent backup or else to wipe out the home-assistant_v2.db file.

Yeah i’ve got some backups. But, I think to test i’ll wipe out the db file and see if that helps. If it gets things booting then I should be able to restore via the UI.

So, I ended up doing a fresh install of Debian on the VM and reinstalling. Got things booted up and it prompted for the tar file to restore from so I chose an old backup from the start of the year.

It looks like the restore completed but i’m back to square one again with a non-working web interface and the ‘This page isn’t working right now’ error. I can see a number of docker containers running and the restore must have at least partially worked as some of those containers relate to addons I was running.

Bit clueless as to why the web interface isn’t working, so any further pointers would be appreciated. The good news now is that I can just execute ‘ha’ commands as I would any other Linux command with the option to pipe to more so I can actually parse and review the logs.

Synology can block ports sometimes due to the firewall, have you checked that 8123 is being allowed to pass through?

Good point. I tried doing a curl to http://localhost:8123 from the VM itself and get this:

curl: (52) Empty reply from server

That shouldn’t be affected by firewall rules so it doesn’t look like it’s that. Also the firewall would most likely block the curl entirely; in this case it’s connecting but the Home Assistant front-end simply isn’t responding.

:man_facepalming:

Ha, it works on https://homeassistant.local:8123 though.

I was sure that previously it redirected HTTP to HTTPS, but apparently that’s not the case now.