[mythtv-users] what happened? mythbackend died
Allen Edwards
allen.p.edwards at gmail.com
Sun Sep 20 17:25:59 UTC 2009
On Sun, Sep 20, 2009 at 10:09 AM, Udo van den Heuvel <udovdh at xs4all.nl>wrote:
> Hello,
>
> I found that the backend just stopped.
> These are the logfile lines preceding this:
>
> 2009-09-13 16:13:13.568 Reschedule requested for id 0.
> 2009-09-13 16:14:27.244 Scheduled 81 items in 73.7 = 0.01 match + 73.65
> place
> 2009-09-13 16:14:27.283 Reschedule requested for id 0.
> 2009-09-13 16:15:37.497 Scheduled 81 items in 70.2 = 0.01 match + 70.20
> place
> 2009-09-13 16:18:11.600 AutoExpire: CalcParams(): Max required Free
> Space: 3.0 GB w/freq: 5 min
> 2009-09-13 16:20:04.491 ProgramInfo, Error: GetPlaybackURL:
> '3_20090325102900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.508 ProgramInfo, Error: GetPlaybackURL:
> '2_20090601112400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.522 ProgramInfo, Error: GetPlaybackURL:
> '3_20090603112800.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.530 ProgramInfo, Error: GetPlaybackURL:
> '2_20090606105400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.541 ProgramInfo, Error: GetPlaybackURL:
> '2_20090625221400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.559 ProgramInfo, Error: GetPlaybackURL:
> '3_20090722154900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.572 ProgramInfo, Error: GetPlaybackURL:
> '3_20090801035900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.580 ProgramInfo, Error: GetPlaybackURL:
> '2_20090806195400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.587 ProgramInfo, Error: GetPlaybackURL:
> '2_20090807123400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.595 ProgramInfo, Error: GetPlaybackURL:
> '2_20090819215900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:04.604 ProgramInfo, Error: GetPlaybackURL:
> '2_20090824195400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:05.303 ProgramInfo, Error: GetPlaybackURL:
> '3_20090911144900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:05.465 ProgramInfo, Error: GetPlaybackURL:
> '3_20090913014900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.156 ProgramInfo, Error: GetPlaybackURL:
> '3_20090325102900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.189 ProgramInfo, Error: GetPlaybackURL:
> '2_20090601112400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.210 ProgramInfo, Error: GetPlaybackURL:
> '3_20090603112800.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.221 ProgramInfo, Error: GetPlaybackURL:
> '2_20090606105400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.230 ProgramInfo, Error: GetPlaybackURL:
> '2_20090625221400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.252 ProgramInfo, Error: GetPlaybackURL:
> '3_20090722154900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.263 ProgramInfo, Error: GetPlaybackURL:
> '3_20090801035900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.273 ProgramInfo, Error: GetPlaybackURL:
> '2_20090806195400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.281 ProgramInfo, Error: GetPlaybackURL:
> '2_20090807123400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.292 ProgramInfo, Error: GetPlaybackURL:
> '2_20090819215900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.300 ProgramInfo, Error: GetPlaybackURL:
> '2_20090824195400.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:07.979 ProgramInfo, Error: GetPlaybackURL:
> '3_20090911144900.mpg' should be local, but it can not be found.
> 2009-09-13 16:20:08.123 ProgramInfo, Error: GetPlaybackURL:
> '3_20090913014900.mpg' should be local, but it can not be found.
>
>
> What happened?
>
>
> Udo
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
I created a cron job to monitor the backend and restart it if it crashes.
I start it with this entery into cron.d
* * * * * root /usr/bin/mythmon
Here is the script.
#!/bin/bash
LOG=/var/log/mythtv/mythbackend.log
# comment out the line below after testing that the script runs when it
should
# date "+%Y-%m-%d %H:%M:%S Checking" >> /tmp/mythmon.log
if ! ps -ef | grep [m]ythbackend >/dev/null; then
# Check whether setup utility is running
if ps -ef | grep [m]ythtv-setup >/dev/null; then
date "+%Y-%m-%d %H:%M:%S mythtv-setup running" >> /tmp/mythmon.log
exit 0
fi
# Mythbackend has crashed, log and restart
date "+%Y-%m-%d %H:%M:%S Crash detected - restarting mythbackend" >> $LOG
date "+%Y-%m-%d %H:%M:%S Crash detected - restarting mythbackend"
>>/tmp/mythmon.log
chown mythtv:mythtv $LOG
/etc/init.d/mythtv-backend restart
fi
The funny thing is that the system has not crashed since I installed this
with the exception of the one time I killed it to test the script.
Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20090920/ca2dc312/attachment.htm>
More information about the mythtv-users
mailing list