Problems with latest HA version

Yes I still have not figured it out yet.

I sort of gave up last night. I can not get SSH access, Web GUI etc.

Think the solution is to delete the DB, but through the CLI am not sure. I am so used to ssh and a normal bash shell.

Perhaps we can escape the ha shell and then just browse the fs as if we had SSH’d in?

@dtx and @beauwilliams Yes, the fix is to delete your database as I mentioned previously (in the combination of threads you posted in about this). If you have Samba access you can simply go to the HA Config UI > Server Controls > Server Management > Stop. Then using Samba find the database file (home-assistant_v2.db) and delete it. I generally then use SSH to restart HA, or you could power cycle the server, whatever you need (I’m not familiar with the procedure for a VM)

Without Samba (and in Beau’s case, no GUI) you can achieve all this using the CLI too:

ha core stop
rm home-assistant_v2.db
ha core start

HA will restart and automatically create a new database file.

Thanks for this @sparkydave . I hope this may help others.

The issue I am having is that I am locked into the ha cli – I can not run the rm binary.

I am a bit lost as to how to navigate this cli. See here what I get when I try to rm the db

If I had SSH this would be a cinch, but the error seems to have knocked it out for now

Have you tried some of the entries shown here:

such as ha supervisor logs
and ha core logs ?

Yes, my core logs suggest that the DB is malformed, hence why I am looking to delete it which is where I am currently stuck.

My supervisor logs suggest an issue with config, but its only a ‘warning’ not a breaking issue.

Unfortunately, this began out of the blue. I did not update. But since crashing I decided to use latest image which is where I am stuck now.

The last screenshot says you have an ERROR: invalid config…

Yes that should be fine though, as its a warning not a breaking issue.

I have managed to delete the db now by getting a shell using login command

Then deleted the DB, it fixed my high CPU issue

I will consider the issues with the config now then (as I still have no web UI). But again, the errors are not breaking errors as I have already verified the config and it says OK (partially) as in “its fine, but you should fixed these issues up ASAP”

Umm, no. ERROR is not WARNING

I have found the issue now. I appears to be related to SSL. The config was fine there we just a few deprecated things.

As soon as I turn SSL off, and use HTTP, I can access the web panel

It does say error, but those are indeed warnings in my particular situation. Mainly its to do with the base_url under http. its not going to break installation, but display that there is a error/warning

Frankly deleting the database is a shameful disgrace of a solution (not your fault of course). Any software that regularly corrupts its database needs to do some work on stabilising its database.

This I think is one of HA’s biggest problems. Databases should not corrupt themselves for no apparent reason.

2 Likes

Agreed. I’ve had to delete my database a few times in recent months. At first I thought it was just too big (a few Gb) so changed the recorder settings to track a lot less activity, however it still happened again with my last HA update.