View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 40 posts ] 
Go to page 1, 2, 3  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Feb 24, 2007 2:40 am 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
After successfully backing up (and verifying) my R5D1 backend, I went ahead with the auto-upgrade to R5E50 only to fail on the DB restore section of the upgrade. Below is what my mythbackend.log shows...
Code:
2007-02-23 21:38:34.084 Using runtime prefix = /usr
2007-02-23 21:38:34.120 Unable to read configuration file mysql.txt
2007-02-23 21:38:34.123 Trying to create a basic mysql.txt file
2007-02-23 21:38:34.127 Writing settings file /home/mythtv/.mythtv/mysql.txt
2007-02-23 21:38:34.693 New DB connection, total: 1
2007-02-23 21:38:34.741 Connected to database 'mythconverg' at host: localhost
2007-02-23 21:38:34.794 Current Schema Version:
2007-02-23 21:38:34.802 Newest Schema Version : 1160
2007-02-23 21:38:34.839 New DB connection, total: 2
2007-02-23 21:38:34.845 Connected to database 'mythconverg' at host: localhost
2007-02-23 21:38:34.856 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-02-23 21:38:34.873 New DB connection, total: 3
2007-02-23 21:38:34.879 Connected to database 'mythconverg' at host: localhost
2007-02-23 21:38:34.892 Inserting MythTV initial database information.
2007-02-23 21:38:34.905 New DB connection, total: 4
2007-02-23 21:38:34.910 Connected to database 'mythconverg' at host: localhost
2007-02-23 21:38:34.915 Upgrading to schema version 1112
2007-02-23 21:38:35.834 New DB connection, total: 5
2007-02-23 21:38:35.866 Connected to database 'mythconverg' at host: localhost
2007-02-23 21:38:35.879 Upgrading to schema version 1113
2007-02-23 21:38:35.897 Upgrading to schema version 1114
2007-02-23 21:38:35.932 Upgrading to schema version 1115
2007-02-23 21:38:35.974 Upgrading to schema version 1116
2007-02-23 21:38:35.991 Upgrading to schema version 1117
2007-02-23 21:38:36.031 Upgrading to schema version 1118
2007-02-23 21:38:36.092 Upgrading to schema version 1119
2007-02-23 21:38:36.112 Upgrading to schema version 1120
2007-02-23 21:38:36.152 Upgrading to schema version 1121
2007-02-23 21:38:36.170 Upgrading to schema version 1122
2007-02-23 21:38:36.206 Upgrading to schema version 1123
2007-02-23 21:38:36.249 Upgrading to schema version 1124
2007-02-23 21:38:36.293 Upgrading to schema version 1125
2007-02-23 21:38:36.341 Upgrading to schema version 1126
2007-02-23 21:38:36.375 Upgrading to schema version 1127
2007-02-23 21:38:36.498 Upgrading to schema version 1128
2007-02-23 21:38:36.536 Upgrading to schema version 1129
2007-02-23 21:38:36.640 Upgrading to schema version 1130
2007-02-23 21:38:36.655 Upgrading to schema version 1131
2007-02-23 21:38:36.724 Upgrading to schema version 1132
2007-02-23 21:38:36.813 Upgrading to schema version 1133
2007-02-23 21:38:36.863 Upgrading to schema version 1134
2007-02-23 21:38:36.879 Upgrading to schema version 1135
2007-02-23 21:38:37.013 Upgrading to schema version 1136
2007-02-23 21:38:37.061 Upgrading to schema version 1137
2007-02-23 21:38:37.242 Upgrading to schema version 1138
2007-02-23 21:38:37.257 Upgrading to schema version 1139
2007-02-23 21:38:37.362 Upgrading to schema version 1140
2007-02-23 21:38:37.375 Upgrading to schema version 1141
2007-02-23 21:38:37.431 Upgrading to schema version 1142
2007-02-23 21:38:37.450 Upgrading to schema version 1143
2007-02-23 21:38:37.545 Upgrading to schema version 1144
2007-02-23 21:38:37.559 Upgrading to schema version 1145
2007-02-23 21:38:37.576 Upgrading to schema version 1146
2007-02-23 21:38:37.593 Upgrading to schema version 1147
2007-02-23 21:38:37.650 Upgrading to schema version 1148
2007-02-23 21:38:37.725 Upgrading to schema version 1149
2007-02-23 21:38:37.777 Upgrading to schema version 1150
2007-02-23 21:38:37.792 Upgrading to schema version 1151
2007-02-23 21:38:37.856 Upgrading to schema version 1152
2007-02-23 21:38:37.892 Upgrading to schema version 1153
2007-02-23 21:38:37.950 Upgrading to schema version 1154
2007-02-23 21:38:38.026 Upgrading to schema version 1155
2007-02-23 21:38:38.082 Upgrading to schema version 1156
2007-02-23 21:38:38.120 Upgrading to schema version 1157
2007-02-23 21:38:38.137 Upgrading to schema version 1158
2007-02-23 21:38:38.234 Upgrading to schema version 1159
2007-02-23 21:38:38.271 Upgrading to schema version 1160
2007-02-23 21:38:38.281 Database Schema upgrade complete, unlocking.
No setting found for this machine's BackendServerIP.
Please run setup on this machine and modify the first page
of the general settings.
2007-02-24 01:22:23.899 Using runtime prefix = /usr
2007-02-24 01:22:24.248 New DB connection, total: 1
2007-02-24 01:22:24.297 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:22:24.360 Current Schema Version:
2007-02-24 01:22:24.367 Newest Schema Version : 1160
2007-02-24 01:22:24.429 New DB connection, total: 2
2007-02-24 01:22:24.435 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:22:24.464 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-02-24 01:22:24.475 New DB connection, total: 3
2007-02-24 01:22:24.479 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:22:24.494 Told to create a NEW database schema, but the database
already has 42 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-02-24 01:22:24.505 Database Schema upgrade FAILED, unlocking.
2007-02-24 01:22:24.508 Couldn't upgrade database to new schema
2007-02-24 01:27:33.210 Using runtime prefix = /usr
2007-02-24 01:27:33.609 New DB connection, total: 1
2007-02-24 01:27:33.653 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:27:33.687 Current Schema Version:
2007-02-24 01:27:33.694 Newest Schema Version : 1160
2007-02-24 01:27:33.718 New DB connection, total: 2
2007-02-24 01:27:33.730 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:27:33.746 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-02-24 01:27:33.768 New DB connection, total: 3
2007-02-24 01:27:33.789 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:27:33.817 Told to create a NEW database schema, but the database
already has 42 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-02-24 01:27:33.820 Database Schema upgrade FAILED, unlocking.
2007-02-24 01:27:33.824 Couldn't upgrade database to new schema
2007-02-24 01:36:50.071 Using runtime prefix = /usr
2007-02-24 01:36:50.343 New DB connection, total: 1
2007-02-24 01:36:50.384 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:36:50.417 Current Schema Version:
2007-02-24 01:36:50.424 Newest Schema Version : 1160
2007-02-24 01:36:50.443 New DB connection, total: 2
2007-02-24 01:36:50.448 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:36:50.458 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-02-24 01:36:50.478 New DB connection, total: 3
2007-02-24 01:36:50.490 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:36:50.517 Told to create a NEW database schema, but the database
already has 42 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-02-24 01:36:50.520 Database Schema upgrade FAILED, unlocking.
2007-02-24 01:36:50.539 Couldn't upgrade database to new schema
2007-02-24 01:40:12.428 Using runtime prefix = /usr
2007-02-24 01:40:12.695 New DB connection, total: 1
2007-02-24 01:40:12.736 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:40:12.769 Current Schema Version:
2007-02-24 01:40:12.776 Newest Schema Version : 1160
2007-02-24 01:40:12.792 New DB connection, total: 2
2007-02-24 01:40:12.797 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:40:12.802 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-02-24 01:40:12.811 New DB connection, total: 3
2007-02-24 01:40:12.816 Connected to database 'mythconverg' at host: localhost
2007-02-24 01:40:12.832 Told to create a NEW database schema, but the database
already has 42 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-02-24 01:40:12.846 Database Schema upgrade FAILED, unlocking.
2007-02-24 01:40:12.850 Couldn't upgrade database to new schema
2007-02-24 02:24:14.765 Using runtime prefix = /usr
2007-02-24 02:24:15.210 New DB connection, total: 1
2007-02-24 02:24:15.257 Connected to database 'mythconverg' at host: localhost
2007-02-24 02:24:15.307 Current Schema Version:
2007-02-24 02:24:15.315 Newest Schema Version : 1160
2007-02-24 02:24:15.338 New DB connection, total: 2
2007-02-24 02:24:15.347 Connected to database 'mythconverg' at host: localhost
2007-02-24 02:24:15.356 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-02-24 02:24:15.382 New DB connection, total: 3
2007-02-24 02:24:15.398 Connected to database 'mythconverg' at host: localhost
2007-02-24 02:24:15.436 Told to create a NEW database schema, but the database
already has 42 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-02-24 02:24:15.456 Database Schema upgrade FAILED, unlocking.
2007-02-24 02:24:15.476 Couldn't upgrade database to new schema
2007-02-24 02:54:09.622 Using runtime prefix = /usr
2007-02-24 02:54:09.828 New DB connection, total: 1
2007-02-24 02:54:09.864 Connected to database 'mythconverg' at host: localhost
2007-02-24 02:54:09.890 Current Schema Version:
2007-02-24 02:54:09.896 Newest Schema Version : 1160
2007-02-24 02:54:09.911 New DB connection, total: 2
2007-02-24 02:54:09.920 Connected to database 'mythconverg' at host: localhost
2007-02-24 02:54:09.933 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by another Myth process.
2007-02-24 02:54:09.940 New DB connection, total: 3
2007-02-24 02:54:09.945 Connected to database 'mythconverg' at host: localhost
2007-02-24 02:54:09.967 Told to create a NEW database schema, but the database
already has 42 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-02-24 02:54:09.969 Database Schema upgrade FAILED, unlocking.
2007-02-24 02:54:09.972 Couldn't upgrade database to new schema


I did some searching around the forums and found this post http://mysettopbox.tv/phpBB2/viewtopic. ... bschemaver

In it, tjc instructed to run
Code:
mysql mythconverg -e "select * from settings order by value;"

to see if a Schema variable. When I run it I get the following result.
Code:
ERROR 1146 (42S02) at line 1: Table 'mythconverg.settings' doesn't exist

I did a little more searching in the forums and found the "Repairing broken MySQL tables" post. I ran
Code:
cd /var/lib/mysql/mythconverg
/etc/init.d/mythtv-backend stop
/etc/init.d/mysql stop
myisamchk *.MYI >> mythconverg_check.log

but the log does not show any corrupt tables. When I restart mysql, I get this little message:
Code:
Checking for corrupt, not cleanly closed and upgrade needing tables..

Also tried running checkrestore and got the following result.
Code:
Checking for the existance of the DB dump file...
DB dump file exists. Checking the compression...
Compression looks OK. Checking DB dump contents...
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
Comparing live versus saved tables...
2c2
< capturecard 2
---
> capturecard 1
20c20
< keybindings 585
---
> keybindings 584
42c42,49
< recorded 113
---
> recorded 443
> recordedcredits 0
> recordedmarkup 0
> recordedprogram 0
> recordedrating 0
> recordingprofiles 29
> recordmatch 0
> romdb 0
43a51,67
> settings 917
> smartplaylist 8
> smartplaylistcategory 3
> smartplaylistitem 8
> streams 31
> tvchain 1
> videobookmarks 0
> videocategory 0
> videocountry 3
> videogenre 10
> videometadata 20
> videometadatacountry 7
> videometadatagenre 21
> videosource 1
> videotypes 10
> websites 3
> xvmc_buffer_settings 2
Warning, table lists are not identical!

I'm pretty sure I added an extra capture card by accident when I manually started myth-setup after the DB upgrade failed, but I can't explain why the other lists are not identical.

Sorry for the long post but I tried to do as much research as I could before posting. Any help would be greatly appreciated!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 24, 2007 10:02 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Make sure that both the backend and frontend are shut down and run the restore manually as root. It will restart the backend itself. Then check the log files again.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 24, 2007 11:20 am 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
Ok I made sure both backend and frontend were stopped and ran mythrestore as root. Here were the on screen results I copied starting at the database restore part:

Code:
Starting the DB restore, this can take a while...
Clearing out the existing skeleton...
ERROR 1010 (HY000) at line 1: Error dropping database (can't rmdir './mythconverg/', errno: 17)
Recreating the db...
mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'mythconverg'; database exists'
Restoring the data (long)...
ERROR 1062 (23000) at line 713797: Duplicate entry '1060-0000-00-00 00:00:00' for key 1
Doing any needed db updates...
Completed the DB restore.
Sanity checking your restore...

Checking for the existance of the backup tar file...
Backup tar file exists. Checking the compression...
Compression looks OK. Checking backup tar file contents...
Generating a list of the backup contents...
tar: ./etc/htdigest: Not found in archive
tar: ./etc/apache2/apache2.conf: Not found in archive
tar: ./var/www/mythweb/.htaccess: Not found in archive
tar: Error exit delayed from previous errors
Generating a list of the directory contents...
Comparing directory versus backup contents...
0a1,2
> ./etc/apache2/apache2.conf
> ./etc/htdigest
4a7
> ./etc/lirc/lirc-modules-source.conf
1481a1492
> ./home/mythtv/.mythtv/mysql.txt
1483,1497d1493
< ./home/mythtv/.mythtv/mythstream/cache
< ./home/mythtv/.mythtv/mythstream/cache/cacheindex
< ./home/mythtv/.mythtv/mythstream/downloads
< ./home/mythtv/.mythtv/mythstream/parsers
< ./home/mythtv/.mythtv/mythstream/parsers/apple.pl
< ./home/mythtv/.mythtv/mythstream/parsers/default.pl
< ./home/mythtv/.mythtv/mythstream/parsers/example.pl
< ./home/mythtv/.mythtv/mythstream/parsers/example.xml
< ./home/mythtv/.mythtv/mythstream/parsers/icecast.pl
< ./home/mythtv/.mythtv/mythstream/parsers/list.xml
< ./home/mythtv/.mythtv/mythstream/parsers/podcast.pl
< ./home/mythtv/.mythtv/mythstream/parsers/rdfcast.pl
< ./home/mythtv/.mythtv/mythstream/parsers/shoutcast.pl
< ./home/mythtv/.mythtv/mythstream/storages.res
< ./home/mythtv/.mythtv/mythstream/streams.res
1577a1574,1576
> ./home/mythtv/.serverauth.2671
> ./home/mythtv/.serverauth.2673
> ./home/mythtv/.serverauth.3993
5539a5539
> ./home/mythtv/babysit_backend.sh
13155a13156
> ./root/.lesshst
13636a13638
> ./root/crontab.txt
13637a13640
> ./var/www/mythweb/.htaccess
Warning, file lists are not identical!

Checking for the existance of the DB dump file...
DB dump file exists. Checking the compression...
Compression looks OK. Checking DB dump contents...
Generating a list of tables and record counts in the DB dump...
Generating a list of tables and record counts in the live DB...
Comparing live versus saved tables...
42c42,67
< recorded 113
---
> recorded 443
> recordedcredits 0
> recordedmarkup 0
> recordedprogram 0
> recordedrating 0
> recordingprofiles 29
> recordmatch 0
> romdb 0
> schemalock 0
> settings 917
> smartplaylist 8
> smartplaylistcategory 3
> smartplaylistitem 8
> streams 31
> tvchain 1
> videobookmarks 0
> videocategory 0
> videocountry 3
> videogenre 10
> videometadata 20
> videometadatacountry 7
> videometadatagenre 21
> videosource 1
> videotypes 10
> websites 3
> xvmc_buffer_settings 2
Warning, table lists are not identical!

The restore failed or was already modified!
Doing any needed file updates...
Starting MythTV server: mythbackend.

Heres the most recent entry on the myth mythbackend.log:
Code:
2007-02-24 09:47:32.916 Database Schema upgrade FAILED, unlocking.
2007-02-24 09:47:32.920 Couldn't upgrade database to new schema
2007-02-24 12:05:01.765 Using runtime prefix = /usr
2007-02-24 12:05:02.167 New DB connection, total: 1
2007-02-24 12:05:02.209 Connected to database 'mythconverg' at host: localhost
2007-02-24 12:05:02.245 Current Schema Version:
2007-02-24 12:05:02.269 Newest Schema Version : 1160
2007-02-24 12:05:02.288 New DB connection, total: 2
2007-02-24 12:05:02.305 Connected to database 'mythconverg' at host: localhost
2007-02-24 12:05:02.337 Setting Lock for Database Schema upgrade. If you see a long pause here it means the Schema is already locked and is being upgraded by
another Myth process.
2007-02-24 12:05:02.349 New DB connection, total: 3
2007-02-24 12:05:02.354 Connected to database 'mythconverg' at host: localhost
2007-02-24 12:05:02.369 Told to create a NEW database schema, but the database
already has 42 tables.
If you are sure this is a good mythtv database, verify
that the settings table has the DBSchemaVer variable.

2007-02-24 12:05:02.378 Database Schema upgrade FAILED, unlocking.
2007-02-24 12:05:02.387 Couldn't upgrade database to new schema

I added the babysit backend script before my orignal post, because I initially thought that was my problem. I'm sure it hasn't tried to start backup as there are no new log entries in babysit_backend.log since my original post.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 24, 2007 1:04 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
You will need to turn off the babysitting script. This is part of the reason scripts like that are often a bad idea. There are times when you're doing system maintenance when you need to be able to shutdown servers, and magic restart mechanisms can prevent that.

Until you get a succesful restore to go through you're DOA. I might go as far as forcibly removing the old mythconverg DB by hand before running the restore, but get those servers stopped first. You're not going to get a good restore until you can eliminate that interference.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 24, 2007 2:56 pm 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
I cleared the crontab and made sure the mybackend is not running. Just have a quick question because I'm kinda unsure about it. Do I also have to also stop mysqld before trying the restore? Or does that need to be running? I left it up when I tried the manual restore. Thanks for your time!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 24, 2007 7:37 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
You can leave it up. The restore generally shuts things down and restarts them as needed. Having you shut down the front end and back end was a precaution since the backend was trying to upgrade the DB.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 24, 2007 8:26 pm 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
Hmmm... Getting the same error at the database restore section:
Code:
Starting the DB restore, this can take a while...
Clearing out the existing skeleton...
ERROR 1010 (HY000) at line 1: Error dropping database (can't rmdir './mythconverg/', errno: 17)
Recreating the db...
mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'mythconverg'; database exists'
Restoring the data (long)...

Do you think I have any further options or should I just backup my shows to another computer, install clean and use myth.rebuilddatabase to import my shows? That may be more work in the long run though. It would be nice if I could get myth.rebuilddatabase to read my recorded table and import them that way...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 24, 2007 8:47 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
We can try removing the DB manually. Make sure that mysqld is running then enter this command as root:
Code:
mysqladmin -u root -f drop mythconverg


You don't have anything odd in your custom restore.list do you? Restoring the DB directories like /var/lib/mysql/mythconverg or config files like /etc/mysql/my.cnf would probably be a bad idea...

Also check the settings in /etc/mysql/my.cnf to make sure that datadir = /var/lib/mysql and that that directory exists and has the right ownership and permissions:
Code:
root@black2:~# grep datadir /etc/mysql/my.cnf
datadir         = /var/lib/mysql
root@black2:~# ls -al /var/lib/mysql
total 20544
drwxr-xr-x  4 mysql mysql     4096 Feb 18 15:29 .
drwxr-xr-x 36 root  root      4096 Feb  5 23:43 ..
-rw-r--r--  1 mysql mysql        0 Jan 20 18:54 debian-5.0.flag
-rw-rw----  1 mysql mysql  5242880 Feb 18 15:29 ib_logfile0
-rw-rw----  1 mysql mysql  5242880 Nov  5 15:32 ib_logfile1
-rw-rw----  1 mysql mysql 10485760 Feb 18 15:28 ibdata1
drwxr-xr-x  2 mysql mysql     4096 Feb 18 15:29 mysql
-rw-------  1 mysql mysql        4 Nov  5 15:32 mysql_upgrade.info
drwx------  2 mysql mysql     8192 Feb  5 22:59 mythconverg


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 12:14 am 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
When I try dropping mythconverg I get this error:
Code:
root@mythtvbk:~# mysqladmin -u root -f drop mythconverg
mysqladmin: DROP DATABASE mythconverg failed;
error: 'Error dropping database (can't rmdir './mythconverg/', errno: 17)'

Verified that mysqld is running. Should I try through Webmin?

I don't have a custom restore.list file, so I shouldn't be restoring any supplemental files...

Here are the results of the two commands you had me run.
Code:
root@mythtvbk:~# grep datadir /etc/mysql/my.cnf
datadir         = /var/lib/mysql
root@mythtvbk:~# ls -al /var/lib/mysql
total 20540
drwxr-xr-x  4 mysql mysql     4096 Feb 24 09:47 .
drwxr-xr-x 35 root  root      4096 Dec 20 11:54 ..
-rw-r--r--  1 mysql mysql        0 Nov 28 22:17 debian-5.0.flag
-rw-rw----  1 mysql mysql  5242880 Feb 24 09:47 ib_logfile0
-rw-rw----  1 mysql mysql  5242880 Nov  5 15:32 ib_logfile1
-rw-rw----  1 mysql mysql 10485760 Feb 24 03:42 ibdata1
drwxr-xr-x  2 mysql mysql     4096 Feb 24 09:47 mysql
-rw-------  1 mysql mysql        4 Nov  5 15:32 mysql_upgrade.info
drwx------  2 mysql mysql     4096 Feb 25 01:02 mythconverg

They look to be ok.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 12:39 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Alright lets get nasty. Remove the directory manually using:
Code:
rm -rf /var/lib/mysql/mythconverg

If it complains about the directory being in use, shutdown mysqld and try again. You can also use the lsof command to see if anything else is using it. Next restart mysqld if necessary and use webmin to delete the entries in the mysql:db table for mythconverg (there may be 2 of these).

At this point hopefully the restore can be used to recreate it.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 4:29 pm 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
I was able to manually remove the directory and the two mythconverg entries in mysql:db per your instructions. From the output of the log it looks like the restore was successful (Edit: I think I spoke too soon about the restore being successful. I checked out the mythconverg db through webmin and it only has 4 tables in it.)... but user mythtv can't connect to mythconverg. Here's the info from mythbackend.log:
Code:
2007-02-25 08:36:32.240 Using runtime prefix = /usr
2007-02-25 08:36:32.682 New DB connection, total: 1
2007-02-25 08:36:32.727 Connected to database 'mythconverg' at host: localhost
2007-02-25 08:36:32.789 Current Schema Version:
2007-02-25 08:36:32.797 Newest Schema Version : 1160
2007-02-25 08:36:32.821 New DB connection, total: 2
2007-02-25 08:36:32.827 Connected to database 'mythconverg' at host: localhost
2007-02-25 08:36:32.859 Setting Lock for Database Schema upgrade. If you see a l
ong pause here it means the Schema is already locked and is being upgraded by an
other Myth process.
2007-02-25 08:36:32.871 New DB connection, total: 3
2007-02-25 08:36:32.888 Connected to database 'mythconverg' at host: localhost
2007-02-25 08:36:32.924 Inserting MythTV initial database information.
2007-02-25 08:36:32.938 New DB connection, total: 4
2007-02-25 08:36:32.943 Connected to database 'mythconverg' at host: localhost
2007-02-25 08:36:32.947 Upgrading to schema version 1112
2007-02-25 08:36:34.044 New DB connection, total: 5
2007-02-25 08:36:34.062 Connected to database 'mythconverg' at host: localhost
2007-02-25 08:36:34.080 Upgrading to schema version 1113
2007-02-25 08:36:34.112 Upgrading to schema version 1114
2007-02-25 08:36:34.138 Upgrading to schema version 1115
2007-02-25 08:36:34.176 Upgrading to schema version 1116
2007-02-25 08:36:34.211 Upgrading to schema version 1117
2007-02-25 08:36:34.251 Upgrading to schema version 1118
2007-02-25 08:36:34.301 Upgrading to schema version 1119
2007-02-25 08:36:34.320 Upgrading to schema version 1120
2007-02-25 08:36:34.353 Upgrading to schema version 1121
2007-02-25 08:36:34.366 Upgrading to schema version 1122
2007-02-25 08:36:34.402 Upgrading to schema version 1123
2007-02-25 08:36:34.439 Upgrading to schema version 1124
2007-02-25 08:36:34.467 Upgrading to schema version 1125
2007-02-25 08:36:34.590 Upgrading to schema version 1126
2007-02-25 08:36:34.632 Upgrading to schema version 1127
2007-02-25 08:36:34.701 Upgrading to schema version 1128
2007-02-25 08:36:34.731 Upgrading to schema version 1129
2007-02-25 08:36:34.824 Upgrading to schema version 1130
2007-02-25 08:36:34.836 Upgrading to schema version 1131
2007-02-25 08:36:34.903 Upgrading to schema version 1132
2007-02-25 08:36:34.932 Upgrading to schema version 1133
2007-02-25 08:36:34.988 Upgrading to schema version 1134
2007-02-25 08:36:35.012 Upgrading to schema version 1135
2007-02-25 08:36:35.082 Upgrading to schema version 1136
2007-02-25 08:36:35.138 Upgrading to schema version 1137
2007-02-25 08:36:35.194 Upgrading to schema version 1138
2007-02-25 08:36:35.231 Upgrading to schema version 1139
2007-02-25 08:36:35.379 Upgrading to schema version 1140
2007-02-25 08:36:35.393 Upgrading to schema version 1141
2007-02-25 08:36:35.464 Upgrading to schema version 1142
2007-02-25 08:36:35.483 Upgrading to schema version 1143
2007-02-25 08:36:35.532 Upgrading to schema version 1144
2007-02-25 08:36:35.546 Upgrading to schema version 1145
2007-02-25 08:36:35.572 Upgrading to schema version 1146
2007-02-25 08:36:35.606 Upgrading to schema version 1147
2007-02-25 08:36:35.698 Upgrading to schema version 1148
2007-02-25 08:36:35.780 Upgrading to schema version 1149
2007-02-25 08:36:35.902 Upgrading to schema version 1150
2007-02-25 08:36:35.922 Upgrading to schema version 1151
2007-02-25 08:36:36.116 Upgrading to schema version 1152
2007-02-25 08:36:36.159 Upgrading to schema version 1153
2007-02-25 08:36:36.226 Upgrading to schema version 1154
2007-02-25 08:36:36.290 Upgrading to schema version 1155
2007-02-25 08:36:36.339 Upgrading to schema version 1156
2007-02-25 08:36:36.367 Upgrading to schema version 1157
2007-02-25 08:36:36.386 Upgrading to schema version 1158
2007-02-25 08:36:36.491 Upgrading to schema version 1159
2007-02-25 10:45:05.368 Using runtime prefix = /usr
2007-02-25 10:45:05.690 New DB connection, total: 1
2007-02-25 10:45:05.732 Connected to database 'mythconverg' at host: localhost
2007-02-25 10:45:05.782 Current Schema Version: 1160
No setting found for this machine's BackendServerIP.
Please run setup on this machine and modify the first page
of the general settings.
2007-02-26 17:19:33.775 Using runtime prefix = /usr
2007-02-26 17:19:34.258 New DB connection, total: 1
2007-02-26 17:19:34.305 Unable to connect to database!
2007-02-26 17:19:34.307 Driver error was [1/1044]:
QMYSQL3: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' to database 'mythconverg'

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2007-02-26 17:19:34.397 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError?  Strange...
2007-02-26 17:19:34.452 Failed to init MythContext, exiting.

I haven't run mythtv-setup yet, is that the reason why user mythtv cannot access mythconverg?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 8:37 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Yeah, looks like we beat the restore problem to jelly. ;-)

Definitely try running mythtv-setup. There's a text file whose location I forget with DB connection information, but it's covered in Cecil's LinHES directions. You actually want to do the reverse of what is done there.

I'd also take a look at your network setup to make sure things are kosher/halal/... KM systems seem to like the given hostname to be a synonym for localhost (the loopback address 127.0.0.1) in /etc/hosts, and anytime I've changed this it's caused me pain.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 9:02 pm 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
I tried to run mythtv-setup but I get a page or to full of these type of errors:
Code:
2007-02-26 21:58:37.379 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError?  Strange...
2007-02-26 21:58:37.432 Database not open while trying to save setting: Language
2007-02-26 21:58:37.436 Unable to connect to database!
2007-02-26 21:58:37.437 Driver error was [1/1044]:
QMYSQL3: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' to database 'mythconverg'

2007-02-26 21:58:37.494 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError?  Strange...
2007-02-26 21:58:39.212 User canceled database configuration
2007-02-26 21:58:39.595 Failed to init MythContext, exiting.

Mythtv-setup does eventually launch but once I hit Finish in the General section, I'm brought back to the bash shell.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 9:17 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Is mysqld running?
Code:
root@black2:~# pgrep -fl mysql
29037 /bin/sh /usr/bin/mysqld_safe
29074 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
29075 logger -p daemon.err -t mysqld_safe -i -t mysqld

Is the Unix domain siocket OK?
Code:
root@black2:~# ls -al /var/run/mysqld/mysqld.sock
srwxrwxrwx 1 mysql mysql 0 Feb 25 14:34 /var/run/mysqld/mysqld.sock

Is it listening on both the Unix and TCP sockets?
Quote:
root@black2:~# netstat -a | grep LISTEN
tcp 0 0 *:nfs *:* LISTEN
tcp 0 0 black2:mysql *:* LISTEN
tcp 0 0 *:kerberos4 *:* LISTEN
tcp 0 0 *:6543 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:6544 *:* LISTEN
tcp 0 0 *:webmin *:* LISTEN
tcp 0 0 *:56272 *:* LISTEN
tcp 0 0 black2:6010 *:* LISTEN
tcp 0 0 black2:6011 *:* LISTEN
tcp 0 0 *:54557 *:* LISTEN
tcp 0 0 black2:3551 *:* LISTEN
tcp6 0 0 *:www *:* LISTEN
tcp6 0 0 *:ssh *:* LISTEN
tcp6 0 0 ip6-localhost:6010 *:* LISTEN
tcp6 0 0 ip6-localhost:6011 *:* LISTEN
unix 2 [ ACC ] STREAM LISTENING 10285 /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 9481 /dev/lircd
unix 2 [ ACC ] STREAM LISTENING 10301 @/var/run/hald/dbus-vy7ZoBjCtp
unix 2 [ ACC ] STREAM LISTENING 13005 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 13087 /tmp/ssh-FSXikU3500/agent.3500
unix 2 [ ACC ] STREAM LISTENING 13096 @/tmp/dbus-Asf01JpwuY
unix 2 [ ACC ] STREAM LISTENING 10300 @/var/run/hald/dbus-e2Az9bTRbI
unix 2 [ ACC ] STREAM LISTENING 379482 /var/run/mysqld/mysqld.sock


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 9:24 pm 
Offline
Joined: Thu Feb 16, 2006 2:07 pm
Posts: 21
Ran the commands and got the results below. Not sure if you caught my edit in my above post, but I checked on mythconverg through webmin and I only see 4 tables. Could that be whats causing mythtv to be denied access to mythconverg? Do I have to manually set permissions on mythconverg for mythtv user to have access? Thanks for sticking with me on this issue tjc.
Code:
root@mythtvbk:/etc# pgrep -fl mysql
2342 /bin/sh /usr/bin/mysqld_safe
2379 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
2380 logger -p daemon.err -t mysqld_safe -i -t mysqld
root@mythtvbk:/etc# ls -al /var/run/mysqld/mysqld.sock
srwxrwxrwx 1 mysql mysql 0 Feb 26 21:46 /var/run/mysqld/mysqld.sock
root@mythtvbk:/etc# netstat -a | grep LISTEN
tcp        0      0 *:nfs                   *:*                     LISTEN
tcp        0      0 *:customs               *:*                     LISTEN
tcp        0      0 mythtvbk:mysql          *:*                     LISTEN
tcp        0      0 *:36203                 *:*                     LISTEN
tcp        0      0 *:5900                  *:*                     LISTEN
tcp        0      0 *:sunrpc                *:*                     LISTEN
tcp        0      0 *:www                   *:*                     LISTEN
tcp        0      0 *:34489                 *:*                     LISTEN
tcp6       0      0 *:ssh                   *:*                     LISTEN


EDIT:

Woops, looks like I left out some of the netstat output. Heres the rest of it...
Code:
unix  2      [ ACC ]     STREAM     LISTENING     9515     /tmp/ssh-YrQWuF2766/agent.2766
unix  2      [ ACC ]     STREAM     LISTENING     7726     @/var/run/hald/dbus-AXDEGBccoC
unix  2      [ ACC ]     STREAM     LISTENING     9524     @/tmp/dbus-QKyRqNBVBI
unix  2      [ ACC ]     STREAM     LISTENING     7725     @/var/run/hald/dbus-r1sWCgOFFV
unix  2      [ ACC ]     STREAM     LISTENING     7710     /var/run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     9459     /tmp/.X11-unix/X0
unix  2      [ ACC ]     STREAM     LISTENING     9664     /tmp/orbit-mythtv/linc-afb-0-583d876f1a1b3
unix  2      [ ACC ]     STREAM     LISTENING     9670     /tmp/orbit-mythtv/linc-aef-0-34dbf99f30189
unix  2      [ ACC ]     STREAM     LISTENING     7129     /var/run/mysqld/mysqld.sock


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ] 
Go to page 1, 2, 3  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 29 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