View unanswered posts    View active topics

All times are UTC - 6 hours





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

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject:
PostPosted: Tue Aug 08, 2006 2:00 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Hey, I think I found the problem! Not how to fix it, but...

It's related to a problem I had when I upgraded to R5C7. My R5B7 was named the default name of "mythtv". When I upgraded, I decided to name the backend "mbe" instead. I ended up with double-listings of tuner cards in my backend, for both "mythtv" (old) and "mbe" (new). I fixed that problem by deleting the extra listings and changing names from "mythtv" to "mbe."

Now, if I use Webmin and search for "mythfilldatabase" in the "value" field in "settings" table in "mythconverg" database, lo and behold...

Code:
MythFillDatabasePath    /usr/bin/mythfilldatabase    mythtv
MythFillDatabaseArgs                                                       mythtv
MythFillDatabaseLog    /home/mythtv/mfdb.log               mythtv


I don't think it's running because "mythtv" doesn't exist, it should be "mbe"

So, firstly, people who are having this problem, when you installed KnoppMyth, did you name your systems other than the "mythtv" default?

Secondly, Webmin says "Data in this table cannot be edited because it has no primary key." Is there some way I can change "mythtv" to "mbe" with Webmin? I guess I can make the correct MySQL command if I need to.

Thirdly, along with the above results, I also have a bunch of additional records for "MythFillDatabasePath", etc., for any frontend I've ever created. Can I or should I get rid of those while I'm cleaning up the database?

It's starting to make me wonder what other havoc I've wreaked by naming my backend "mbe" instead of the default...


Last edited by ceenvee703 on Tue Aug 08, 2006 5:49 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 4:40 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Here's the MySQL commands I used to (hopefully) fix things:

Code:
mysql -u mythtv -p
(enter mysql password)
use mythconverg;
UPDATE settings SET hostname="mbe" WHERE value="MythFillDatabasePath" AND hostname="mythtv";
UPDATE settings SET hostname="mbe" WHERE value="MythFillDatabaseArgs" AND hostname="mythtv";
UPDATE settings SET hostname="mbe" WHERE value="MythFillDatabaseLog" AND hostname="mythtv";
quit


You'd substitute your backend's hostname for "mbe" in the above example.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 6:47 pm 
Offline
Joined: Thu Apr 13, 2006 3:30 pm
Posts: 20
Location: Manitoba, Canada
While mine was a fresh install, it is my old database... which used localhost.localdomain in the hostname field. I'll give this a shot and we'll see what happens. Worth the test, in any event 8)

I'll post back in a day or so with the results.

Charlie


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 7:08 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Oh my... Changing your hostname during an upgrade is BAD. I suppose I should go add something about that to the upgrade hints... There are ways to do it, but it's any ugly process because a lot of the data, especially settings, are keyed by your hostname...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 7:20 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
If it's that bad (and it sounds like it is) then it shouldn't let you do it. That's the first I've heard about this and I certainly wouldn't have messed with the default name if I'd known it could cause problems.

I imagine my only options are (a) go along like this and hope nothing else is broken, or (b) wipe out everything and start again.

It sounds like it's possibly fixable but yes, I can see that there are lots of records in the settings table that are probably duplicates, some with "mbe" and some with "mythtv" as hostname.

I'm fine with option (b) above, as long as I can somehow export my recorded program history.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 7:48 pm 
Offline
Joined: Wed Aug 18, 2004 7:06 pm
Posts: 21
Doh, I don't remember if I changed mine or not. Now I gotta go find out how to see if I did. :(


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 7:55 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
ceenvee703 wrote:
If it's that bad (and it sounds like it is) then it shouldn't let you do it.

The problem is that this happens way back in the phase 1 installer before it has any context to check this.

ceenvee703 wrote:
That's the first I've heard about this and I certainly wouldn't have messed with the default name if I'd known it could cause problems.

Well it's actually mentioned in a number of places, but I'm not sure that the auto-install isntruction in the Phamplet mention it.

ceenvee703 wrote:
I imagine my only options are (a) go along like this and hope nothing else is broken, or (b) wipe out everything and start again.

It sounds like it's possibly fixable but yes, I can see that there are lots of records in the settings table that are probably duplicates, some with "mbe" and some with "mythtv" as hostname.

I'm fine with option (b) above, as long as I can somehow export my recorded program history.

Fix up is doable, give me some time to feed myself dinner and I'll see what I can come up with. I think there may already be a how-to on the wiki. Hopefully I'll be able to come up with some SQL and shell script to do this a bit more gracefully.

BTW - This looks like a pretty decent list of the tables that use hostname:
    capturecard
    jumppoints
    keybindings
    musicplaylist
    musicsmartplaylist
    profilegroups
    recorded
    settings
    transcoding
It also looks like mythlog and tvchain use alternate forms... This doesn't look too bad, the main problem is just avoiding duplicates...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 8:37 pm 
Offline
Joined: Thu Apr 13, 2006 3:30 pm
Posts: 20
Location: Manitoba, Canada
During the life of my database, it's been localhost.localdomain, mythtvbox, and the current mythtv... I have triplets! Oh well, it's like weeding a garden... I should have figured this out when the number of tuners in my box seemed to increase after each update, but since the phantoms weren't causing me any problems, I let them be.

We'll see if the hostname fix will help the database fill. In the meantime, I at least only have one tuner again.

I suppose I should have been more careful with the names, but... well, I wasn't :oops:
Thankfully it's nothing that a little bit of pruning won't fix.

Charlie


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 11:04 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
I need some help from you guys to figure out what needs attention. Run these generated queries and post the results:
Code:
for i in capturecard jumppoints keybindings musicplaylist musicsmartplaylist profilegroups recorded settings transcoding ; do
  echo "Table: $i"
  mysql mythconverg -e "select distinct hostname from $i"
done

What I'm looking for is which tables are self correcting and which ones need some kind of duplicate removal. I may have more queries later to look at duplicated "value" keys in the settings table.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 08, 2006 11:48 pm 
Offline
Joined: Thu Apr 13, 2006 3:30 pm
Posts: 20
Location: Manitoba, Canada
Here's my output, with spacing to keep my eyes from bleeding :wink:

Code:
Table: capturecard
hostname
mythtv

Table: jumppoints
hostname
localhost.localdomain
mythtv
mythtvbox

Table: keybindings
hostname
mythtv
localhost.localdomain
mythtvbox

Table: musicplaylist
hostname
localhost.localdomain
mythtvbox
mythtv

Table: musicsmartplaylist

Table: profilegroups
hostname
NULL

Table: recorded
hostname
mythtvbox
mythtv

Table: settings
hostname
localhost.localdomain
mythtv
mythtvbox
NULL

Table: transcoding


Both the transcoding and the musicsmartplaylist came back with do not exist errors.

Charlie


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 3:48 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Here's mine. It looks a mess. This system has been auto-upgraded for two years now and it shows, I guess.

Some of the hostnames appearing are of various frontends I've had (I've only got one in current use, named fe01). I've always followed the wiki instructions on setting up remote frontends

http://www.knoppmythwiki.org/index.php? ... nlyInstall

Do those instructions need to be edited somehow to prevent incorrect entries? It sounds like a remote frontend's MySQL database has to be shut down earlier than described in the wiki, in order to avoid all those entries.

Thanks for the cleanup in aisle 3, tjc...

Code:
Table: capturecard
 hostname
 --------   
 mbe     

Table: jumppoints
 hostname
 --------   
 cv-ibook.local       
 fe01                 
 frontend01           
 localhost.localdomain
 mbe                   
 mythfe1               
 mythtv               

Table: keybindings
 hostname             
 --------   
 fe01                 
 mbe                   
 mythfe1               
 mythtv               
 localhost.localdomain
 frontend01           
 cv-ibook.local       

Table: musicplaylist
 hostname
 --------   
 frontend01
 mythtv     
 mbe       
 fe01       

Table: musicsmartplaylist
ERROR 1146 at line 1: Table 'mythconverg.musicsmartplaylist' doesn't exist

Table: profilegroups
 hostname
 --------   
 NULL     

Table: recorded
 hostname
 --------   
 mythtv   
 mbe     

Table: settings
 hostname             
 --------   
 cv-ibook.local       
 fe01                 
 frontend01           
 localhost.localdomain
 mbe                   
 mythfe1               
 mythtv               
 NULL                 
                       
Table: transcoding
ERROR 1146 at line 1: Table 'mythconverg.transcoding' doesn't exist


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 10:36 am 
Offline
Joined: Fri Sep 19, 2003 7:05 pm
Posts: 5088
Location: Fontana, Ca
That a look at the mythtv docs, there is instruction on how to change one's hostname.

_________________
cesman

When the source is open, the possibilities are endless!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 12:27 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Thanks cesman. I found the discussion--that talks about how to change it the right way. Not sure if it applies to someone in my situation.

Is there any way to get the KnoppMyth installer to skip the section where you can set the hostname, if you're doing an auto-upgrade?

Also, my optimism on finding the fix was crushed, as the scheduled mythfilldatabase time came and went today, with no auto-run. Maybe others will have more success.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 6:30 pm 
Offline
Joined: Thu Apr 13, 2006 3:30 pm
Posts: 20
Location: Manitoba, Canada
The fix didn't help on my end either, but it was a good thought.

We *did* find a problem though, even if it wasn't exactly what we were searching for ;)

Charlie


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 09, 2006 6:44 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
I guess the question is, would it run if the DB was cleaned up properly? Although it's odd that it stopped working now, as I'm sure a lot of the extra hostnames have been around on my system for years now.


Top
 Profile  
 

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



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