View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 14 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Nov 07, 2007 5:09 pm 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
I have a problem with mythfilldatabase. I get "unknown data". It works only if I run it manually in ssh (but I get schedules for 2 weeks only). I didn't enable the logging. I don't have access to it except by y internet and VNC doesn't work on it. So I want to enable the logs to try to know why it doesn't work.

Can somebody tell me which value I have to change in the database ??


Top
 Profile  
 
PostPosted: Wed Nov 07, 2007 6:58 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
zetoune wrote:
I have a problem with mythfilldatabase. I get "unknown data". It works only if I run it manually in ssh (but I get schedules for 2 weeks only).
To my knowledge that's as much as you can get (up to 13 days).

zetoune wrote:
I didn't enable the logging. I don't have access to it except by y internet and VNC doesn't work on it. So I want to enable the logs to try to know why it doesn't work.

Can somebody tell me which value I have to change in the database ??
mythfilldatabase activity is logged in /var/log/mythtv/mythbackend.log[.1-9]. There is an option in Utilities/Setup -> Setup -> General -> last page that allows you to set "mythfilldatabase log path" but I've never used it. Presumably that would let you set a separate log path.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 7:13 pm 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
slowtolearn : I know it's the max, I mean if I run it manually I got the schedule data, but after two weeks I have to re run it manually.

I don't have access to my remote mythbox. I can only do ssh with it. VNC does not work. That's why I asked if someone knows the SQL value I can change. But you answer the question. I found a value in the "settings" table called "MythfilldatabaseLogs". It should be this..

But I think the problem is that mythfilldatabase is not started automatically.

the status page says:
Quote:
Last mythfilldatabase run started on 2007-11-05 22:46 and ended on 2007-11-05 22:47. Successful. <= This run is the manual one I did.
Suggested next mythfilldatabase run: 2007-11-06 09:37. <= Today is November 7th


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 7:43 pm 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
zetoune wrote:
slowtolearn : I know it's the max, I mean if I run it manually I got the schedule data, but after two weeks I have to re run it manually.

I don't have access to my remote mythbox. I can only do ssh with it. VNC does not work. That's why I asked if someone knows the SQL value I can change. But you answer the question. I found a value in the "settings" table called "MythfilldatabaseLogs". It should be this..

But I think the problem is that mythfilldatabase is not started automatically.

the status page says:
Quote:
Last mythfilldatabase run started on 2007-11-05 22:46 and ended on 2007-11-05 22:47. Successful. <= This run is the manual one I did.
Suggested next mythfilldatabase run: 2007-11-06 09:37. <= Today is November 7th
What is the date/time on your backend? Do you have the updated tzdata package?

EDIT: Is there any mythfilldatabase activity listed in your /var/log/mythtv/mythbackend logs? /EDIT

What are the values in your settings table for the following:
    MythFillEnabled
    MythFillPeriod
    MythFillMinHour
    MythFillMaxHour


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 07, 2007 9:00 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
I use a wrapper script for mythfilldatabase myself which captures the logs along with some other fiddling around. This stripped down version should get you what you want.
Code:
#!/bin/bash

fatal () {
    echo "Error! $*"
    exit 1
}

LOG_FILE="/var/log/mythtv/update_database.log"
mv -f $LOG_FILE $LOG_FILE.old
exec >$LOG_FILE 2>&1

case $(id -nu) in
root)
    su - mythtv -c "nice /usr/bin/mythfilldatabase $*"
    result=$?
    ;;
mythtv)
    nice /usr/bin/mythfilldatabase $*
    result=$?
    ;;
*)
    fatal "You must run this script at mythtv or root!"
    ;;
esac

echo
echo "Database update completed"
exit $result


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 7:57 am 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
These are the values I have.
I changed the Log path and Args. I created a directory mythfilldatabase in /var/log/mythtv directory to get logs in a separate directory. But it's empty. I did this because yesterday I remove every log from /var/log/mythtv and I didn't find any line for mythfilldatabase.

Code:
mythfilldatabaseLastRunStart    2007-11-05 22:46    
mythfilldatabaseLastRunEnd    2007-11-05 22:47    
mythfilldatabaseLastRunStatus    Successful.    
MythFillSuggestedRunTime    2007-11-06T09:37:32    
MythFillGrabberSuggestsTime    1    
EPGFillType    13    mythtv
MythFillEnabled    1    
MythFillDatabasePath    /usr/bin/mythfilldatabase    
MythFillDatabaseArgs    -v important,general    mythtv
MythFillDatabaseLog    /var/log/mythtv/mythfilldatabase    
MythFillPeriod    1    
MythFillMinHour    9    
MythFillMaxHour    11    
MythFillFixProgramIDsHasRunOnce    1    mythtv
mythfilldatabase.urlmap.dni_zap2it    http://images.zap2it.com/station_logo


SuggestedRunTime stays on November 6th. I think that mythfilldatabase does not fire up at all.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 8:36 am 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
tjc: I use your script. It works without any problem.
Do I have to create a cron job with this script and disable mythfilldatabase from setup.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 8:37 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
zetoune wrote:
These are the values I have.
I changed the Log path and Args. I created a directory mythfilldatabase in /var/log/mythtv directory to get logs in a separate directory. But it's empty. I did this because yesterday I remove every log from /var/log/mythtv and I didn't find any line for mythfilldatabase.

Code:
mythfilldatabaseLastRunStart    2007-11-05 22:46    
mythfilldatabaseLastRunEnd    2007-11-05 22:47    
mythfilldatabaseLastRunStatus    Successful.    
MythFillSuggestedRunTime    2007-11-06T09:37:32    
MythFillGrabberSuggestsTime    1    
EPGFillType    13    mythtv
MythFillEnabled    1    
MythFillDatabasePath    /usr/bin/mythfilldatabase    
MythFillDatabaseArgs    -v important,general    mythtv
MythFillDatabaseLog    /var/log/mythtv/mythfilldatabase    
MythFillPeriod    1    
MythFillMinHour    9    
MythFillMaxHour    11    
MythFillFixProgramIDsHasRunOnce    1    mythtv
mythfilldatabase.urlmap.dni_zap2it    http://images.zap2it.com/station_logo


SuggestedRunTime stays on November 6th. I think that mythfilldatabase does not fire up at all.
Hmmm, odd indeed. Nothing in the settings sticks out as incorrect, with the exception that I believe MythFillDatabaseLog should point to a file, not a directory.

Does the mythtv user have permission to run mythfilldatabase?

EDIT:
zetoune wrote:
tjc: I use your script. It works without any problem.
Well, I guess that answers the permission question :wink: /EDIT


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 9:17 am 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
slowtolearn.. I ran the script as root, not mythtv, maybe it could be the problem

Actually I don't know how to log in as mythtv with ssh.

log with my username then type su for root. But I don't remember how to do it with mythtv user.

I'm gonna change the myfillDataBaseLog value right now


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 11:29 am 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
After you log in as your users, instead of su -
do su mythtv


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 5:57 pm 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
I can run it as mythtv. So the problem is not a permissions issue


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 7:25 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
zetoune wrote:
tjc: I use your script. It works without any problem.
Do I have to create a cron job with this script and disable mythfilldatabase from setup.


Nope, I just plug the full path name into the front end configuration screens.

Code:
root@black2:/var/log# mysql mythconverg -e "select * from settings where value like 'mythfill%'" | more
value   data    hostname
mythfilldatabase.urlmap.dni_zap2it      http://images.zap2it.com/station_logo   NULL
MythFillDatabaseArgs            black2
mythfilldatabaseLastRunEnd      2007-11-08 19:14        NULL
mythfilldatabaseLastRunStart    2007-11-08 19:14        NULL
mythfilldatabaseLastRunStatus   mythfilldatabase ran, but did not insert any new data into the Guide for 2 of 2 sources. This can indicate a potential grabber failure. NULL
MythFillDatabaseLog             black2
MythFillDatabasePath    /usr/local/bin/update_database.sh       black2
MythFillEnabled 1       black2
MythFillFixProgramIDsHasRunOnce 1       black2
MythFillGrabberSuggestsTime     1       NULL
MythFillMaxHour 8       black2
MythFillMinHour 6       black2
MythFillPeriod  1       black2
MythFillSuggestedRunTime        2007-11-09T06:53:15     NULL


As for the other questions, mythfilldatabase should _always_ be run by mythtv rather than root which is why my script has that case statement to force that.

To become another user like mythtv (when you're root) just:
Code:
su - mythtv

The '-' is important. It makes the new session act like a login shell, which means that all the usual environment setup gets done. Otherwise you can end up with funky settings.

Finally for debugging, use the -v or --verbose option on the command line, which will make it produce more detailed output.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 2:06 pm 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
Ok I changed my values by yours.
Tomorrow, I will tell you whether it works or not.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 13, 2007 1:10 pm 
Offline
Joined: Sun Oct 16, 2005 12:15 pm
Posts: 288
tjc: after 1 month, I can tell you it works perfectly. Thank you very much.


Top
 Profile  
 

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


All times are UTC - 6 hours




Who is online

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