Corrupt database

Hello all,

This has been a frustrating week for me. My hubitat was running beautifully for six months. I would occasionally check it to see if updates needed installing , ectc. and no problems--until two weeks ago. Then everything went haywire.

I did a soft reset, and I was able to rebuild everything from scratch--making some minor improvements along the way. And this morning, it suddenly stopped working. I was exploring using the home assistance app to see if it would connect to my hoobs device because there was one little device on the hoobs i wanted on my hubitat--a two button lutron switchc. I could not figure out how to make the token, so I gave up on it. Then I used the package manager to remove the package. I like to keep a clean house without a lot of unused apps cluttering up things.

Then it died.

I did a soft reset using the 8081 port. The dialog box said the soft reset was successful. Then I tried to open the web interface to the hubitat. "Corrupt Database." I did a second soft reset. "Corrupt Database." I used the diagnostic tool to install a previous version of the OS. Did a third soft reset. "Corrupt Database."

I have a backup I created this morning, so all I need to do it to get this running, and then recover the database--created before I started tinkering around with the home assistant app.

This device was installed only last Spring. It is a C7 hub.

Patrick

I have a similar situation and it appears that every historic recovery I do relegates the oldest backup from the list so now I have 5 backups that all yield corrupt database.
So Iโ€™m going to have to rebuild manually I think.

Would it not be possible to only erase old backups if a new restore actually worked so that this situation canโ€™t occur? I.e. detect that the database isnโ€™t still corrupt?

Rebuilding manually is a pretty radical step. I'd suggest one or two things first. In a different thread the support team recommended a full power down after a soft reset in case the file system was locked. You can also do a "start from scratch" and then do a restore from backkup after the UI is up and running.

If you do a soft reset and a power cycle and then it STILL comes up with a corrupt database I think it's time to reach out to support and have them look at the engineering logs to see what's up.

@bertabcd1234 any other advice for these folks?

Well, This is a two part reply.

To Brad, go to settings>backups and you will a table of five local backups. In the last column on each row is a link to delete the backup. Just click on that.

To all.

I tried another soft reset and I would have tried the power doen option after the reset, but the soft reset failed giving me a corrupt database error before even beginning the reset.

How can I reach out to support to have them to look at this. Can they do this remotely?

Patrick

Hello all,

I tried to force a power cycle by unplugging the USB power supply, and then plugging it back in again.

The situation has gotten even worse. The WEB UI fails to connect, and when I try the 8081 port, I get "Error:failed to fetch." This happens after I paste in the MAX Address in the login dialog for the diagnostic tool. The page comes up, showing the version, model revisiion number and all. However, none of the buttons--including the "soft reset" button are enabled.

Patrick

Tagging the @support_team.

2 Likes

@user1067 Yeah this is pretty weird. Unplug power for 5 mins not just in and out. Then boot up. Regardless of the corrupt database message. Now do a soft reset from 8081. See how far you get now. I'm sure someone from @support_team will get to you quickly.

2 Likes

Ok. I unplugged the device, let the dogs out, and plugged it back in. Still nothing. A few hours later, I let the dogs out, and the intruder alert on the HSM went off. I looked at the hubitat UI on the web, and it was running. Unfortunately, it loaded the newest backup from the saved local backups which was made overnight--when the HSM was armed for night. So when I opened the door, naturally the alert triggered and my two siren devices went off.

Then I tried to do a soft reset, and the soft reset failed to wipe out the database. And it had loaded a backup different from the one I loaded the last time I had a successful soft reset. And I cannot reboot the device without it going offline for several hours, and then magically coming back--using the local backup. The autommations seem to be running fine right now, so I do not want to mess with this device anymore.

I cannot control some of the lights in my home without this hub, so I am going to leave it there for now. In the meantime, I ordered another c7 device off Amazon, and purchased the four year warranty plan. Even though I have Prime, it will still take two weeks to get here. I can still cancel the order if I solve this problem.

Now you mentioned "engineering logs." I am a software engineer. Is there a way I can look at these logs myself?

Patrick
.

No...

You could have just gotten hub protect through Hubitat. So weird this is going on for you.

Can you PM me the hub id? If it's online, I can check the engineering logs on it.

How do I PM you? And does the hub have to have remote access enabled to meet the criteria of "being online?" Keep in mind, I am deaf-blind.

Click his name then click Message

It has to have access to the internet and be able to be seen at my.hubitat.com

1 Like

It looks like the hub loses power and reboots very frequently.

Can you try replacing a power adapter with a different one? The power draw is low, so pretty much any USB adapter will work. A different USB cable would be the next thing to try.

You can see how often the hub reboots by checking Logs page, Hub events tab.

4 Likes

Hello,

I replaced both adaptor and cable. There is this drawer in my basement I think breeds cables. :wink: How do I check the power draw level?

The new power supply seems to have solved the problem. I will re-update the OS to revision 130 to test it out.

Thanks
Patrick

1 Like

Grab the latest one instead... there have been some notable bug fixes since 130.

No easy way to do it with just the hub, but we've never had a report with adapters causing issues by being underpowered.

3 Likes

The update, reboot, and initialization went smoothly. Previously, I observed that sometimes the initialization I updated to revision 138 successfully. The reboot went smoothly, and the initialization went smoothly. I noticed before that the initialization would sometimes restart and take a long time to complete. This time, no steps were repeated and it completed in an orderly manner.

Thanks. I think this problem is now solved.

Patrick

2 Likes

Definitely gotta add this one to my personal knowledgebase!

Thanks @gopher.ny !

2 Likes

I was having trouble maintaining a connection to a z-wave lock in the garage, so I was moving the hub around to try to make that happen. And that using a new adaptor since the one that I was using before was built into the powerstrip. It just never occured to me that this would cause so much trouble in other ways. Ah well...

3 Likes

I arose to this lovely event today. Hub logging ceased around 0800.

Pulled power and installed a higher output (1.55A) wart. It did appear the logs showed frequent restarts. Pretty sure I was using the brick that came with it @1A.

Started it to the same error and did a soft reset then restore 2nd latest DB from the hub.

Everything seems OK but I'm going to do a few reboots, shutdowns, hard power pull/cycles.