View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 9 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Jun 05, 2009 1:52 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi,

A bit of a different issue and need a pointer to hopefully obtain a solution.

Going to alt s for the card setup, I find my tuners have disappeared. A low profile pvr-150 & hdhomerun. They were there and working properly. Trying to do the card setup both are seen but when finished do not show up in list of available tuners.

The card works fine both radio & tv but doesn't show anywhere to use for watching / recording.

I did a db check and all seems to be ok there. Hints are welcomed!

Thanks
Mike


Last edited by mjl on Sat Jun 06, 2009 10:55 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 05, 2009 10:51 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Did you look directly at the DB table (capturecard)? Is it completely empty? If not there might be some clues there, otherwise the question becomes what's happening to it's contents, and it's probably time to run the DB with debug logging for a while.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 06, 2009 1:40 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi tjc!

I was hoping you would see my delema..

I looked with webmin at the capturecard table, nothing unusual was obvious to me.
I ran mythtv-setup in an xterm window, and that complained a lot. Some items not related but:
2009-06-06 14:40:16.154 DB Error (CaptureCard::fillSelections):
Query was:
SELECT cardid, cardtype, videodevice FROM capturecard WHERE hostname ='KM-I120' AND parentid='0'
Driver error was [2/1054]:
QMYSQL3: Unable to execute query
Database error was:
Unknown column 'parentid' in 'where clause'

2009-06-06 14:40:17.531 DiSEqCDevTree, Warning: No device tree for cardid0
2009-06-06 14:40:31.502 DB Error (simpledbstorage update):
Query was:

No error type from QSqlError? Strange...
2009-06-06 14:40:31.550 DB Error (CaptureCard::fillSelections):
Query was:
SELECT cardid, cardtype, videodevice FROM capturecard WHERE hostname = 'KM-I120' AND parentid='0'
Driver error was [2/1054]:
QMYSQL3: Unable to execute query
Database error was:
Unknown column 'parentid' in 'where clause'

2009-06-06 14:40:37.595 Connecting to backend server: 127.0.0.1:6543 (try 1 of 5)

I have run the repair & the optomize_db with same end result. (don't work)

This part I didn't quite understand:
2009-06-06 14:39:40.147 Current Schema Version: 1214
2009-06-06 14:39:40.166 New DB connection, total: 2
2009-06-06 14:39:40.168 Connected to database 'mythconverg' at host: localhost
2009-06-06 14:39:40.180 Newest Schema Version : 1160
2009-06-06 14:39:40.183 New DB connection, total: 3
2009-06-06 14:39:40.185 Connected to database 'mythconverg' at host: localhost
2009-06-06 14:39:40.188 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.
2009-06-06 14:39:40.190 Database Schema upgrade complete, unlocking.

I am running R5F27 on a 900 mhz 256 meg noname gateway box and has been fine. I watch very little tv so not sure of when the actual issue popped up. Other menu items accept changes, just can't select the card.?

Thanks
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 06, 2009 3:58 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Sounds like you connected to that BE with a newer version FE and upgraded the DB, or suffered some other kind of version mix and match funnies. In schema version 1214 (current as of R5.5) there is no parentid column. If you are running R5F27 with the stock version of MythTV it's almost certainly expecting an older schema version.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 06, 2009 4:36 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
I don't recall doing that as I don't have 5.5, just F27 & LinHES but I have loaned the box out to a friend. He might of had a test 5.5 running and hosed it accidently.

Question is then, how do I undo the schema change? I'm not concerned with the content but don't want to loose my system stuff with a rebuild.

Thanks
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 06, 2009 9:03 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Nontrivial I'm afraid. Do you have an old back up on the machine? You could restore from that, which would give you the old schema and contents, then use the myth.rebuilddatabase.pl script to clean up any dangling recordings.

If that isn't possible, or doesn't work, you could try running the SQL script that's used to create the initial schema. I don't remember what kind of prep/post work is required though. (e.g. - dropping the DB instance before, or loading initial config data after.)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 06, 2009 10:53 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Suspected as much. :( Anyway, what I did to bring life back was to do a backup of my main F27 box, then copied the mysql .gz over and did a normal restore on the sick box. Cecil said it checked good (he doesn't tell stories either).

Changed the hostname to match and rebooted. Had to tweak a couple of settings and do the rescan for stuff but all was fine. I didn't have any tv recordings so no greif there. As soon as I can find the script to change the hostname in the db back to the original all will be fully restored.

Is there any way to lock the schema from wanting to update? With me staying "several" versions behind it would be nice not to have such an accident waiting to reoccur. Can't complain as this is a first for me since R3 days. :)

Thanks tjc for the ideas as what was going on in the background, it was what I needed. I REALLY didn't want to have to reinstall and loose all my tools!

Thanks!
Mike


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 07, 2009 10:36 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Once upon a time I wrote a script to do the DB rename stuff. It wasn't perfect but it should get you 98% of the way there. The original is available here but it looks slightly out of date. Although for R5F27 it might be just the ticket.

Here is the current version. The blood curdling warnings still apply. It was correct to the best of my knowledge when I last looked at a year ago, but that still leaves any number of possible holes.

Code:
#!/bin/bash

old="$1"
new="$2"

fatal () {
    echo "Error! $*"
    exit 1
}
nl='
'
usage () {
    fatal "$*${nl}Usage: $0 old_hostname new_hostname"
}

DATABASE="mythconverg"

mysql_cmd () { # Execute SQL from the command line
    /usr/bin/mysql -u root "$DATABASE" -sBe "$*"
}

[ $(id -u) -ne 0 ] && fatal "You must run this script as root!"
[ $# -ne 2 ] && usage "Bad argument count!"
[ -z "$old" ] && fatal "Old hostname can not be blank!"
[ -z "$new" ] && fatal "New hostname can not be blank!"

echo
echo "=============================== WARNING! =============================="
echo "This only changes the hostnames stored in the database. Also, if mysql"
echo "complains about uniqueness you'll need to resolve the issue manually."
echo "=============================== WARNING! =============================="
echo
read -p "Hit enter to continue, or Ctrl-C to abort."

# Tables which contain hostname
for table in capturecard displayprofilegroups inuseprograms jobqueue \
             jumppoints keybindings music_playlists musicplaylist \
             profilegroups recorded settings storagegroup \
             weatherscreens weathersourcesettings ; do
    mysql_cmd "update $table set hostname = '$new' where hostname = '$old'"
done

# Tables which contain host
for table in mythlog ; do
    mysql_cmd "update $table set host = '$new' where host = '$old'"
done

# Tables which contain rechost
for table in inuseprograms ; do
    mysql_cmd "update $table set rechost = '$new' where rechost = '$old'"
done

# No idea whether these need attention too...
# dbox2_host capturecard
# hostprefix tvchain


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 07, 2009 10:28 pm 
Offline
Joined: Sun Jun 12, 2005 10:55 pm
Posts: 3161
Location: Warwick, RI
Hi tjc,
That seems to have allowed me to return to the original hostname. A couple of complaints but most everything is working normal.
Here are the returned comments:
Hit enter to continue, or Ctrl-C to abort.
ERROR 1146 (42S02) at line 1: Table 'mythconverg.displayprofilegroups' doesn't exist
ERROR 1146 (42S02) at line 1: Table 'mythconverg.storagegroup' doesn't exist
ERROR 1146 (42S02) at line 1: Table 'mythconverg.weatherscreens' doesn't exist
ERROR 1146 (42S02) at line 1: Table 'mythconverg.weathersourcesettings' doesn't exist
ERROR 1054 (42S22) at line 1: Unknown column 'rechost' in 'where clause'

The weather won't go into setup where one can set the zip, just sits on the Weather Units and have to wait for a time out to get out of that menu.

Only other issue which if I recall is an original where if you delete the last recorded show, you can't exit out of the now empty "Watch Recordings". If you re-enter it after an xserver restart it works normal and Esc works to back out of the empty listing. Basically good to go as they say.

Really appreciate your assistance! Owe you a Del's :)
Thanks
Mike


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

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