SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-07-2010, 02:07 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Restart to update .jar...

So I had older version of GKusnick Studio Tools and SageTCPServer installed, I created a SagePluginsDev.xml to install a new version of SageTCPServer (and dependency) through the Plugin interface. After the download SageTV says it required a restart to install those new .jar, fair enough. But from the sagetv_0.txt file, it's obvious it is still using the older files. Looking at the SageTV\SageTV\JARs folder I see the new files with some .5 or such appended to them. Now if I restart SageTV again, they do get renamed and used properly, but what was the point of the "built-in restart" if it's not going to install the new files in the first place? Am I missing something, or is that a bug in the release candidate 2?
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #2  
Old 02-01-2011, 12:41 AM
joshuad156 joshuad156 is offline
Sage User
 
Join Date: Feb 2010
Location: Ohio
Posts: 33
I have run into this issue myself, and mildly disappointed to see nobody here with any ideas as to why this may happen.

I'm developing my first SageTV plugin. I'm also kinda new to Java (done some Java Scripts in my past, but never full Java development). I'm rapidly exporting new versions during development and redeploying updated packages with updated version numbers in the SageTVPluginsDev.xml. SageTV client running locally on the server is detecting that I have an update available. I run the update, and it tells me I need to restart. The server clearly restarts, as I see the sage log file cycle. However, when my plugin launches, it's clearly launching the OLD version. After one more manual server restart and the new jar files becomes active.

I'll take any suggestions about what's happening as I'm clueless. Perhaps I'm doing something wrong, or I have the server configured wrong somehow. I see messages in the debug log after the update completes about staging the new jar file, but after the first restart, I don't see any log info about updating the jar file.

I'm not sure I've ever seen this behavior on my Production SageTV server before, but then again I'm not sure how thoroughly I've been checking!
Reply With Quote
  #3  
Old 02-01-2011, 12:53 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
The simplest solution I found is to just stop SageTV and its service, then drop the .jar in the folder. Of course if you actually need to test the deployment, then that wouldn't help you.
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #4  
Old 02-01-2011, 02:11 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by Fonceur View Post
The simplest solution I found is to just stop SageTV and its service, then drop the .jar in the folder.
This will likely just compound the problem. Manually overwriting JARs will break the consistency of revision dates and MD5 sums recorded by the plugin system and interfere with its ability to stage the installation of updated JARs.

For reliable plugin updates, always deploy your modified JARs through the plugin installer system and don't mess directly with the contents of the JARs folder.
__________________
-- Greg
Reply With Quote
  #5  
Old 02-01-2011, 07:30 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by GKusnick View Post
For reliable plugin updates, always deploy your modified JARs through the plugin installer system and don't mess directly with the contents of the JARs folder.
Except that the whole point is that it is not reliable and might require and extra restart to really take hold...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #6  
Old 02-01-2011, 08:15 AM
joshuad156 joshuad156 is offline
Sage User
 
Join Date: Feb 2010
Location: Ohio
Posts: 33
Quote:
Originally Posted by GKusnick View Post
For reliable plugin updates, always deploy your modified JARs through the plugin installer system and don't mess directly with the contents of the JARs folder.
I'd like to continue deploying this way, but still nobody seems to address the issue raised above. Does anyone else observe this same issue? Does everyone just "work around it" by restarting twice?

Is it standard convention to name the .jar file with a static name, or would it be better to include a version number in the .jar file name? I guess I could just try it but I'm at work now and can't test this from here.
Reply With Quote
  #7  
Old 02-01-2011, 08:26 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
It's the .zip that contains the version number, the .jar file should always be the same...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #8  
Old 02-01-2011, 08:45 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
I am seeing this allot lately as well. Has anyone bugged it with sagetv? It is really annoying lately.

Also sagex guys helps not having to constantly deploy since you can test right in your IDE
Reply With Quote
  #9  
Old 02-01-2011, 08:57 AM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
Quote:
Originally Posted by PLUCKYHD View Post
I am seeing this allot lately as well. Has anyone bugged it with sagetv?
I did back in October, the reply I got was:

Quote:
Originally Posted by SageTV BetaTest
We have no other reports of this problem, and it works properly in our testing. The only way we know of where it won't work properly is if you are also running SageTVClient on the same system as SageTV and that instance of SageTVClient is connected to a server on another machine. Are you able to reproduce the problem below?
I didn't really follow up, as there wasn't much I could do besides what I said in the bug report...
__________________
SageTCPServer (2.3.5): Open source TCP interface to the SageTV API
MLSageTV (3.1.8)/Sage Media Server (1.13): SageTV plugin for MainLobby/CQC
TaSageTV (2.58)/TaSTVRemote (1.14): Monitor/control SageTV with an Android device
TbSageTV (1.02)/STVRemote (1.11): Monitor/control SageTV with a PlayBook 2
TiSageTV (1.64)/TiSTVRemote (1.09): Monitor/control SageTV with an iPhone/iPod/iPad
Reply With Quote
  #10  
Old 02-01-2011, 08:58 AM
joshuad156 joshuad156 is offline
Sage User
 
Join Date: Feb 2010
Location: Ohio
Posts: 33
Quote:
Originally Posted by PLUCKYHD View Post
I am seeing this allot lately as well. Has anyone bugged it with sagetv? It is really annoying lately.
I haven't posted a bug report regarding this yet as I wasn't sure if I was doing something wrong or if this was in fact being seen by the developer community at large.


Quote:
Originally Posted by PLUCKYHD View Post
Also sagex guys helps not having to constantly deploy since you can test right in your IDE
Now I know I read a post somewhere about this neat trick sometime over the weekend, but my search-fu seems to be failing me. Any chance you can throw me a bone to help find this information?
Reply With Quote
  #11  
Old 02-01-2011, 09:22 AM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by joshuad156 View Post
I haven't posted a bug report regarding this yet as I wasn't sure if I was doing something wrong or if this was in fact being seen by the developer community at large.




Now I know I read a post somewhere about this neat trick sometime over the weekend, but my search-fu seems to be failing me. Any chance you can throw me a bone to help find this information?
See the thread below this one . Remote Apis or read this nice writeup stuckless did about a week ago.

http://forums.sagetv.com/forums/showthread.php?t=536

If you are just deploying to check your code against sage databse this is a must and will save you hours.
Reply With Quote
  #12  
Old 02-01-2011, 09:49 AM
joshuad156 joshuad156 is offline
Sage User
 
Join Date: Feb 2010
Location: Ohio
Posts: 33
Quote:
Originally Posted by PLUCKYHD View Post
Looks like you linked the wrong post (copy/paste snafu?) However, knowing the author and approx time of the writeup I was able to find this now myself, THANKS! And yes I KNEW I read this a few days ago but couldn't remember where it was.

http://forums.sagetv.com/forums/showthread.php?t=53657

The good news is I'm already using Sagex for my API calls, so this should be SIMPLE to implement. Thanks for the tip! Although it still doesn't solve my plugin restart issue.
Reply With Quote
  #13  
Old 02-01-2011, 05:18 PM
jreichen's Avatar
jreichen jreichen is offline
Sage Icon
 
Join Date: Jul 2004
Posts: 1,192
Now that I think about it this might be the cause of a number of problems reported by users of Jetty lately. Users have problems after upgrading and a restart won't help. They report that after they uninstall and reinstall all their plugins everything finally works again.
__________________
Server: Intel Core i5 760 Quad, Gigabyte GA-H57M-USB3, 4GB RAM, Gigabyte GeForce 210, 120GB SSD (OS), 1TB SATA, HD HomeRun.
Extender: STP-HD300, Harmony 550 Remote,
Netgear MCA1001 Ethernet over Coax.
SageTV: SageTV Server 7.1.8 on Ubuntu Linux 11.04, SageTV Placeshifter for Mac 6.6.2, SageTV Client 7.0.15 for Windows, Linux Placeshifter 7.1.8 on Server and Client
, Java 1.6.
Plugins: Jetty, Nielm's Web Server, Mobile Web Interface.

Reply With Quote
  #14  
Old 02-01-2011, 05:23 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Quote:
Originally Posted by jreichen View Post
Now that I think about it this might be the cause of a number of problems reported by users of Jetty lately. Users have problems after upgrading and a restart won't help. They report that after they uninstall and reinstall all their plugins everything finally works again.
Yeah I am seeing it allot today in testing I will try and get a log to sagetv if you guys will as well.
Reply With Quote
  #15  
Old 02-01-2011, 09:54 PM
joshuad156 joshuad156 is offline
Sage User
 
Join Date: Feb 2010
Location: Ohio
Posts: 33
So I submitted a bug report, and support gave me some things to look for. Here is what I found.

1) Only happens when you run SageTV server in service mode, and connect using a local SageTV client. Extenders and remote clients don't exhibit this problem. (has to do with shared Program Files between the service and the client)

2) When the plugin manager determines the jar file needs to be updated, it stages the update operation via 2 files in the SageTV folder, stageddeletes.txt and stagedrenames.txt. The plugin manager then restarts both the service and the client, however I believe the client prevents the server from executing the delete/rename operation.

2) By closing the client and manually restarting the service, this situation will be resolved.

3) The worst part of this is that the Plugin Manager doesn't seem to validate that the jar replacement occurs as intended. This means that the user becomes completely unaware that the jar file is still waiting to be replaced. Before the plugin manager restarts, it marks the plugin as failed due to the jar needing replaced. But after a restart, SageTV doesn't seem to do any checking to validate that the change occurs before allowing the plugin to start back up.

------

I supplied this info to Sage Support and I really hope that they take it seriously and either make the auto restart work properly (I hope this is what they do) or they at the very least put in some checks to validate the proper jar is running (probably should be done regardless!).

Last edited by joshuad156; 02-01-2011 at 09:56 PM.
Reply With Quote
  #16  
Old 02-02-2011, 09:49 AM
Savage1701 Savage1701 is offline
Sage Expert
 
Join Date: Apr 2009
Location: Roscoe, IL
Posts: 668
Would closing a client also mean a cold power-down of an extender, not just a soft-off from the remote?

That might be an issue for me; my clients are not always on, but my HD-200 is.

I do not, however, run Sage Server v7 in Service mode; I run it as an application.
__________________
Asus P5Q Premium MB, E6750, 4GB RAM, 32-bit XP Pro SP3, 3Ware 9590SE controller, 80GB 7.2K Laptop boot drive w/SuperSpeed Cache Utility & eBoostr, (1) KWorld ATSC-110, (1) 950Q USB, (1) 2250 tuner, (1) HD-PVR using USB-UIRT, (1) 1600 Dual card, (1) DVICO Fusion 5 Gold, (1) Hauppauge 1250, (1) Hauppauge 2250, 8 various storage HD's, NEC-based x1 USB add-on card, 2 outdoor antennas capturing 2 different OTA markets, Dish Network w/HD Receiver for HD-PVR.
Reply With Quote
  #17  
Old 02-02-2011, 09:59 AM
joshuad156 joshuad156 is offline
Sage User
 
Join Date: Feb 2010
Location: Ohio
Posts: 33
Quote:
Originally Posted by Savage1701 View Post
Would closing a client also mean a cold power-down of an extender, not just a soft-off from the remote?
I believe all extenders disconnect from the server when turned off via the power button on the remote. Also, restarting the server puts any connected extenders into the same standby state. The extenders don't seem to cause this issue (on or off). Only seems relevant when you run the Sage application on the same computer that you are running the Sage service.
Reply With Quote
  #18  
Old 02-02-2011, 01:10 PM
Savage1701 Savage1701 is offline
Sage Expert
 
Join Date: Apr 2009
Location: Roscoe, IL
Posts: 668
Joshua:

Since I only run Sage Server v7 as a program/application, not as a service, is there anything I can try?
__________________
Asus P5Q Premium MB, E6750, 4GB RAM, 32-bit XP Pro SP3, 3Ware 9590SE controller, 80GB 7.2K Laptop boot drive w/SuperSpeed Cache Utility & eBoostr, (1) KWorld ATSC-110, (1) 950Q USB, (1) 2250 tuner, (1) HD-PVR using USB-UIRT, (1) 1600 Dual card, (1) DVICO Fusion 5 Gold, (1) Hauppauge 1250, (1) Hauppauge 2250, 8 various storage HD's, NEC-based x1 USB add-on card, 2 outdoor antennas capturing 2 different OTA markets, Dish Network w/HD Receiver for HD-PVR.
Reply With Quote
  #19  
Old 02-02-2011, 06:30 PM
joshuad156 joshuad156 is offline
Sage User
 
Join Date: Feb 2010
Location: Ohio
Posts: 33
Quote:
Originally Posted by Savage1701 View Post
Joshua:

Since I only run Sage Server v7 as a program/application, not as a service, is there anything I can try?
If you're experiencing these symptoms, I believe you are probably seeing something different than I have documented here. Your scenario doesn't fit what I've experienced.

-----

On a positive note, Sage Support was able to locate the issue and fix the problem. Hopefully we get an updated package before too long.
Reply With Quote
Reply


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

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
Jar for .12 needed for .13 PLUCKYHD SageMC Custom Interface 1 04-12-2009 04:41 AM
Scheduled Windows Restart / Reboot (Shutdown -r) and Sage doesn't restart dealsdyker SageTV Software 8 03-09-2007 04:24 PM
df_sageutils.jar: which one? sjrx0213 SageTV Customizations 3 01-27-2007 11:20 PM
Which xerces.jar? mikesusangray SageTV EPG Service 4 03-01-2006 08:30 AM


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


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