LinHES Forums http://forum.linhes.org/ |
|
How can I enable mythfilldatabase logs with mySQL? http://forum.linhes.org/viewtopic.php?f=17&t=17202 |
Page 1 of 1 |
Author: | zetoune [ Wed Nov 07, 2007 5:09 pm ] |
Post subject: | How can I enable mythfilldatabase logs with mySQL? |
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 ?? |
Author: | slowtolearn [ Wed Nov 07, 2007 6:58 pm ] |
Post subject: | Re: How can I enable mythfilldatabase logs with mySQL? |
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. 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.
Can somebody tell me which value I have to change in the database ?? |
Author: | zetoune [ Wed Nov 07, 2007 7:13 pm ] |
Post subject: | |
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 |
Author: | slowtolearn [ Wed Nov 07, 2007 7:43 pm ] |
Post subject: | |
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. What is the date/time on your backend? Do you have the updated tzdata package?
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 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:
MythFillPeriod MythFillMinHour MythFillMaxHour |
Author: | tjc [ Wed Nov 07, 2007 9:00 pm ] |
Post subject: | |
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 |
Author: | zetoune [ Thu Nov 08, 2007 7:57 am ] |
Post subject: | |
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. |
Author: | zetoune [ Thu Nov 08, 2007 8:36 am ] |
Post subject: | |
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. |
Author: | slowtolearn [ Thu Nov 08, 2007 8:37 am ] |
Post subject: | |
zetoune wrote: These are the values I have. 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.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. 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 ![]() |
Author: | zetoune [ Thu Nov 08, 2007 9:17 am ] |
Post subject: | |
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 |
Author: | tscholl [ Thu Nov 08, 2007 11:29 am ] |
Post subject: | |
After you log in as your users, instead of su - do su mythtv |
Author: | zetoune [ Thu Nov 08, 2007 5:57 pm ] |
Post subject: | |
I can run it as mythtv. So the problem is not a permissions issue |
Author: | tjc [ Thu Nov 08, 2007 7:25 pm ] |
Post subject: | |
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. |
Author: | zetoune [ Fri Nov 09, 2007 2:06 pm ] |
Post subject: | |
Ok I changed my values by yours. Tomorrow, I will tell you whether it works or not. |
Author: | zetoune [ Thu Dec 13, 2007 1:10 pm ] |
Post subject: | |
tjc: after 1 month, I can tell you it works perfectly. Thank you very much. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |