SageTV Community  

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

Notices

SageTV v7 Customizations This forums is for discussing and sharing user-created modifications for the SageTV version 7 application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss plugins for SageTV version 7 and newer.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-27-2016, 06:48 AM
hufnagel hufnagel is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Union Cty, NJ
Posts: 172
SageTV service refuses to stay running while using SageTCPServer

note: I used the advice from this thread to temporarily fix the problem.

Issue: this morning SageTV stopped working properly after years of faithful service. I found that the service wouldn't stay running after a couple minutes. Using previously noted thread's advice it's stable for now, however I want to document what i've found.

This morning while at the gym I decided to install the SageTV Android Miniclient.

Install went fine and I tried to connect it to my server. It asked for a username and password, I put them in, and it stopped responding. After a couple minutes I exited the app and tried again. It repeatedly said it couldn't connect to the server. I tried various diagnostics during leg press sets, and couldn't find anything wrong. I tried to connect it to my mom's SageTV server and it worked fine. Thinking it might have something to do with my router and firewall I left it alone. I came home some time later and went to turn on the tv for the kid. Odd... it's not working. Go and check and yep, the SageTVService is down. Restart it, start up the kid's show and WTF it just died again! Try several more times and sure enough the service won't stay running.

See attachment 20170927_0814.txt for a debug log of the service starting and stopping, with no command inputs from me from any extender or the main console, and attachment 20160927_EventLog.jpg for a listing of the service going up and down.

The highlighted event is a service STOP event, and it's right about the time I first tried connecting the Android client to my server. All subsequent time stamps are start/stop pairs. I did some searching here and came up with the link listed at the top. I disabled sageTCPserver plugin and it seems to have stabilized the problem for now; at least i've been running the slide show on the console app for the past 30 minutes with no issues.

My question is: what just broke with that plugin? And why now, and just when I tried to use the Miniclient? As I mentioned I tested the connection to my mom's SageTV install and it's still running fine with no hiccups.
I'm going to try the Miniclient again in a few minutes and will report back what I find.

ETA: just tried the miniclient while at home on the same network as the PVR. Appears to work, so that plugin isn't needed I guess?
Also if anyone can point to the "smoking gun" in the log file so I can learn things, I'd appreciate it.
Attached Images
File Type: jpg 20160927_EventLog.jpg (189.1 KB, 187 views)
Attached Files
File Type: txt 20170927_0814.txt (677.6 KB, 168 views)
__________________
Setup #7.6 Hyper-V (again!)
Hardware: Comcast Basic Digital Cable, (1) HDHR3-CC 20170815 firmware, 36GB "system" drive, 2TB laptop drives, a buttload of archive drives, HP DL380G6 2x X5660 processors (4 cores to VM), 4GB ram
Software: Windows 7 Ultimate SP1 x64, SageTV v9.1.2.662, Java v1.8.0_131, STV 2017052101, HD300 extenders

Last edited by hufnagel; 09-27-2016 at 06:54 AM.
Reply With Quote
  #2  
Old 09-27-2016, 07:11 AM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Has something to do with port number enumeration for each connected client or placeshifter. Problem is with dynamic IP's, any given client can connect under a new IP and given a new port, yet all are remembered, with a limit of 20 the author mentions. Static IP's for your clients are the author's recommended solution.

Start at the end of this thread and read back towards the front;

https://forums.sagetv.com/forums/sho...=53764&page=10
Reply With Quote
  #3  
Old 09-27-2016, 07:19 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
You found your issue (SageTCPServer) and you are not the first to be hit with this. This plugin calls exit() on the JVM when it encounters a problem, which is pretty bad, since that shuts down the entire sagetv server.

From the log...

Code:
Tue 9/27 7:40:31.462 [[SageTCPServer]]: Starting extender
Tue 9/27 7:40:31.462 [[SageTCPServer-Player:9279]]: Starting a player on socket 9279
Tue 9/27 7:40:31.462 [[SageTCPServer-Player:9279]]: TCPServerPlayer: 424657595642, port = 9279,ip = null
Tue 9/27 7:40:31.462 [[SageTCPServer-Player:9279]]: EXCEPTION java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind AT java.net.PlainSocketImpl.socketBind(Native Method)

Tue 9/27 7:40:31.463 java.net.PlainSocketImpl.bind(Unknown Source)

Tue 9/27 7:40:31.463 java.net.ServerSocket.bind(Unknown Source)

Tue 9/27 7:40:31.464 ::INFO:  Shutdown hook executing
You can see SageTCPServer starting, then and error, and then shuts down the server.

As to why the MiniClient could activate this... I'm not sure. It's likely listening for a client connection and when it gets one it probably tries to start a process to monitor it?? My understanding is that SageTCPServer is much like Sagex Remote APIs in that it allows other plugins to send events to sagetv. I think Foncour's SageTV Remote App for Android and iOS uses this server, but other than that, I don't think it's used by anything else. It's certainly not used by core sagetv or the Android MiniClient (or Phoenix, BMT, etc).
Reply With Quote
  #4  
Old 09-27-2016, 07:37 AM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
I ran into this issue a while back. What you need to do is clear out the list of clients in SageTCPServer. I forget where the list of clients for SageTCPServer is stored. I just remember that is what fixed the issue for me.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #5  
Old 09-27-2016, 08:11 AM
tvmaster2's Avatar
tvmaster2 tvmaster2 is offline
SageTVaholic
 
Join Date: Jun 2005
Location: tarana
Posts: 4,240
Quote:
Originally Posted by Taddeusz View Post
I ran into this issue a while back. What you need to do is clear out the list of clients in SageTCPServer. I forget where the list of clients for SageTCPServer is stored. I just remember that is what fixed the issue for me.
this happened to me as well, so if you remember where they're stored, post here
__________________
Sage 9 server = Gigabyte AMD quad-core - 4 gigs - integrated ATI HD4200 chipset - SSD boot, Hitachi Deskstar show drives. HD-PVR - Colossus - Win7 32 bit. HD200/300’s networked. HDHomerun tuner. "If you've given up on Weird Al, you've given up on life" - Homer Simpson
Reply With Quote
  #6  
Old 09-27-2016, 11:01 AM
sic0048 sic0048 is offline
Sage Icon
 
Join Date: Nov 2007
Posts: 1,400
It's in the Sage.Properties file. Those lines start with "SageTCPServer"
__________________
i7-6700 server with about 10tb of space currently
SageTV v9 (64bit)
Ceton InfiniTV ETH 6 cable card tuner (Spectrum cable)
OpenDCT
HD-300 HD Extenders (hooked to my whole-house A/V system for synched playback on multiple TVs - great during a Superbowl party)
Amazon Firestick 4k and Nvidia Shield using the MiniClient
Using CQC to control it all
Reply With Quote
  #7  
Old 09-27-2016, 12:40 PM
hufnagel hufnagel is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Union Cty, NJ
Posts: 172
So do I even NEED this plugin at this point?
All my HD300's work.
PlaceShifter on my laptop works.
Miniclient on my phone works.
SageTV Web Interface works. (Sage Webserver version 2.43)

What am I "missing" by having this plugin disabled?

ETA: just read that thread posted above, and dug into Sage.Properties. Found "sageTCPServer/extender=" has more than 20 MAC addresses listed. Probably because I've had a bunch of extenders here, MediaMVP, HD300, placeshifter clients, both for myself and prepping/testing for mom. I'm going to back up that line, then clear it of all listings. That seems to be the recommendation from the post linked by KryptoNyte.

ETA2: Also clearing the line "sageTCPServer/client=" as it has IP address/port pairs that match up with the MAC/port pairs from 'extender'.

ETA3: the last 3 entries in the exender MAC listing all have the same port as well. Port numbers were from 9260 to 9279, skipping 9270, and listing 9279 2 more times. The last 2 MAC addresses listed for 9279 also don't resolve to any known vendor.
__________________
Setup #7.6 Hyper-V (again!)
Hardware: Comcast Basic Digital Cable, (1) HDHR3-CC 20170815 firmware, 36GB "system" drive, 2TB laptop drives, a buttload of archive drives, HP DL380G6 2x X5660 processors (4 cores to VM), 4GB ram
Software: Windows 7 Ultimate SP1 x64, SageTV v9.1.2.662, Java v1.8.0_131, STV 2017052101, HD300 extenders

Last edited by hufnagel; 09-27-2016 at 12:57 PM.
Reply With Quote
  #8  
Old 09-27-2016, 12:45 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by hufnagel View Post
So do I even NEED this plugin at this point?
All my HD300's work.
PlaceShifter on my laptop works.
Miniclient on my phone works.
SageTV Web Interface works. (Sage Webserver version 2.43)

What am I "missing" by having this plugin disabled?
The only thing I was ever using it for was the iOS SageTV Remote Control app.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #9  
Old 09-27-2016, 12:46 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by hufnagel View Post
So do I even NEED this plugin at this point?
All my HD300's work.
PlaceShifter on my laptop works.
Miniclient on my phone works.
SageTV Web Interface works. (Sage Webserver version 2.43)

What am I "missing" by having this plugin disabled?
I think it's primarily used by this application...

https://play.google.com/store/apps/d...etv.full&hl=en
Reply With Quote
  #10  
Old 09-27-2016, 01:07 PM
hufnagel hufnagel is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Union Cty, NJ
Posts: 172
Quote:
Originally Posted by stuckless View Post
I think it's primarily used by this application...

https://play.google.com/store/apps/d...etv.full&hl=en
You know, I tried to use that WAY back in the day with this old vizio tablet I have, to make it into a mega media center remote. Didn't pan out. If that's the case then I'll toss that plugin off the system.
__________________
Setup #7.6 Hyper-V (again!)
Hardware: Comcast Basic Digital Cable, (1) HDHR3-CC 20170815 firmware, 36GB "system" drive, 2TB laptop drives, a buttload of archive drives, HP DL380G6 2x X5660 processors (4 cores to VM), 4GB ram
Software: Windows 7 Ultimate SP1 x64, SageTV v9.1.2.662, Java v1.8.0_131, STV 2017052101, HD300 extenders
Reply With Quote
  #11  
Old 09-27-2016, 02:36 PM
hufnagel hufnagel is offline
Sage Advanced User
 
Join Date: Nov 2003
Location: Union Cty, NJ
Posts: 172
The cleanup seemed to work. Sage didn't exit with predjudice for over an hour. So I went in and disabled that plugin for now anyways.

Thanks to everyone who replied. The kid will think i'm a GOD when I activate the Miniclient on his tablet when we're at the relatives for a couple days. (Daddy might be stealing the tablet periodically too. )

Cat Tax:

__________________
Setup #7.6 Hyper-V (again!)
Hardware: Comcast Basic Digital Cable, (1) HDHR3-CC 20170815 firmware, 36GB "system" drive, 2TB laptop drives, a buttload of archive drives, HP DL380G6 2x X5660 processors (4 cores to VM), 4GB ram
Software: Windows 7 Ultimate SP1 x64, SageTV v9.1.2.662, Java v1.8.0_131, STV 2017052101, HD300 extenders
Reply With Quote
  #12  
Old 09-27-2016, 07:31 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Quote:
Originally Posted by stuckless View Post
I think it's primarily used by this application...

https://play.google.com/store/apps/d...etv.full&hl=en
This is the only reason I had it installed. I still have it disabled, never use the android remote anymore. Good to see you're back up and running.

This same situation happened to me, right when I tested a placeshifter connection on my laptop about 2 hours before a flight. The SageTV server crashed and wouldn't stay running. At that time, I had a backup image of my SageTV server on one of the server's hard drives, and I had a recovery flash drive ready to go. With the SSD as the boot/SageTV server drive, I was able to reinstate the image in less than 15 minutes and get the server back up to get recordings for the time I was away from home. I researched the issue and resolved later, but just reinforced the idea of a full OS image of our SageTV servers - there was a backup plan in place, and it worked.

Last edited by KryptoNyte; 09-27-2016 at 07:35 PM.
Reply With Quote
  #13  
Old 09-28-2016, 09:42 AM
sic0048 sic0048 is offline
Sage Icon
 
Join Date: Nov 2007
Posts: 1,400
This plug in was writen by Foncour/David Li I believe. It is used for three things. 1) the TASage and TASageRemote Android apps 2) the TISage and TISageTVReMote iOS apps 3) the CQC Home automation SageTV drivers.

If you are not using any of these apps, then there should be no issue in removing this plugin.

I still use the CQC drivers and need the plug in. But when I had this issue, I found that the plugin automatically added a line in the properties file that seems to wrongly assign a port number to the server. I forgot exactly what it was, but I think there was the same port number being assigned to both an extender and the server. Correcting that line fixed my issues.
__________________
i7-6700 server with about 10tb of space currently
SageTV v9 (64bit)
Ceton InfiniTV ETH 6 cable card tuner (Spectrum cable)
OpenDCT
HD-300 HD Extenders (hooked to my whole-house A/V system for synched playback on multiple TVs - great during a Superbowl party)
Amazon Firestick 4k and Nvidia Shield using the MiniClient
Using CQC to control it all

Last edited by sic0048; 09-28-2016 at 09:46 AM.
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
MyMovies collection manager, does it need to stay running? personalt Sage My Movies 3 07-12-2011 08:21 AM
Benefit of running sagetv as a service? Keo SageTV Software 5 04-08-2011 02:19 PM
Running SageTv Service on WHS after reboot? -=Jeff=- SageTV Software 7 10-04-2009 10:29 AM
How can you tell if the SageTV Service is running BobPhoenix SageTV Studio 2 04-15-2008 10:11 PM
When running as service why does starting Sage UI say SageTV Service is initializing? GollyJer SageTV Software 2 12-27-2006 09:59 AM


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


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