|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
|||
|
|||
Advanced Archiving Rule
Just to provide an example of what I'm up to, here's my current rule for deciding what gets archived to my NAS.
Code:
if [IsObjMediaFile == true && $.IsTVFile{} == true && (TimeUntilNextRecording >= "6H" || FreeSpacePercentage < 7) && $.IsFileCurrentlyRecording{} == false && (((($.GetShowCategory{} == "Movie" && $.GetShowSubCategory{} != "Documentary") || $.GetShowTitle{} =% "Friends|Seinfeld|Night Court|Three's Company|Family Guy|Married \\.\\.\\. With Children") && $.IsLibraryFile{} == false) || ($.IsLibraryFile{} == true && Filename !^ "\\\\nas"))] { :MOVERECOPTS "\\\\nas\\tv" :FAILALERT "true" _MOVEREC }
:MOVERECOPTS tells SJQ which directory I'm archiving to (currently the UNC path "\\nas\tv"). The :FAILALERT option tells SJQ to create an alert with SageAlert should the archive attempt fail. Use SageAlert to notify yourself via email, Twitter, SMS, etc. (SageAlert options require SJQ v3.0.0.650 or newer). Hopefully, this example shows that the sky's the limit as far as automating archival to network storage while SageTV is running. Obligatory Disclaimer: Use of the _MOVEREC task in SJQ can cause irreversible damage to your SageTV system (lost/orphaned recordings, corrupted wiz.bin, some other unknown type of damage). Please consider the _MOVEREC task in SJQv3 to be EXPERIMENTAL. I take no responsibility for any damage caused to your SageTV through its use. With that said, I've been using it quite happily for a few weeks now with no issues. The only known issue I'm aware of is that if you lose power or SageTV is shutdown unexpectedly during a _MOVEREC task then the recording being copied may end up being orphaned (the original recording should still be safe on your hard drive, but the link between it and its airing info in SageTV may have been lost). In such a case, the state of the operation is actually saved in SJQ and can be continued/recovered, but that continuation step has not been coded yet.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... Last edited by Slugger; 11-13-2009 at 10:47 PM. Reason: Power failure OR unexpected SageTV shutdown... |
#22
|
||||
|
||||
SJQ - Sagealert to warn of no guide data
I've been plagued recently with losing my guide data.
Can anyone suggest a way I can get SJQ to trigger a sagealert to warn me it has happened? Thanks
__________________
ZZMystique My setup: Server: SageTV v7, Intel i5, 8GB, 180GB SSD, 4TB HDD, Win7HP & (DVB Viewer Pro with DVB Viewer for SageTV using 2xTBS6281 DVB-T2). |
#23
|
|||
|
|||
Does SageTV generate a system message when this happens? If so, then you could have SJQ process the system message and then trigger an alert based on the content of the system message. Of course, if system messages are being generated then SageAlert itself already processes system messages on its own. That's about the best SJQ can do since it's only able to process media objects and system message objects - it knows nothing about the EPG itself.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#24
|
|||
|
|||
Slugger,
It appears that sometimes the internal tasks just hang out there for some reason and not run. I remember in SJQ 2 you would check to make sure internal task scheduler is running.... are you doing the same in SJQ 3?
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#25
|
|||
|
|||
No, I removed that "feature", shouldn't be necessary. If tasks aren't running then get a dump of the app by visiting the /sjq/SJQ?debug=TRUE and paste the contents of sjq.thread.dump (in root SageTV install dir) - also look for any exception dumps in sjq.log (same location) and paste those in. That watchdog process shouldn't be necessary and it just masks bugs that need to be squashed.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#26
|
|||
|
|||
Slugger,
I have it running in Debug Mode now it Appears that this happens after a _MOVEREC fails... no more internal tasks run until I reset SJQ.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#27
|
||||
|
||||
I've experienced this "feature" also Haven't done any debugging to this point to try to figure out why...
__________________
Check it out! - http://www.vholdr.com/video/playing-sky |
#28
|
|||
|
|||
Slugger,
On the way you do a move I see you rename the good file and add .tmp extension. Before actually copying it over to the destination. In the event of a sage crash etc... you would lose the original file because it is now named .tmp. The way sagetvranscoder does it is save the file to the destination with .tmp at the end. Before deleting the original and renaming the .tmp to the original name and relinking.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#29
|
||||
|
||||
Quote:
Will email sagetv support and see if they can suggest a way of monitoring for no guide data. Thanks
__________________
ZZMystique My setup: Server: SageTV v7, Intel i5, 8GB, 180GB SSD, 4TB HDD, Win7HP & (DVB Viewer Pro with DVB Viewer for SageTV using 2xTBS6281 DVB-T2). |
#30
|
|||
|
|||
Ok, wouldn't be totally surprised to hear that. Next time internal tasks stop running get that thread dump by visiting /sjq/SJQ?debug=TRUE - that will tell us if the InternalTaskClient indeed crashed.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#31
|
|||
|
|||
Quote:
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#32
|
|||
|
|||
@nyplayer - I'm also curious to know why your _MOVEREC tasks are failing? Is the rollback working when they do fail?
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#33
|
|||
|
|||
Yes the roll back works. It said that the file was in use.. for some reason.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#34
|
|||
|
|||
Quote:
PS I did test the rollback and it worked. Took a usb drive offline while a file was moving just to test and it worked fine. Source: N:\sagen\LawOrder-Humiliation-4664989-0.mp4 Target: T:\saget Renaming source file... DONE! Copying source file to target directory... FAILED! Rolling back archival attempt due to a step failing! Deleting target file... ALREADY DONE! Renaming source file... DONE! Deleting target media object in SageTV... ALREADY DONE! Recreating source media object in SageTV... ALREADY DONE! Relinking source media object to airing object... DONE! Rollback completed SUCCESSFULLY!
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. Last edited by nyplayer; 11-15-2009 at 04:59 PM. |
#35
|
|||
|
|||
Slugger,
I tracked my problem to this paricular move. java.io.IOException: Deletion of source failed! at com.google.code.sagetvaddons.sjq.server.TvArchiver.delSourceMedia(TvArchiver.java:645) at com.google.code.sagetvaddons.sjq.server.TvArchiver.run(TvArchiver.java:360) at com.google.code.sagetvaddons.sjq.server.InternalTaskClient.moveRec(InternalTaskClient.java:115) at com.google.code.sagetvaddons.sjq.server.InternalTaskClient.performTask(InternalTaskClient.java:97) at com.google.code.sagetvaddons.sjq.server.InternalTaskClient.run(InternalTaskClient.java:53) at java.lang.Thread.run(Unknown Source) Sun Nov 15 16:01:12 PST 2009 Source: N:\sagen\LawOrderSpecialVictimsUnit-Users-4595432-0.mp4 Target: T:\saget Renaming source file... DONE! Copying source file to target directory... DONE! Deleting source media object in SageTV... FAILED! Rolling back archival attempt due to a step failing! Deleting target file... DONE! Renaming source file... DONE! Deleting target media object in SageTV... ALREADY DONE! Recreating source media object in SageTV... ALREADY DONE! Relinking source media object to airing object... DONE! Rollback completed SUCCESSFULLY!
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. |
#36
|
|||
|
|||
I need to know which thread(s) are crashing when a _MOVEREC task fails. Can you reproduce, then when the queue stops being processed, load the /sjq/SJQ?debug=TRUE URL then paste in the output from sjq.thread.dump, please?
The exception is being thrown b/c even though the file seems to have been renamed, Sage still refuses to delete the media file from wiz.bin (DeleteFileWithoutPrejudice() API call is failing). So the archiver task is throwing an exception and it seems to be caught, handled and rolled back properly. Looking at the code, I don't see why any thread would be dying off as a result of the TvArchiver task throwing an exception. So if you can get that thread dump output for me, it should answer all my questions. Thanks.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#37
|
|||
|
|||
New task client snapshot 655 available: fixes a JSONException generated when the client tries to log task client errors back to the server; when the client tried to log this info back to the server, the client would crash as a result of this exception being thrown
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#38
|
|||
|
|||
Any ideas? This was working until I rebooted. I upgraded to v3 a few days ago.
Never mind. build 655 above fixed this issue. It's like Slugger read my mind. Code:
wrapper | --> Wrapper Started as Console wrapper | Java Service Wrapper Community Edition 3.3.1 wrapper | Copyright (C) 1999-2008 Tanuki Software, Inc. All Rights Reserved. wrapper | http://wrapper.tanukisoftware.org wrapper | wrapper | Launching a JVM... jvm 1 | WrapperManager: Initializing... jvm 1 | SJQ Task Client v2.1.5.556 jvm 1 | Using 'C:/sjqc' as location for configuration file... jvm 1 | WrapperSimpleApp: jvm 1 | WrapperSimpleApp: Encountered an error running main: jvm 1 | WrapperSimpleApp: java.lang.RuntimeException: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/sjq/SJQ?proto=2&cmd=writeLog jvm 1 | WrapperSimpleApp: at com.google.code.sagetvaddons.sjqc.TaskClient.log(Unknown Source) jvm 1 | WrapperSimpleApp: at com.google.code.sagetvaddons.sjqc.TaskClient.log(Unknown Source) jvm 1 | WrapperSimpleApp: at com.google.code.sagetvaddons.sjqc.TaskClient.pop(Unknown Source) jvm 1 | WrapperSimpleApp: at com.google.code.sagetvaddons.sjqc.TaskClient.run(Unknown Source) jvm 1 | WrapperSimpleApp: at com.google.code.sagetvaddons.sjqc.TaskClient.main(Unknown Source) jvm 1 | WrapperSimpleApp: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) jvm 1 | WrapperSimpleApp: at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) jvm 1 | WrapperSimpleApp: at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) jvm 1 | WrapperSimpleApp: at java.lang.reflect.Method.invoke(Unknown Source) jvm 1 | WrapperSimpleApp: at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:236) jvm 1 | WrapperSimpleApp: at java.lang.Thread.run(Unknown Source) jvm 1 | WrapperSimpleApp: Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/sjq/SJQ?proto=2&cmd=writeLog jvm 1 | WrapperSimpleApp: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) jvm 1 | WrapperSimpleApp: ... 11 more wrapper | <-- Wrapper Stopped Press any key to continue . . . Greg Last edited by gveres; 11-16-2009 at 10:11 PM. |
#39
|
|||
|
|||
655 didn't fix this issue, directly. The issue here was that you were running task client v2.1.5.556 with a v3.0.0 server. The HTTP 500 errors come about because a 2.x client can't talk with a 3.x server. Of course, upgrading the task client to a 3.x version would immediately fix the problem.
__________________
Twitter: @ddb_db Server: Intel i5-4570 Quad Core, 16GB RAM, 1 x 128GB OS SSD (Win7 Pro x64 SP1), 1 x 2TB media drive Capture: 2 x Colossus STB Controller: 1 x USB-UIRT Software:Java 1.7.0_71; SageTV 7.1.9 Clients: 1 x HD300, 2 x HD200, 1 x SageClient, 1 x PlaceShifter Plugins: Too many to list now... |
#40
|
|||
|
|||
Slugger,
Nothing is processing.. its just hung. Code:
Mon Nov 16 23:57:39 PST 2009: SJQ Application Dump QueueLoader thread is alive... java.lang.Thread.sleep(Native Method) com.google.code.sagetvaddons.sjq.server.MediaFileQueueLoader.run(MediaFileQueueLoader.java:101) java.lang.Thread.run(Unknown Source) ClientMonitor thread is alive... java.lang.Thread.sleep(Native Method) com.google.code.sagetvaddons.sjq.server.ClientMonitor.run(ClientMonitor.java:35) java.lang.Thread.run(Unknown Source) InteralTaskClient thread is alive... java.lang.Thread.sleep(Native Method) com.google.code.sagetvaddons.sjq.server.InternalTaskClient.run(InternalTaskClient.java:59) java.lang.Thread.run(Unknown Source) Most recent LogCleaner thread is dead (this is normal behaviour)! Most recent FileCleaner thread is dead (this is normal behaviour)!
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct. Last edited by nyplayer; 11-17-2009 at 02:03 AM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Sage Job Queue (SJQ) new release notifications | Slugger | Customization Announcements | 3 | 12-17-2009 09:59 AM |
Plugin: Sage Job Queue (SJQ) | Slugger | SageTV Customizations | 991 | 12-11-2009 03:52 PM |
Sage Job Queue Completed tasks problem | raffmanlt | SageTV Customizations | 2 | 08-18-2009 07:34 PM |
Comskip Monitor VS Sage Job Queue SJQ | personalt | SageTV Customizations | 6 | 03-02-2009 10:27 AM |
Plugin: SJQ v1.1.0RC1 Available - Testers Needed | Slugger | SageTV Customizations | 35 | 04-21-2008 08:12 AM |