SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Customizations

Notices

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.

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #181  
Old 11-13-2008, 09:54 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
OK that worked.

When I try to run the client it fails to run:


C:\Documents and Settings\David\Desktop\sjqc-2.0.0.84>sjqc.bat 192.168.1.134 8088
Exception in thread "main" java.lang.NoClassDefFoundError: and
Caused by: java.lang.ClassNotFoundException: and
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Ideas?
Not quite sure. You definitely need to add the is_ssl option to the cmd line:

sjqc.bat 192.168.1.134 false 8088

Also make sure all the jars are in the same dir. Along with the bat file there should be two jars: json.jar and sjqc.jar; all in the same dir that you're starting the client from.

The stack trace suggests it's looking for a class named "and", which really boggles my mind. First, fix the cmd line and try again. Then we'll go from there.
  #182  
Old 11-14-2008, 07:03 AM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
Quote:
Originally Posted by Slugger View Post
Not quite sure. You definitely need to add the is_ssl option to the cmd line:

sjqc.bat 192.168.1.134 false 8088

Also make sure all the jars are in the same dir. Along with the bat file there should be two jars: json.jar and sjqc.jar; all in the same dir that you're starting the client from.

The stack trace suggests it's looking for a class named "and", which really boggles my mind. First, fix the cmd line and try again. Then we'll go from there.
Same results. I just extracted the client to a folder on my desktop and am running from there.

thanks
  #183  
Old 11-14-2008, 09:39 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
Same results. I just extracted the client to a folder on my desktop and am running from there.

thanks
Can you try to get it running without using the batch file?

Code:
C:\path\to\java\bin\java.exe -cp ".\json.jar;.\sjqc.jar" com.google.code.sagetvaddons.sjqc.TaskClient 192.168.1.134 false 8088
Also, which version of java are you using? Run java -version from the command line.
  #184  
Old 11-14-2008, 10:01 AM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
Quote:
Originally Posted by Slugger View Post
Can you try to get it running without using the batch file?

Code:
C:\path\to\java\bin\java.exe -cp ".\json.jar;.\sjqc.jar" com.google.code.sagetvaddons.sjqc.TaskClient 192.168.1.134 false 8088
Also, which version of java are you using? Run java -version from the command line.
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

that worked and I see it connected.
  #185  
Old 11-14-2008, 10:12 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

that worked and I see it connected.
Back to the drawing board on the whole batch file thing, though it does work for me (and at least a couple others). None the less, I'll see what I can do about that.
  #186  
Old 11-14-2008, 11:19 AM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
I'm now trying to create a couple config files:

Client:
# Client options
:MAXPROCS 2
/*:MAPDIR "D:\\tv" "\\\\sageserver\\tv" # Mapping D:\tv to UNC path \\sageserver\tv
:MAPDIR "D:\\videos" "\\\\sageserver\\videos"
:MAPDIR "D:\\music" "\\\\sageserver\\music"
*/

// TASK definition
COMSKIP{
:CPU LOW
:MAX 0
"C:\Program Files\ComSkip\comskip.exe --ini=C:\Program Files\ComSkip\comskip.ini -n %c%"
}

Server:
// Process all TV recordings that don't have a matching edl file
if [IsTV == "true" && FileExists != "%c%\%p%.edl"] {
:PRIORITY 5
COMSKIP
}

What I want to do is process all TV shows that do not have an edl file by running comskip. Do these look correct? If so how do I for SJQ to start a scan?

thanks for your help,
dave
  #187  
Old 11-14-2008, 11:49 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 3,987
Quote:
Originally Posted by Slugger View Post
Back to the drawing board on the whole batch file thing, though it does work for me (and at least a couple others). None the less, I'll see what I can do about that.
Slugger maybe it has something to do with the white spaces in his path name. I simply extracted mine to C:\sjqc-2.0.0.54 and it works fine. Probably if he quotes it... it will work.

white space before and after "and"
C:\Documents and Settings\David\Desktop\sjqc-2.0.0.84>sjqc.bat 192.168.1.134 8088
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 11-14-2008 at 11:54 AM.
  #188  
Old 11-14-2008, 12:17 PM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
Quote:
Originally Posted by nyplayer View Post
Slugger maybe it has something to do with the white spaces in his path name. I simply extracted mine to C:\sjqc-2.0.0.54 and it works fine. Probably if he quotes it... it will work.

white space before and after "and"
C:\Documents and Settings\David\Desktop\sjqc-2.0.0.84>sjqc.bat 192.168.1.134 8088

That worked!

Here is what I changed that .bat file to:

java -cp "%~d0%~p0sjqc.jar;%~d0%~p0json.jar" "com.google.code.sagetvaddons.sjqc.TaskClient" %*

  #189  
Old 11-14-2008, 12:21 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
I'm now trying to create a couple config files:

Client:
# Client options
:MAXPROCS 2
/*:MAPDIR "D:\\tv" "\\\\sageserver\\tv" # Mapping D:\tv to UNC path \\sageserver\tv
:MAPDIR "D:\\videos" "\\\\sageserver\\videos"
:MAPDIR "D:\\music" "\\\\sageserver\\music"
*/

// TASK definition
COMSKIP{
:CPU LOW
:MAX 0
"C:\Program Files\ComSkip\comskip.exe --ini=C:\Program Files\ComSkip\comskip.ini -n %c%"
}

Server:
// Process all TV recordings that don't have a matching edl file
if [IsTV == "true" && FileExists != "%c%\%p%.edl"] {
:PRIORITY 5
COMSKIP
}

What I want to do is process all TV shows that do not have an edl file by running comskip. Do these look correct? If so how do I for SJQ to start a scan?

thanks for your help,
dave
Code:
"C:\Program Files\ComSkip\comskip.exe --ini=C:\Program Files\ComSkip\comskip.ini -n %c%"
All back slashes in all double quoted strings must be escaped. So in this line above either replace \ with \\ or flip them around (you may have to use \\ in the arguments depending if comskip can handle forward slashes in path names). Command arguments with spaces must be double quoted or they will not be passed to the command interpreter properly. So replace the above with something like this:

Code:
"C:\\Program Files\\ComSkip\\comskip.exe \"--ini=C:\\Program Files\\ComSkip\\comskip.ini\" -n \"%c%\""
I double quoted the %c% in case your record dir path contains a space, if you know it doesn't then that double quoting isn't necessary. Doesn't hurt to leave it.

And in your server conf:

Code:
FileExists != "%c%\%p%.edl"
Again, back slashes must be escaped:

Code:
FileExists != "%c%\\%p%.edl"
You may want to check if you're using the right media vars for this test. I think you might want to replace %c% with %d%.
  #190  
Old 11-14-2008, 12:23 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
That worked!

Here is what I changed that .bat file to:

java -cp "%~d0%~p0sjqc.jar;%~d0%~p0json.jar" "com.google.code.sagetvaddons.sjqc.TaskClient" %*

Of course... I was so baffled by where the "and" came from in the java stack trace that I didn't take the time to read all your output. Adding the quotes to the batch file now...

Thanks.
  #191  
Old 11-14-2008, 12:40 PM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
OK I got all the escaped " and \ in there. How do I tell SJQ to go try it? Also how can I enable logging so I can see the errors, I'm sure to have

thanks,
  #192  
Old 11-14-2008, 12:49 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
OK I got all the escaped " and \ in there. How do I tell SJQ to go try it? Also how can I enable logging so I can see the errors, I'm sure to have

thanks,
On the bottom tool bar, clicking the time of the next scheduled run allows you to do an immediate run.

Errors with the server conf are automatically logged. Click the "View server logs" toolbar button to view. Errors with the client configs aren't so friendly to view. Watch your client window, if it reports a 500 response from the server then that's an indication of an error in your client conf. Paste the URL into a browser for a more verbose error message. I'm working on a way to have those verbose messages viewable in the GUI.
  #193  
Old 11-14-2008, 02:55 PM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
For my server config. Will this rule start a comskip job if:

1. It is a TV show
2. the .mpg file exists
3. no matching .edl exists.

// Process all TV recordings that don't have a matching edl file
if [IsTV == "true" && FileExists != "%d%\\%p%.edl" && FileExists == "%c%"] {
:PRIORITY 5
COMSKIP
}

Is there a way to clear the queue and start over?

thanks,

Last edited by lovingHDTV; 11-14-2008 at 03:03 PM.
  #194  
Old 11-14-2008, 03:25 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
For my server config. Will this rule start a comskip job if:

1. It is a TV show
2. the .mpg file exists
3. no matching .edl exists.

// Process all TV recordings that don't have a matching edl file
if [IsTV == "true" && FileExists != "%d%\\%p%.edl" && FileExists == "%c%"] {
:PRIORITY 5
COMSKIP
}

Is there a way to clear the queue and start over?

thanks,
Yes, excect the last FileExists is unnecessary, it will always be true. If you want to only process mpg files then you may want to replace it with:

Filename =$ ".mpg"

which says the file must be an mpg file (i.e. filename ends with .mpg). Your current rule will match any file that doesn't have a matching edl. You may also want to add IsActivelyRecording == "false" to ensure comskip doesn't start until after the recording is finished.

Currently, there is no way to clear the current queue other than to restart SJQ. You can do that by opening the context file in SageTV\jetty\contexts and resaving it. Updating the timestamp of that file will restart SJQ. Being able to add/remove single queue entries along with wiping the entire queue is definitely on the todo list.

The weather forecast is calling for rain tomorrow, if it does then I'll be able to tackle more of these todo list items in the morning. If it doesn't then I have yard work to be done. I should be able to find a few hours Sunday morning before football starts. Check the snapshot repository for new builds as they become available. Bugs, feature requests, etc. are best added to the project issue tracker. Just to make a note, here's the current todo list, feel free to add to it if you think something's missing:
  • Add ability to add failed/completed jobs back to the queue, if desired
  • Allow removal of items in the queue; allow wiping of entire active queue
  • Add option to have failed jobs automatically go back to the queue
  • Add back the "edl cleaner" (have SJQ auto cleanup specified files)
  • Some kind of log management
  • Have clients log their errors back to the server for viewing within the GUI; have client grab verbose dumps instead of just reporting "500 response received"
  • Use the bottom tool bar for status messages
  • Any other ideas?
  #195  
Old 11-14-2008, 03:37 PM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
1. We need a way to detect hung jobs. I have two jobs supposedly assigned to a client, but there is nothing running on the client. So there will be no forward progress until I restart everything.
2. Ability to adjust a job priority in the queue

Last edited by lovingHDTV; 11-14-2008 at 03:51 PM.
  #196  
Old 11-14-2008, 04:04 PM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by lovingHDTV View Post
1. We need a way to detect hung jobs. I have two jobs supposedly assigned to a client, but there is nothing running on the client. So there will be no forward progress until I restart everything.
2. Ability to adjust a job priority in the queue
Did the processes hang or did you kill the client while the process was running? In either case, a timeout definitely is need to catch either scenario. Adding it to the list...

Adjust waiting task priority... will come with the queue editing updates...
  #197  
Old 11-14-2008, 05:13 PM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
Quote:
Originally Posted by Slugger View Post
Did the processes hang or did you kill the client while the process was running? In either case, a timeout definitely is need to catch either scenario. Adding it to the list...

Adjust waiting task priority... will come with the queue editing updates...
In one case I killed the client. In most cases I was still trying to debug my client config rules, so comskip was dieing.
  #198  
Old 11-14-2008, 05:14 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 3,987
Slugger,

1.Add the ability to archive..unarchive..set manualrec status. You seem to have everything covered.
2. Ability to tell each client when they can process ... ex time of day they can process.

PS.
Is shutting the client process as easy as shutting down the batch job or does it still stay connected? I shut down the batch job on a client but it still shows connected.
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.

Last edited by nyplayer; 11-15-2008 at 08:05 AM.
  #199  
Old 11-15-2008, 08:52 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 3,987
FileExists !=

It appears the FileExists != is not working.. but there is no way to tell at the moment what it's checking for and why the rule is not running.

the rule below doesn't work even though there is definitely no .working file.
Code:
if [IsTV == "true" && IsActivelyRecording == "false" && Filename =$ ".mpg" && FileExists != "%d%\\%p%.working"]{
    :PRIORITY 10
      QUICKFIX
}
__________________
Windows 10 I3 Dual Core 3.0 Server, SageTV9... OpenDCT with 2 HDHRPrimes and 4 HDHRconnects for a total of 14 Tuners.
  #200  
Old 11-15-2008, 11:01 AM
Slugger Slugger is offline
SageTVaholic
 
Join Date: Mar 2007
Location: Kingston, ON
Posts: 4,008
Quote:
Originally Posted by nyplayer View Post
It appears the FileExists != is not working.. but there is no way to tell at the moment what it's checking for and why the rule is not running.

the rule below doesn't work even though there is definitely no .working file.
Code:
if [IsTV == "true" && IsActivelyRecording == "false" && Filename =$ ".mpg" && FileExists != "%d%\\%p%.working"]{
    :PRIORITY 10
      QUICKFIX
}
Indeed it is raining, so no yard work is getting done, but SJQ bugs are getting fixed!

Snapshot 98 adds a new server setting: Debug. Set it to true to get all the debug info you can handle. I hesitated to put this in before adding some kind of log management features because of the massive amount of output it produces on each run of the queue loader, but obviously you need some kind of clue as to why your rules aren't doing what you expect. Give the server log viewer time to load when debug is true - it's a lot of output to be displayed.

So keep this setting to false unless you really need the output and then when you're done remember to turn it off!

Snapshot 98 also includes the fix for the FileExists test. Testing for the non-existence of a file did not work (!= operator simply ignored). This is fixed in 98.
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plugin: Sage Job Queue (SJQ) v3 Slugger SageTV Customizations 1355 07-25-2013 07:44 AM
Sage Job Queue (SJQ) new release notifications Slugger Customization Announcements 3 12-17-2009 09:59 AM
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


All times are GMT -6. The time now is 06:53 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.