View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 15 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Oct 16, 2009 12:29 pm 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
I followed the instructions at http://knoppmyth.net/phpBB2/viewtopic.php?t=18453 to do a backup and upgrade of my R5E50 box to R5.5.

Everything went smoothly until it tried to restore the DB and then it failed.

Code:
Would you like to configure the database connection now? [yes] 
[console is not interactive, using default 'yes']
Database host name: [192.168.1.4] 
[console is not interactive, using default '192.168.1.4']
Should I test connectivity to this host using the ping command? [yes] 
[console is not interactive, using default 'yes']
Database non-default port: [0] 
[console is not interactive, using default '0']
Database name: [mythconverg] 
[console is not interactive, using default 'mythconverg']
Database user name: [mythtv] 
[console is not interactive, using default 'mythtv']
Database password: [mythtv] 
[console is not interactive, using default 'mythtv']
Unique identifier for this machine (if empty, the local host name will be used): 
[console is not interactive, using default '']
Would you like to use Wake-On-LAN to retry database connections? [no] 
[console is not interactive, using default 'no']
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open

Cannot login to database?


is in my
Code:
/var/log/restore.log
.

The display window showing this on the TV was seeming to flicker between two lines, as if this was repeating a lot. Also, the log file is huge and has the above error repeated.

What can I do to recover from this? I've tried rebooting, but that only brought me back into configuration and the error.

Thanks

p.s. kids and wife are not going to be happy with me if I can't get this up and running soon

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Last edited by jmhunt on Mon Oct 19, 2009 6:19 am, edited 1 time in total.


Top
 Profile  
 
PostPosted: Fri Oct 16, 2009 3:17 pm 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
A friend had me debug this a bit further by seeing if I could list the tables using the default information being used by the restore:

Code:
  echo "show tables" | mysql -u mythtv --password=mythtv -h 192.168.1.4 mythconverg


I get
Quote:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.1.4' (111)
in response.

Doing the above command substituting 127.0.0.1 returned the list of tables.

Now, what do I change to use 127.0.0.1 instead?

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 16, 2009 3:49 pm 
Offline
Joined: Sat Feb 03, 2007 12:52 am
Posts: 187
Location: Manitoba, Canada
I remember something like this. Check out the first ten or so posts in this thread. http://mysettopbox.tv/phpBB2/viewtopic.php?t=18480 After that it gets into errors due to parcially upgraded DB.

I think it was to do with the bind address in /etc/mysql/my.cnf


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 16, 2009 5:09 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
Also look here;
http://mysettopbox.tv/phpBB2/viewtopic.php?t=18548&

Look for the script & run it. That should fix your problem.


Top
 Profile  
 
 Post subject: How long is too long
PostPosted: Sat Oct 17, 2009 7:49 am 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
commenting out the binding in the /etc/mysql/my.cnf did the trick to work through my initial problem.

Now it has been loading the data into the DB for over 14 hours and I suspect it is stuck. There is no sign of progress, so I can't tell if it is taking a really long time to bring in the data from 3+ years of use or if it stopped along the way.

Here is what /var/log/restore.log is reporting:
Code:
./etc/htdigest
./var/www/mythweb/.htaccess
/bin/tar: ./etc/asound.conf: Not found in archive
/bin/tar: ./etc/default/aumix: Not found in archive
/bin/tar: ./var/lib/alsa/asound.state: Not found in archive
Completed the restore of files.
Starting the DB restore, this can take a while...
Clearing out the existing skeleton...
Recreating the db...
Restoring the data (long)...

Any way I can check if it is still churning?

If I should stop and retry, how do I do that?

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 17, 2009 9:53 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Even after 3 years, 14 minutes would be a really long time for your DB restore, let alone 14 hours. How big is you DB backup? Mine hover around 25Mb and only take about 5 minutes to restore:
Code:
root@black2:~# ls -la /myth/backup/mythconverg.sql.gz*
-rw------- 1 root root 24176353 Aug 16 15:23 /myth/backup/mythconverg.sql.gz
-rw------- 1 root root 27291071 Jul 18 16:03 /myth/backup/mythconverg.sql.gz.1
-rw------- 1 root root 23978782 May 26 23:05 /myth/backup/mythconverg.sql.gz.2
-rw------- 1 root root 24118806 Apr  5  2009 /myth/backup/mythconverg.sql.gz.3
-rw------- 1 root root 23519445 Mar 28  2009 /myth/backup/mythconverg.sql.gz.4
-rw------- 1 root root 23705108 Feb 28  2009 /myth/backup/mythconverg.sql.gz.5
-rw------- 1 root root 23568817 Jul 19  2008 /myth/backup/mythconverg.sql.gz.6
-rw------- 1 root root 23368526 Jul  6  2008 /myth/backup/mythconverg.sql.gz.7
-rw------- 1 root root 23377641 Jul  4  2008 /myth/backup/mythconverg.sql.gz.8
-rw------- 1 root root 23281750 Jun 30  2008 /myth/backup/mythconverg.sql.gz.9

The messages about the missing audio config files are harmless and expected. If you've got them it's important to restore them, but if they're not there you didn't need them.

To see if the restore is still running use top or pgrep from the command line. If it's still grinding away it should be near the head of the list in top, to see if it's running at all:
Code:
pgrep -fl mysql  | sed '/mysqld/d'

However after 14 hours I'd be looking for other problems. Check the system log files in /var/log for errors around the time that you started the restore


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 17, 2009 10:16 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
BTW - My first suspect would be a corrupt system image somewhere. When you're slinging around system install images there are an amazing number of places that they can get corrupted, and just a small corruption in the wrong place can cause wild and weird behavior.

I'd start by downloading a fresh copy of the ISO, burning a new CD, and trying the upgrade over again. I'd check the validity of the image at every step along the way.

Before starting I might also run memcheck86 for a couple hours to make sure my RAM wasn't flaky and do a non-destructive disk check too (one that attempts to read every sector on the disk and write it back with the same value) using something like the e2fsck -c mode or a standalone utility. The smartctl program may also be a good option since it uses the disk firmware to run the checks and can be run on a live system.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 17, 2009 7:07 pm 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
Disk full? from /var/log/syslog

Code:
Oct 17 20:31:39 mythtv mysqld[2953]: 091017 20:31:39 [ERROR] /usr/sbin/mysqld: Disk is full writing './mythconverg/recordedseek.MYD' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
Oct 17 20:35:01 mythtv /USR/SBIN/CRON[3591]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 17 20:39:01 mythtv /USR/SBIN/CRON[3594]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm)
Oct 17 20:39:01 mythtv /USR/SBIN/CRON[3595]: (root) CMD (  [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
Oct 17 20:41:39 mythtv mysqld[2953]: 091017 20:41:39 [ERROR] /usr/sbin/mysqld: Disk is full writing './mythconverg/recordedseek.MYD' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
Oct 17 20:45:01 mythtv /USR/SBIN/CRON[3607]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 17 20:51:39 mythtv mysqld[2953]: 091017 20:51:39 [ERROR] /usr/sbin/mysqld: Disk is full writing './mythconverg/recordedseek.MYD' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs
Oct 17 20:55:01 mythtv /USR/SBIN/CRON[3611]: (root) CMD ([ -x /usr/lib/sysstat/sa1 ] && { [ -r "$DEFAULT" ] && . "$DEFAULT" ; [ "$ENABLED" = "true" ] && exec /usr/lib/sysstat/sa1 $SA1_OPTIONS 1 1 ; })
Oct 17 21:01:39 mythtv mysqld[2953]: 091017 21:01:39 [ERROR] /usr/sbin/mysqld: Disk is full writing './mythconverg/recordedseek.MYD' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs


df returns zero available...what can I safely remove to make some space?
Code:
root@mythtv:/var/log# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda1              4766144   4521768         0 100% /

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 
PostPosted: Sat Oct 17, 2009 7:08 pm 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
Or how can I make the volume bigger without risking my other volume which has all my shows I don't want to loose?

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 17, 2009 7:18 pm 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
Or move files temporarily to make sufficient space?

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 17, 2009 9:37 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Out of disk space would definitely do it. :-(

If the system is old enough and still has an extra partition for the live tv buffer you can merge that with the root partition. Aside from that, log files are you best bet for things to clean up.


Top
 Profile  
 
PostPosted: Sun Oct 18, 2009 12:20 pm 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
/var/log/mythtv/mythbackend.log was over 200MB, removing that made enough space to continue...getting dots now for schema upgrade :)

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 
 Post subject: next possible problem
PostPosted: Sun Oct 18, 2009 1:39 pm 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
how long does the all dots screen happen during the upgrade process?

I think it is updating the database schema.

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 18, 2009 11:02 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
There was a known issue where it failed to realize that the DB upgrade had finished. I think there are instructions on what to do for that case in the R5.5 Hints.

Yep, here they are, under Phase 2b, item #4:
Quote:
4) If the system hangs for more than 5-10 minutes at "Waiting for schema upgrade to complete............" hit Ctrl-C. This just means that it didn't see the expected messages in the log file for some reason. Also see: http://mysettopbox.tv/phpBB2/viewtopic.php?t=18478


Top
 Profile  
 
 Post subject: Solved
PostPosted: Mon Oct 19, 2009 6:19 am 
Offline
Joined: Sun Jul 18, 2004 6:24 pm
Posts: 84
Location: Medford, Massachusetts
Thanks for everything tjc. I couldn't find that during a search on that error. Too many other hits I guess. I had read it through before starting, so I had a guess that would work. MythFrontend wouldn't come up after that though even after several reboots.

I ended up doing a fresh upgrade and wiping out hda1 again now knowing how to work through all the issues. This time when I Ctrl-C at the waiting for scheme upgrade part, things worked.

Things are working so far in R5.5. To get the iPhone stuff working out of the box, am I right in understanding that I have to upgrade to R6? I think I'll be in better shape to do that having just done the upgrade to R5.5, but don't want to undertake it for a few days. The kids have been without their shows (except for OnDemand and DVDs) for several days.

Thanks for helping me through!

_________________
AMD Athlon 64 3000+ on MSI K8T Neo
FX5200
pcHD3000
Firewire to Comcast cable box
PVR-250
R6


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 12 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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu