Page 1 of 1
Sticky thread suggestion
Posted: Fri Jun 26, 2015 2:39 pm
by Steve Horn
I'd like to suggest (and I will) that a sticky thread be created and maintained that documents HB recovery steps to go through when the database or application crashes. This info is already, I suspect, scattered throughout the forum. But to have it one place would be helpful.
I experienced another HBDATA meltdown this morning after a power blip that my (total POS) UPS failed to respond to. As a result, my HBDATA file got corrupted, resulting in the now infamous "record is deleted" MS Jet engine message. (I mean, really, what the bleep does that mean!?) . Anyway, I tried unsuccessfully to restore the DB from a copy. Same result.(!). Then tried to compact and repair the DB using MS Access 2013. That effort resulted in breaking MSACCESS 2013, which required a PC cold boot. Ultimately I successfully compacted and repaired today's image using Access 2000.
Sorry for the frustration dump. But it made me think that there has to be a better way to collect our knowledge on recovery steps.
(And while I'm on a rant, the HB internal backup process is only as good as the ability to open HB after a crash in order to do the restore. That hasn't been my experience. And while the unzip-and-copy process probably does work, it seems to be a bit cumbersome.)
My apologies to everyone that got this far. But I love HB, rely on it heavily. and when it goes South I just lose my cool.
Re: Sticky thread suggestion
Posted: Mon Jun 29, 2015 12:54 pm
by ScottBot
Steve,
That's a great idea. I'll see if I can put something together. However, if you have some info off the top of your head (since you just went through this), feel free to start a thread and I can make it sticky.
Re: Sticky thread suggestion
Posted: Tue Jun 30, 2015 7:54 am
by Richard Naninck
Compact Always works for me from Access 2003 and now Access 2010. Never tried 2013 though.
In the startup task, I set all my timers to the correct value because lots of times when HB crashes and corrupts the dbase, the timers revert to 0.
Probably most important thing I do is create a complete backup of my HB directroy every day @ 00:10 hour using Acronis with a Rotary of three days. The fourth day will delete the first and so on. So I can Always fall back up to 3 days and never lose more than 1 day of data which is important because besides the HB DBase I store lots of data in different sqlite2 dbases all gathered by HB.
HB already vacuums the dbase @ startup with a minimum of 86400 seconds set in the registry. This vacuums the dbase only time per day and only if HB gets restarted (multiple times) on that day.
To restore my corrupted dbase automatically I use the .bat script as below:
Note the fourth line. Life made easy
Code: Select all
Echo off
:Start
Echo Server has Started At: %Date% %Time%
"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE" "C:\Program Files\Meedio\Meedio HouseBot\Config\HBData.mdb" /Compact
"C:\Program Files\Meedio\Meedio HouseBot\HouseBotServer.exe"
Echo Server has Terminated At: %Date% %Time%
goto Start
Re: Sticky thread suggestion
Posted: Fri Jul 03, 2015 12:09 am
by Steve Horn
Please explain:
HB already vacuums the dbase @ startup with a minimum of 86400 seconds set in the registry. This vacuums the dbase only time per day and only if HB gets restarted (multiple times) on that day.
I have no problem being "Patient Zero". But I have more questions than solutions. Or my solutions may not be the proper or efficient (or even correct) ones.
For example, With this last crash once I had recovered the DB and restarted HB I got messages that I suspect Richard refers to about timers. So I restarted HB again and that fixed those messages. But I got "setcomm" (?) messages that I suspect have something to do with serial ports. So I restarted the HB PC and HB and those went away. In general, my issues for the most part can be corrected by either restarting HB or the HBserver box or both.
I still have an issue where I have to kill the HBSERVER app with Process Explorer in order to restart HB. ("Another instance of Housebot is already running...") Don't know what causes that but it virtually always has been that way. I suspect serial port issues again but have no proof.
Periodically, either HB or the PC loses connection with USB serial ports for insteon and an Arduino controller, where the controlled devices cease to work. Restarting HB usually corrects that. I have NO idea what causes that.
See? More questions than answers. But as Richard describes: Backup often.
Re: Sticky thread suggestion
Posted: Fri Jul 03, 2015 11:40 am
by Richard Naninck
I also sometimes have HBServer not restarting because of a hanging process thread. Never looked into which one it was but will do so next time.
After your second restart where the timer errors seem to be resolved, you still have the problem of the timers reverting to zero instead of there startup times. I therefore set the timers in the startup task.
Same goes for the serial devices. The hardware devices can easily go to a "not enabled" state so you would have to check for red dots.
I have a very extensive warnings and cautions script running which checks just about everything there is to check each minute and reports if things are not working correctly. Think of running scripts that stopped but should have, or serial devices which should produce data on a set time but didn't do so for some time. All of these things are constantly monitored and reported on when something is wrong.
Many of your questions are answered in the previous post and can easily be resolved. USB devices that cause problems should not be related to HouseBot, but to your Windows setup. Try a different Hub, USB port, USB device or driver. I have 33 com ports connected and 8 of them are USB and none of them ever produce an error which causes HB to hang and where they did, Windows was to blame.
Auto(re)starting HB using the .bat file I posted should repare your errors before HB startup. That should be the first and most easy step to at least guarantee some good uptimes.
Re: Sticky thread suggestion
Posted: Fri Jul 03, 2015 3:58 pm
by Steve Horn
I need to revisit the timers. I don't have many, but some may not start at zero; I don't recall. The idea of enabling all hardware devices is a good one. Honestly, I haven't taken advantage of the startup script.
I don't have many USB-interfaced devices, so they are all plugged directly into the PC's ports. I have been told (by the Elk folks) that some USB chips are better than others. They like FDDI. (I have run into an issue where my Elk M1 is not recognized by the HB HW interface for it. They suggested the FDDI USB/rs232 dongle. But that's bogus in my case because I can "see" the M1s heartbeat outside of HB using a plain old terminal program. Used to work; now not so much. But I'm off topic...)
Re: Sticky thread suggestion
Posted: Fri Jan 26, 2018 11:45 am
by alibaba
Hi
I also have regularly the issue with "Record is deleted" or with invalid default values in the tImers ######## and then my house is dead...
Is there no possibility to have a better database system than MSAccess?
There are other free DB-Systems around like mySQL or MariaDB on Synology.
I tried it once to move the Backend Database from MSAccess to Microsoft SQL-Server using the wizard.
But in the end Housebot just crashed. If I remember correctly it was an invalid call being used.
BR -Alex-
Re: Sticky thread suggestion
Posted: Fri Jan 26, 2018 12:56 pm
by ScottBot
Changing the database engine has been on my list for a while now. I've been putting it off because it's such a critical piece, but I agree that it's probably a good idea. I'll move it up in priority.