View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 12 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Mar 09, 2006 9:02 pm 
Offline
Joined: Fri Feb 03, 2006 12:22 pm
Posts: 56
Hi again guys. I have most of my problems sorted.

After my mythbox booted up, my tv shows are no longer appearing in the media library. The actual files still exist in the /myth/tv directory. I wonder if there is a way to re-scan for them such as there is for the video.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 10:53 pm 
Offline
Joined: Tue Feb 21, 2006 7:24 am
Posts: 396
Location: Dushanbe, Tajikistan
I didn't see the first part of this tread so I don't how your problems started. It would seem like the data in your mysql database that existed prior to whatever happened has not been restored.

Is other stuff missing as well? Recording Schedules, etc..

martin


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 10:56 pm 
Offline
Joined: Tue Nov 22, 2005 7:57 pm
Posts: 295
Location: Auckland, New Zealand
Assuming the db data is gone, there is a script on the forum somewhere here that will try and restore some data back into the db - enough to use the files I think but no descriptions etc.

_________________
HP VL400 (PIII 866), Skystar2 2.6D, PVR350, Nvidia FX5200, 384MB, 200GB, KnoppMyth R5.5


Top
 Profile  
 
 Post subject: MySQL error
PostPosted: Thu Mar 09, 2006 11:11 pm 
Offline
Joined: Fri Feb 03, 2006 12:22 pm
Posts: 56
When I try and schedule a recording via mythweb, I get the following message:

Recording Group:
Warning at /usr/share/mythtv/mythweb/includes/recording_schedules.php, line 412:
mysql_fetch_row(): supplied argument is not a valid MySQL result resource Warning at /usr/share/mythtv/mythweb/includes/recording_schedules.php, line 416:
mysql_free_result(): supplied argument is not a valid MySQL result resource

So yes it would appear that something in my MySQL is messed up.

to mac: this is the beginning of the thread


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 11:44 pm 
Offline
Joined: Tue Feb 21, 2006 7:24 am
Posts: 396
Location: Dushanbe, Tajikistan
do you have anything in this directory?

/var/lib/mysql/mythconverg


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 10, 2006 7:25 am 
Offline
Joined: Fri Feb 03, 2006 12:22 pm
Posts: 56
yes I have lots of files. Any specific one I should be looking for? I can post the list a bit later today.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 10, 2006 8:48 am 
Offline
Joined: Tue Feb 21, 2006 7:24 am
Posts: 396
Location: Dushanbe, Tajikistan
Don't need a list. Just seeing if your data was still there.

run:
mysqlcheck -c -umythtv -pmythtv mythconverg

If it reports error see this for info on repairing it:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=1043

is the ownership and group of /var/lib/mysql still mysql?
if not do a:
chown mysql.mysql /var/lib/mysql

If for some reason the mythconverg database didn't load take a look for clues in:

/var/log/mysql/mysql.log
/var/log/mysql/mysql.err

Look at /etc/myth/mysql.txt

do a
/etc/init.d/mythtv-backend stop
/etc/init.d/mysql stop
/etc/init.d/mysql start
/etc/init.d/mythtv-backend start

and see what if any useful messages are kicked back..


Top
 Profile  
 
PostPosted: Fri Mar 10, 2006 9:22 am 
Offline
Joined: Fri Aug 26, 2005 9:54 pm
Posts: 617
sithlord39 wrote:
Hi again guys. I have most of my problems sorted.

After my mythbox booted up. . .

to mac: this is the beginning of the thread

It might help if we knew what these other problems you already sorted out are. They could be related to this problem.


Top
 Profile  
 
 Post subject: success!
PostPosted: Fri Mar 10, 2006 12:30 pm 
Offline
Joined: Fri Feb 03, 2006 12:22 pm
Posts: 56
Thanks guys.

I simply looked at the thread posted by mac and then:



Code:
cd /var/lib/mysql/mythconverg
/etc/init.d/mythtv-backend stop
/etc/init.d/mysql stop


then

Code:
cd /var/lib/mysql/mythconverg
myisamchk -f -r *.MYI


and then restarted mysql and the backend. You guys have been great. Thanks so much


Top
 Profile  
 
 Post subject: woo hoo!
PostPosted: Sat Jan 12, 2008 10:00 pm 
Offline
Joined: Tue Feb 21, 2006 6:45 pm
Posts: 5
Location: Tennessee USA
Code:
myisamchk -f -r *.MYI


did the trick for me! I have no idea what caused my recordings to disappear, but myisamchk recovered them!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 13, 2008 12:07 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Your symptoms and successful recovery indicate that there was mysql DB corruption. This usually occurs as the result of an unclean shutdown. The most common causes of this are naive users who turn off the box by flipping the switch or unplugging it and short power blips.

For the first, education is the best answer, although some people do end up going so far as disabling or blocking access to the power switches and cords. I know one guy who had to use a strap fastened behind the wall plate around the UPS power cable to keep his wifes cleaning lady from unplugging it to use the outlet for a vacuum.

For the second, a UPS is _HIGHLY_ recommended. A working PVR box is a server which is running more or less continuously. It needs a reliable power supply to function reliably. No pro worthy of the name would deploy a server without some kind of backup power source with enough capacity to at least ensure a clean shutdown, and neither should you.

You don't need a fancy or expensive UPS, just a reliable one. If you check the sale inserts in your Sunday paper you should be able to find a ~500 VA APC UPS for ~$40. This is a serious bargain when it comes to cheap insurance. Look for one with a USB monitoring port which will let your KM box do an automatic shutdown if the batteries ever get low.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 13, 2008 9:48 pm 
Offline
Joined: Tue Dec 07, 2004 12:04 pm
Posts: 369
In addition, even a UPS can't always save you...

I just tracked down a random power-off of my UPS-connected FE/BE machine (random=weekly initially, but recently it's been almost hourly!) to what was probably a ground loop between the computer and the stereo via the line-out connector. Randomly I'd hear a click/pop and the machine would either immediately power off or immediately go into sleep mode (but unrecoverably).

I switched from using the stereo to some cheap, USB-powered computer speakers and have been up for a couple of days.

I know there's a resistance to automatically running database fixups...but perhaps it is time to consider a "Run Database Fixup" script for the knoppmyth page of the frontend menu? Something that doesn't requre sshing in... my ancient tivo didn't seem to care much about unplanned power outs...it probably automatically performed database checkups on unclean startups, though.

-brendan


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu