View unanswered posts    View active topics

All times are UTC - 6 hours





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

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Job Queue Issues
PostPosted: Tue Apr 16, 2013 6:52 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
Over the past two weeks I have noticed that my Job Queue, mainly Metadata Lookup, are not finishing. They start but never finish. There is always five (5) jobs "stuck" in the queue as "Started". Right now jobs are from 4/15/13 till now.
Attachment:
File comment: 041613-job_queue
041613-job_queue.png
041613-job_queue.png [ 47.68 KiB | Viewed 6992 times ]

Also, I my TV Schedule (mythfilldatabase) does not seem to be running again. I am not sure if these are related. I had thought that I had resolved this previous issue.

Any suggestions/ideas/thoughts would be greatly appreciated. I can/will post any logs that are requested.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Tue Apr 16, 2013 7:28 am 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
I would check your system partition size

sudo df -h /


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Mon Apr 22, 2013 11:27 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
df -h outputs the following
Size: 4.9G
Used: 3.8G
Avail: 834M
Use%: 83%

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Fri May 31, 2013 8:13 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
I have just made the jump/upgrade to LinHES R8 over the last couple of nights. I was thinking that my Job Queue issue would go away with the upgrade, but sadly, No. Looking through the logs for last few days I have noticed the same two errors in the metadatalookup logs.
Code:
2013-05-30T18:56:32.441614-04:00 main_htpc mythmetadatalookup[1764]: E CoreContext mythdb.cpp:866 (LoadDatabaseParamsFromDisk) Unable to read configuration file mysql.txt

and
Code:
2013-05-30T18:56:32.643906-04:00 main_htpc mythmetadatalookup[1764]: E CoreContext configuration.cpp:112 (Save) Could not open settings file /home/mythtv/.mythtv/config.xml for writing

Any ideas?

The job queue is still Starting the first two jobs and Queuing the remainder, but it seems to never be finishing the started so it can move on to the next queued.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Fri May 31, 2013 10:56 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
Is it the same two jobs that cause the problem, or any metadata lookup?


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Fri May 31, 2013 11:41 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
It appears to be all metadatalookups. All of the logs from 05/30/13 for metadatalookup have the same errors when looking up different shows. There are not metadatalookup logs for 05/29/13, and 05/31/13.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Mon Jun 03, 2013 11:53 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
I don't know if this is related, by my mythfilldatabase is also not running on its own after the upgrade to R8. I can run
Code:
mythfilldatabase
from a terminal window and everything works perfectly, but I currently have it set to run when the provider deems best, and it has not run in 3 day.

I have had this problem in the past, but I thought I had it corrected.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Wed Jun 12, 2013 9:20 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
I think I have been able to fix/correct on problems. When metadatalookup did run it was always throwing the following error:
Code:
2013-05-31T20:13:44.576871-04:00 main_htpc mythmetadatalookup[2407]: E CoreContext configuration.cpp:112 (Save) Could not open settings file /home/mythtv/.mythtv/config.xml for writing

Looking in /home/mythtv/.mythtv I noticed that the config.xml file was owned by the root user, and that it was also a symlink from /usr/share/mythtv/config.xml. At some point the files owner must have gotten changed.

I was browsing through Google to find a possible solution I came across a couple of post (post 1& post 2) stating that:
Quote:
If config.xml is lost while mythbackend is running and your mythpreviewgen/mythcommflag/mythtranscode jobs fail

To correct this problem I removed the symlink'ed config.xml file, and relinked it as the mythtv user. I did a restart and everything seemed to be ok. Checking the logs files for the day it appeared that the config.xml file could now be read/written to as there is no longer a error in the new log file, and It looks like the backend was looking up the artwork for each of the recording (http://pastebin.com/MDqdPh4g).

I tried running metadatalookup from MythWeb for a newly recorded file (Teen Titans Go: Dog Hand), then checked the log:
Code:
2013-06-12T05:47:54.634215-04:00 main_htpc mythmetadatalookup[27176]: C thread_unknown mythcommandlineparser.cpp:2534 (ConfigureLogging) mythmetadatalookup version: fixes/0.25 [v0.25.3-32-g79a24c9] www.mythtv.org
2013-06-12T05:47:54.634660-04:00 main_htpc mythmetadatalookup[27176]: C thread_unknown mythcommandlineparser.cpp:2536 (ConfigureLogging) Qt version: compile: 4.8.2, runtime: 4.8.2
2013-06-12T05:47:54.634816-04:00 main_htpc mythmetadatalookup[27176]: N thread_unknown mythcommandlineparser.cpp:2538 (ConfigureLogging) Enabled verbose msgs:  general
2013-06-12T05:47:54.634932-04:00 main_htpc mythmetadatalookup[27176]: N thread_unknown logging.cpp:1176 (logStart) Setting Log Level to LOG_INFO
2013-06-12T05:47:54.635032-04:00 main_htpc mythmetadatalookup[27176]: I thread_unknown logging.cpp:229 (FileLogger) Added logging to the console
2013-06-12T05:47:54.635128-04:00 main_htpc mythmetadatalookup[27176]: I thread_unknown logging.cpp:369 (SyslogLogger) Added syslogging to facility local6
2013-06-12T05:47:54.635224-04:00 main_htpc mythmetadatalookup[27176]: I thread_unknown logging.cpp:425 (DatabaseLogger) Added database logging to table logging
2013-06-12T05:47:54.635336-04:00 main_htpc mythmetadatalookup[27176]: N thread_unknown logging.cpp:1215 (logStart) Setting up SIGHUP handler
2013-06-12T05:47:54.635474-04:00 main_htpc mythmetadatalookup[27176]: N thread_unknown mythdirs.cpp:51 (InitializeMythDirs) Using runtime prefix = /usr
2013-06-12T05:47:54.635596-04:00 main_htpc mythmetadatalookup[27176]: N thread_unknown mythdirs.cpp:64 (InitializeMythDirs) Using configuration directory = /home/mythtv/.mythtv
2013-06-12T05:47:54.636027-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext mythcorecontext.cpp:227 (Init) Assumed character encoding: C
2013-06-12T05:47:54.636226-04:00 main_htpc mythmetadatalookup[27176]: W CoreContext mythcorecontext.cpp:234 (Init) This application expects to be running a locale that specifies a UTF-8 codeset, and many features may behave improperly with your current language settings. Please set the LC_ALL or LC_CTYPE, and LANG variable(s) in the environment in which this program is executed to include a UTF-8 codeset (such as 'en_US.UTF-8').
2013-06-12T05:47:54.636334-04:00 main_htpc mythmetadatalookup[27176]: N CoreContext mythcontext.cpp:477 (LoadDatabaseSettings) Empty LocalHostName.
2013-06-12T05:47:54.636957-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext mythcontext.cpp:481 (LoadDatabaseSettings) Using localhost value of main_htpc
2013-06-12T05:47:54.637172-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext mythcontext.cpp:608 (TestDBconnection) Testing network connectivity to '192.168.1.47'
2013-06-12T05:47:54.637582-04:00 main_htpc mythmetadatalookup[27176]: I SystemIOHandlerW system-unix.cpp:90 (run) Starting IO manager (write)
2013-06-12T05:47:54.637976-04:00 main_htpc mythmetadatalookup[27176]: I SystemIOHandlerR system-unix.cpp:90 (run) Starting IO manager (read)
2013-06-12T05:47:54.638295-04:00 main_htpc mythmetadatalookup[27176]: I SystemSignalManager system-unix.cpp:485 (run) Starting process signal handler
2013-06-12T05:47:54.638713-04:00 main_htpc mythmetadatalookup[27176]: I SystemManager system-unix.cpp:263 (run) Starting process manager
2013-06-12T05:47:54.939993-04:00 main_htpc mythmetadatalookup[27176]: N CoreContext mythcorecontext.cpp:1354 (InitLocale) Setting QT default locale to en_US
2013-06-12T05:47:54.940226-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext mythcorecontext.cpp:1387 (SaveLocaleDefaults) Current locale en_US
2013-06-12T05:47:54.940338-04:00 main_htpc mythmetadatalookup[27176]: N CoreContext mythlocale.cpp:121 (LoadDefaultsFromXML) Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
2013-06-12T05:47:54.940438-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext mythtranslation.cpp:66 (load) Loading en_us translation for module mythfrontend
2013-06-12T05:47:54.940533-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext main.cpp:227 (main) Testing grabbers and metadata sites for functionality...
2013-06-12T05:47:55.841344-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext main.cpp:234 (main) All grabbers tested and working.  Continuing...
2013-06-12T05:47:55.841639-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext mythcorecontext.cpp:371 (ConnectCommandSocket) MythCoreContext: Connecting to backend server: 192.168.1.47:6543 (try 1 of 1)
2013-06-12T05:47:55.841771-04:00 main_htpc mythmetadatalookup[27176]: I CoreContext mythcorecontext.cpp:1178 (CheckProtoVersion) Using protocol version 72
2013-06-12T05:47:55.841906-04:00 main_htpc mythmetadatalookup[27176]: I MetadataDownload metadatadownload.cpp:222 (runGrabber) Running Grabber: /usr/share/mythtv/metadata/Television/ttvdb.py -l en -N 266775 Dog Hand

I looks like everything is running correctly, but checking MythWeb Backend Status the job status in the Job Queue is "Starting", and has been for a few hours now. A step in the right direction, but something is still holding up somewhere.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Wed Jun 12, 2013 10:18 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
I don't know what may be happening here, but I can say config.xml was owned by root for a reason.

MythTV and it's various programs are known to be "helpful" with config.xml and will sometimes write incorrect information or outright delete the file. The file was owned by root to prevent that from happening.


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Wed Jun 12, 2013 11:40 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
Well.... then that raises a few other questions.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Wed Jun 12, 2013 7:38 pm 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
Looking at the other error in the metadatalookup logs files:
Code:
2013-05-31T20:13:44.374765-04:00 main_htpc mythmetadatalookup[2407]: W CoreContext mythcorecontext.cpp:234 (Init) This application expects to be running a locale that specifies a UTF-8 codeset, and many features may behave improperly with your current language settings. Please set the LC_ALL or LC_CTYPE, and LANG variable(s) in the environment in which this program is executed to include a UTF-8 codeset (such as 'en_US.UTF-8').

It looks like my locale is not set correctly somewhere. Per the Ttvdb.py wiki page:
Quote:
Why am I not getting the promised episode data? You are not running your machine with locale of 'utf-8'.
8. Your configuration should look something like:

Code:
> locale
LANG=en_CA.UTF-8
LC_CTYPE="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="en_CA.UTF-8"
LC_COLLATE="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_PAPER="en_CA.UTF-8"
LC_NAME="en_CA.UTF-8"
LC_ADDRESS="en_CA.UTF-8"
LC_TELEPHONE="en_CA.UTF-8"
LC_MEASUREMENT="en_CA.UTF-8"
LC_IDENTIFICATION="en_CA.UTF-8"
LC_ALL=

Running locale from a terminal outputs the following:
Code:
> locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

Is this a problem? If it is how does one go about fixing it?

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Thu Jun 13, 2013 9:25 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
edit /etc/locale.conf
add
LANG="en_US.UTF-8"

save
reboot


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Fri Jun 14, 2013 6:42 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
Ok, here are the changes/updates that I have made to date.

Updated /etc/locale.conf to include "en_US.UTF-8. Checking my My locale.conf it contained a single line.
Code:
LANGUAGE="en_US.UTF-8"

I added:
Code:
LANG="en_US.UTF-8"

Saved the file, and restarted the box. Checked locale at the terminal and now everything was set correctly.
Code:
> locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

The error in the mythmetadatalookup logs are now gone.

Only problem was that job queues were still becoming "stuck" after the recording finished. Looking more into ttvdb.py I did a search via webmin and noticed that the ttvdb.py file was located here:
Code:
/usr/share/mythtv/metadata/Television
Looking at the log file I noticed that ttvdb.py was being called from here:
Code:
/usr/share/mythtv/mythvideo/scripts
This was the same for the video metadata script, tmdb.pl. It was also looking at:
Code:
/usr/share/mythtv/mythvideo/scripts
vs. the actual location of the file:
Code:
/usr/share/mythtv/metadata/Movie/
I updated all locations using MythWeb>Settings>MythTV.

Now to wait and see if this works.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Fri Jun 21, 2013 11:49 am 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
Still having the metadatalookup issue: Latest log for an episode of The Soup.
Code:
2013-06-20T00:59:43.099782-04:00 main_htpc mythmetadatalookup[20228]: I CoreContext main.cpp:227 (main) Testing grabbers and metadata sites for functionality...
2013-06-20T00:59:44.100781-04:00 main_htpc mythmetadatalookup[20228]: I CoreContext main.cpp:234 (main) All grabbers tested and working.  Continuing...
2013-06-20T00:59:44.201130-04:00 main_htpc mythmetadatalookup[20228]: I CoreContext mythcorecontext.cpp:371 (ConnectCommandSocket) MythCoreContext: Connecting to backend server: 192.168.1.47:6543 (try 1 of 1)
2013-06-20T00:59:44.201356-04:00 main_htpc mythmetadatalookup[20228]: I CoreContext mythcorecontext.cpp:1178 (CheckProtoVersion) Using protocol version 72
2013-06-20T00:59:44.201847-04:00 main_htpc mythmetadatalookup[20228]: I MetadataDownload metadatadownload.cpp:222 (runGrabber) Running Grabber: /usr/share/mythtv/metadata/Television/ttvdb.py -l en -M The Soup

If you look at the first line the backend is testing the grabbers, and they all checkout ok. but the job is still getting stuck in the Job Queue.

The only question I have is on the last line. If you try to run the grabber using the following line nothing will happen because the show name must be in quotes ("The Soup") per the ttvdb.py help (ttvdb.py -u for examples).
Code:
usr/share/mythtv/metadata/Television/ttvdb.py -l en -M "The Soup"

I don't know if the generated log line in the metadatalookup script is obmitting the quotes, but I am at the extent of my coding skill set to even know where to start looking in the metadatalookup script.

I will check later if running the command by hand outputs the correct xml data. I think the output is directed to the /tmp folder.

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 
 Post subject: Re: Job Queue Issues
PostPosted: Thu Jul 18, 2013 1:11 pm 
Offline
Joined: Tue Sep 12, 2006 6:03 am
Posts: 210
Location: Roseville, MI
Still working through this "problem". I am trying to determine if the metadata is actually being fetched. below you can see a mythmetadatalookup log, and a chunk of the mythbackend log file pertaining to an episode of Futrama.

If anyone is willing to post up some log files I would be greatly appreciated. This would help me know what a "correct" log output for a recording should look like.

I have looked through the backend log and can see that the metadatalookup was started for the recording.
Code:
2013-07-17T21:59:15.613189-04:00 main_htpc mythbackend[2122]: I Metadata_1314 jobqueue.cpp:2151 (DoMetadataLookupThread) JobQueue: Metadata Lookup Starting for Futurama:"Saturday Morning Fun Pit" recorded from channel 79109 at 2013-07-17T21:58:00
After this I do not see anything stating that the metadatalookup was successful.

Looking at the last line of the metadatalookup log for the recording is shows that it was running the grabber, but nothing after that. The full metadatalookup log can be seen here.
Code:
2013-07-17T21:59:18.087014-04:00 main_htpc mythmetadatalookup[13832]: I MetadataDownload metadatadownload.cpp:222 (runGrabber) Running Grabber: /usr/share/mythtv/metadata/Television/ttvdb.py -l en -N 73871 Saturday Morning Fun Pit

Looking at the entire log I have noticed that there is a LocalFilePath error for the recording fanart. Not sure what this means. The full backend log can be seen here.
Code:
2013-07-17T21:00:56.578452-04:00 main_htpc mythbackend[2122]: E ProcessRequest mainserver.cpp:6068 (LocalFilePath) ERROR: LocalFilePath unable to find local path for 'Futurama Season 7_fanart.jpg'.

Thank you

_________________
-Roseville, Michigan USA
LinHES R8: FE/BE, FE (x2)


Top
 Profile  
 

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



All times are UTC - 6 hours




Who is online

Users browsing this forum: Google [Bot] and 3 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