With HouseBot becoming a very important (dare I say critical) piece of my home automation system I'm now looking for ways to make it bullet-proof. I already have the hard drives hardware mirrored (RAID-1) and I have a good UPS on the PC. But lately I've had a couple of instances of the HouseBot Server process crashing.
Obviously this shouldn't happen but if it occasionally does I'd like HouseBot to just start up again (which is what I do manually when I discover it has stopped). If it were a Windows service I could set this up pretty easily. Since it's not I'm looking for other solutions. Does anyone know of a "watchdog" program that could watch for the process and restart it if it doesn't exist? What (if anything) are others doing about this?
-- Dave
How to "bullet-proof" HouseBot?
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
Here's my super sophisticated resurrection batch file:
I'm sure there are better, but it's cheap and easy.
Code: Select all
Echo off
:Start
Echo Server has Started At: %Date% %Time%
"C:\Program Files\HouseBot\HouseBotServer.exe"
Echo Server has Terminated At: %Date% %Time%
goto Start
Scott
It gets worse
I my case the housebot server seems to choke. Al the external controls work (so it seems) only housebot-server does nothing. As soonas I maximize housbot and open two things than it totaly freezes up. So that I have to terminate it...
Any suggestions???
Does housebot handle a installation on D:\...... well? I installed it on D:\program...\..\meedio housebot and I got an error. c:\pro......\Listings.mdb isn't valid....
Any suggestions???
Does housebot handle a installation on D:\...... well? I installed it on D:\program...\..\meedio housebot and I got an error. c:\pro......\Listings.mdb isn't valid....
-
- Member
- Posts: 71
- Joined: Thu Jul 03, 2003 8:53 am
- Location: Raleigh, NC
- Contact:
I like the super sophisticated resurrection batch file. K.I.S.S! Works great!
When HB hangs rather than crashes, does anyone know if it is still listening on port 5009 (the port that the remotes use)? If not, then you could use the following super sophisticated watchdog batch file to check if HB's hung and restart it if it is:
Now I just need to figure out how to make it a scheduled task that can interface with the desktop that's open. Ideas?
When HB hangs rather than crashes, does anyone know if it is still listening on port 5009 (the port that the remotes use)? If not, then you could use the following super sophisticated watchdog batch file to check if HB's hung and restart it if it is:
Code: Select all
echo off
netstat -a | find /c ":5009" > HbPortCount.txt
set /p HBPortCount=dummy < HBPortCount.txt > null
if %HBPortCount%==0 goto ErrEnd
goto OKEnd
:ErrEnd
echo HB Locked up at %DATE% %TIME% >> HBLocked.log
tskill housebotserver >> HBLocked.log
cd "\%ProgramFiles%\Housebot"
start housebotserver
:OKEnd
Now I just need to figure out how to make it a scheduled task that can interface with the desktop that's open. Ideas?