SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-07-2018, 11:46 AM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
SageTV Service and Client not behaving

(some logs can be found in this thread https://forums.sagetv.com/forums/showthread.php?t=65593)

So I have been having this issue where my wiz.bin file would get corrupted upon startup, and my favorites and what not would disappear.

I decided it was time to do some house cleaning, so i reinstalled a clean copy of Windows 7 Ultimate, the firewall is completely disabled, and no anti-virus software.

I get Sage intsalled and tell it to enable the server, setup all my sources, and everything is happy.

However I noticed that the SageTV Service is not enabled by default even when I tell it to activate the server.

Sure enough if I enable the service and have it run on startup the SageTV client either looses its connection within seconds of firing up after the service is running, or it just never starts, generating a corrupt wiz.bin.

This is a clean install of sage as well, and so I have no idea what's going on. I can see in the logs that the client appears to keep getting timeouts on sockets connecting to itself which of course makes no sense unless there is a firewall or something blocking (which there is not).

If i disable the sagetv service, but then just run the client with the server enabled (so that my extenders will run) then everything remains happy.

I've tried everything I can think of but nothing solves the problem, same problem occurs on any clean install and with any version of SageTV going back to at least 9.15.

I'm convinced there is either, a.) Some Windows 7 update has caused some sort of blocking of connections that I don't know / can't find. b.) Something is wrong in SageBuilds that happened in somewhat recently ( I was running 9.0* pretty happily for a while and never updated).

For now i'm just launching the SageTV client at startup and minimizing it to the system tray, which works effectively the same way, though it's a bit of a waste since it uses resources for duplicating the UI on the server that's almost never used.

Is anyone else having this problem on Windows 7? Is there anything else I can look at? Data execution Protection maybe?

I double checked / did a port scan to see if there were conflicts with other software, but a.) there's really only PlayOn, and a game client which is new, and b.) there appear to be no conflicts.

I could go the other way and try to always just run as a service, but then there are a few times i want to open the client and doing that, even if i shut the service off first seems to cause wiz bin corruption. This is why i'm leaning toward it being a problem in sage itself b/c the client works fine running as the server on its own but the service that gets installed does not.

Help?
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #2  
Old 10-07-2018, 03:52 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Sounds like a hard drive failure or RAM problem, especially on a clean install with no other obvious issues.
Reply With Quote
  #3  
Old 10-07-2018, 04:15 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
I'm skeptical of that simply b/c the logs show sockets timing out, which would never hit the HDD at all, and if RAM was failing then all kinds of other things would be busted. Admittedly though I don't understand what's happening. The thing runs fine so long as I don't use the service.
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #4  
Old 10-07-2018, 04:22 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
In my experience, it's fairly hard to predict what's hitting bad sectors of a hard drive (even background processes), or even based on my experiences with RAM that only shows errors on a cold boot (as a strange example).

That said, I am not experiencing your problems on Windows 7 Home Premium 64 bit.
Reply With Quote
  #5  
Old 10-07-2018, 05:05 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
I mean I don't have another explanation either. . . is there anything I could debug / get from the logs further?
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #6  
Old 10-07-2018, 05:25 PM
JustFred JustFred is offline
Sage Expert
 
Join Date: May 2015
Location: Sunnyvale, Ca
Posts: 572
Quote:
Originally Posted by sdsean View Post
(some logs can be found in this thread https://forums.sagetv.com/forums/showthread.php?t=65593)
So I have been having this issue where my wiz.bin file would get corrupted upon startup, and my favorites and what not would disappear.
Not sure exactly what's meant by "corrupted", but favorites (and other settings) would seem to disappear if Sage isn't able to write the properties file(s) to disk. Check the timestamp on the sage.properties file after the server is shut down; it should roughly match the shutdown time. Or (if UAC is enabled) maybe Windows is virtualizing the storage location for these files?

When you installed Sage, was the installer run with "Run As Administrator" ?

Is User Account Control enabled? If so, try turning it off.

Are there any interesting entries in the Windows Event Log?

Quote:
However I noticed that the SageTV Service is not enabled by default even when I tell it to activate the server.
Methinks this is the first problem to resolve, since it's pretty basic.

Once the SageTv service is running (and without launching the Client), do the extenders work properly with the Server?

Quote:
For now i'm just launching the SageTV client at startup and minimizing it to the system tray, which works effectively the same way
Not necessarily... When Sage is started as a service, it might run under a user account different than when started from the Windows UI. To verify, open the Computer Management Console -> Services & Applications -> SageTv. On the Log On tab, what account is being used? You probably want it to log on with the same account name as when running the Client. Another reference point: use Windows Task Manager -> Processes tab. Locate SageTVService.exe; verify that the UserName is as expected.

Quote:
Is anyone else having this problem on Windows 7?
I support multiple Sage v9.1x installations under Win7; not seeing any issues with the server. I don't use the Client. Placeshifter works just fine. In each case, UAC is turned off.

Quote:
This is why i'm leaning toward it being a problem in sage itself b/c the client works fine running as the server on its own but the service that gets installed does not.
Possible, but not likely. More likely an installation issue. Nothing has changed in Sage 9.1x builds that would produce the symptoms described.
__________________
System #1: Win7-64, I7-920, 8 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HDHR-US (1st gen white) tuners. HD-200.
System #2: Win7-64, I7-920, 8 GB mem, 4TB HD. Java 1.8.0_131. Sage v9.1.6.747. ClearQAM: 2x HDHR3-US tuners. HD-200.
System #3: Win7-64, I7-920, 12 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HVR2250; Spectrum Cable via HDPVR & USB-UIRT. 3x HD-200.
Reply With Quote
  #7  
Old 10-07-2018, 05:26 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
I have to admit, I'm not good reading logging - frankly it confuses me. Maybe someone else can make sense of it. I can tell you that I've installed Sage V9 server service on (3) different Win7 64 bit machines and not experienced the problems that you are seeing.

EDIT: Ah, good. Fred showed up. Thanks Fred!
Reply With Quote
  #8  
Old 10-07-2018, 05:30 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Wasn't there some mention a year ago about running the installation twice to ensure that the wiz.bin file was properly converted? Is that still a good idea?
Reply With Quote
  #9  
Old 10-07-2018, 05:51 PM
JustFred JustFred is offline
Sage Expert
 
Join Date: May 2015
Location: Sunnyvale, Ca
Posts: 572
Quote:
Originally Posted by KryptoNyte View Post
Wasn't there some mention a year ago about running the installation twice to ensure that the wiz.bin file was properly converted? Is that still a good idea?
The format of wiz.bin hasn't changed within any of the v9 releases. Conversion was only needed when upgrading from v7 -> v9, and it was a one-time, automatic process.

If I recall correctly, the old suggestion to run the installer twice was only applicable to some of the early v9.0 releases. Not needed for v9.1x releases. It affected the actual program installation, not wiz.bin conversion.
__________________
System #1: Win7-64, I7-920, 8 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HDHR-US (1st gen white) tuners. HD-200.
System #2: Win7-64, I7-920, 8 GB mem, 4TB HD. Java 1.8.0_131. Sage v9.1.6.747. ClearQAM: 2x HDHR3-US tuners. HD-200.
System #3: Win7-64, I7-920, 12 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HVR2250; Spectrum Cable via HDPVR & USB-UIRT. 3x HD-200.
Reply With Quote
  #10  
Old 10-07-2018, 06:02 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by JustFred View Post
The format of wiz.bin hasn't changed within any of the v9 releases. Conversion was only needed when upgrading from v7 -> v9, and it was a one-time, automatic process.

If I recall correctly, the old suggestion to run the installer twice was only applicable to some of the early v9.0 releases. Not needed for v9.1x releases. It affected the actual program installation, not wiz.bin conversion.
Technically the format of wiz.bin has changed slightly 2x since V9 (to add URL’s for SD images).

That said, the latest version of Sage can always read ANY previous version of wiz.bin. It simply writes out as the latest format. It’s only ever an issue if you want to back rev.
Reply With Quote
  #11  
Old 10-07-2018, 08:23 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
UAC is 100% disabled (it's like the first of many things I do when re-installing windows).

If i turn off the service / not start it, and run the SageTV client, works fine. And yes extenders connect to that just fine too.

If I then shut down the client, and start it back up, again things are fine. Of course using the client to do this uses more resources than just running the service headless, but it does work.

If I then start the service, and not turn on the client, then boom new wiz.bin corrupt file, favorites are gone.

If I always stick in "client mode" (e.g. just running the client and never starting the service) my favorites don't seem to disappear but like i said it's just more resources.

If I try to run the client with the service running, the client either never starts up, or it does start but then within seconds it "looses connection to the service".

It really does seem to be something with the service / service discovery.

I also ran a full chkdsk, and a full windows mem diagnostic. . . all 100% healthy.
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #12  
Old 10-07-2018, 08:26 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
Quote:
Not necessarily... When Sage is started as a service, it might run under a user account different than when started from the Windows UI. To verify, open the Computer Management Console -> Services & Applications -> SageTv. On the Log On tab, what account is being used? You probably want it to log on with the same account name as when running the Client. Another reference point: use Windows Task Manager -> Processes tab. Locate SageTVService.exe; verify that the UserName is as expected.
I vaguely remember at one point before I had issues and re-installed windows, that the service is running with the LocalSystem account and i switched it to use my user name.
Currently it's (the default) LocalSystem so I can try switching that again.

Question: How do I just back up my favorites? I tried just making a copy of wiz.bin and restoring that before I started the service, but they still disappeared. I could live/work around the problem if restarting didn't cause a loss of favorites each time.
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned



Last edited by sdsean; 10-07-2018 at 08:31 PM. Reason: need answer
Reply With Quote
  #13  
Old 10-07-2018, 08:28 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
An installation issue / conflict with some random Windows update is my biggest suspect atm btw (so not necessarily a true Sage problem).
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #14  
Old 10-07-2018, 08:30 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
Oh and also what I mean by "corrupted" is Sage when starting up literally generates a "wiz.bin.corrupt[n]" any time this all happens. Yet it clearly has no problem writing to log files. . . as noted in the logs it seems like it's having a problem holding a socket connection locally regardless of port and since it's in the middle of a start up with db writes and what not it freaks out.
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #15  
Old 10-07-2018, 08:44 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by sdsean View Post
Oh and also what I mean by "corrupted" is Sage when starting up literally generates a "wiz.bin.corrupt[n]" any time this all happens. Yet it clearly has no problem writing to log files. . . as noted in the logs it seems like it's having a problem holding a socket connection locally regardless of port and since it's in the middle of a start up with db writes and what not it freaks out.
Sage generates those “corrupt” files when an exception happens during loading and saving of the wiz.bin file. Check the sever log file for the words “Error with DB file” and the exception should be just above that.
Reply With Quote
  #16  
Old 10-07-2018, 09:37 PM
JustFred JustFred is offline
Sage Expert
 
Join Date: May 2015
Location: Sunnyvale, Ca
Posts: 572
Favorites are stored in wiz.bin. Both the SageTv service and Client must be stopped when you manually save/restore wiz.bin or any of the properties files.

Your original thread included sagetvclient_0.zip; I reviewed it and saw many java.lang.NullPointerException errors being logged. Not obvious what's causing them.

Please repost a new sagetvclient_0.txt and also post sagetv_0.txt after the server is stopped. That might give some more clues.

Anything interesting in the Windows Event Logs?

Confirm that both the Client and Server are the same version. It might also be worthwhile to re-install (on top of the existing version) both the Client and Server, choosing normal installation. Then re-install both again; this time choose Repair installation.
__________________
System #1: Win7-64, I7-920, 8 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HDHR-US (1st gen white) tuners. HD-200.
System #2: Win7-64, I7-920, 8 GB mem, 4TB HD. Java 1.8.0_131. Sage v9.1.6.747. ClearQAM: 2x HDHR3-US tuners. HD-200.
System #3: Win7-64, I7-920, 12 GB mem, 4TB HD. Java-64 1.8.0_141. Sage-64 v9.2.1 ATSC: 2x HVR2250; Spectrum Cable via HDPVR & USB-UIRT. 3x HD-200.
Reply With Quote
  #17  
Old 10-08-2018, 07:51 AM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
OK strange, I know i had the service and client shut off when i just made a copy of the wiz.bin. But it'll try that again when I grab logs, and I'll check the event viewer as well as some re-installs
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #18  
Old 10-08-2018, 11:46 AM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
So I did a clean shutdown of the service, and the just for fun reset one of my HD300s (other is turned off) to factory and updated the firmware from the internet.

Brought it up, added some favorites, everything seems fine.
Shut down the service (exited clean). Then just started it back up, and grabbed logs (in the link since they are do big to upload):
https://drive.google.com/open?id=1Es...tnL_-BVb3xN194

I notice right away I'm seeing:
Code:
Mon 10/8 10:33:02.022 [main@cbcfc0] java.lang.NegativeArraySizeException
Mon 10/8 10:33:02.022 [main@cbcfc0] 	at sage.Show.<init>(Show.java:475)
Mon 10/8 10:33:02.022 [main@cbcfc0] 	at sage.Wizard.loadDBObject(Wizard.java:7227)
Mon 10/8 10:33:02.022 [main@cbcfc0] 	at sage.Wizard.processXctFromStream(Wizard.java:7435)
Mon 10/8 10:33:02.022 [main@cbcfc0] 	at sage.Wizard.loadDBFile(Wizard.java:7592)
Mon 10/8 10:33:02.022 [main@cbcfc0] 	at sage.Wizard.startSeq(Wizard.java:2477)
Mon 10/8 10:33:02.022 [main@cbcfc0] 	at sage.Wizard.init(Wizard.java:629)
Mon 10/8 10:33:02.023 [main@cbcfc0] 	at sage.Wizard.prime(Wizard.java:463)
Mon 10/8 10:33:02.023 [main@cbcfc0] 	at sage.SageTV.<init>(SageTV.java:324)
Mon 10/8 10:33:02.023 [main@cbcfc0] 	at sage.Sage.startup(Sage.java:1170)
Mon 10/8 10:33:02.023 [main@cbcfc0] 	at sage.Sage.b(Sage.java:955)
Mon 10/8 10:33:02.023 [main@cbcfc0] Error with DB file:java.lang.NegativeArraySizeException, attempting to restore backup.
Mon 10/8 10:33:02.025 [LucenePersonTransactionTask@4f2af4] 10.23% / 48892 work queue, 7712 inserted @ 0.03 ms/peep avg [tot:227ms]
Like immediately, client not running shutdown happened fine. . . what's going on there? Should i try to grab logs from the shutdown maybe? Is that the right wizbin version?
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #19  
Old 10-08-2018, 12:25 PM
sdsean's Avatar
sdsean sdsean is offline
Sage Expert
 
Join Date: Jul 2008
Posts: 571
So heres more complete logs https://drive.google.com/open?id=1KV...CTuwyEPF0YHslh

And here's the steps I did:

1.) When I did the earlier startup, a wiz.bin.corrupt file is generated, and Sage restores from backup in that case
2.) Once that happened, I fire up an HD300 client, I went into settings and changed one setting ("Detect repeat airings with non-unique IDs" changed from Yes to No).
3.) Shutdown HD300, Shutdown Serivce
4.) Start service back up, this time no corrupt wiz.bin, things seem fine.
5.) Now b/c the earlier was restored from backup, all my previous recordings are marked as "archived" and favorites are gone, so I start up the HD300 again, and in that UI, unmark all the recordings as no longer being archived. Additionally add favorites from recordings that I know should have been favorites, and also toggle an EPG update just for good measure. I wait till I can see that Recording schedule now shows all my favorites upcoming that should get recorded.
6.) Now shutdown HD300, and shutdown service, then start service back up, and BOOM, corrupt wiz.bin again.

All of this in the logs. . .

Now what should I try? Btw I did look in event viewer, and didn't see anything out of the ordinary, no network/memory/hdd failures that I could see.

Would it be worth it to move all those recordings out some place / maybe only update favorites from guide? Or change my recording directory?
__________________
AMD Ryzen 9 3900XT 12 Core+HT, 64GB DDR5, GeForce 1060, MSI Prestige x570 Creation Mobo, SIIG 4 port Serial PCIe Card, Win10, 1TB M.2 SSD OS HDD, 1 URay HDMI Network Encoder, 3 HD-PVR, 4 DirecTV STB serial tuned


Reply With Quote
  #20  
Old 10-08-2018, 12:40 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
It looks like wherever you are getting your show descriptions has one that is too big. Wiz.bin stores show descriptions as byte arrays, with the length stored as a 'short' (-32768 to 32767). This means 32k is the limit for the description:

Show.java
Code:
    barr = descBytes;
    if (barr != null) {
      out.writeShort(barr.length);
      out.write(barr);
    }
The result is the length overflows the 2-byte short and is then read back in/attempted to be used as a negative number. I looked at a few of the descriptions in the log files and found one with at least 10-12k but didn't search exhaustively. At a minimum, Sage could consider capping that length and truncating to prevent crashing.

If you can figure out which file it is and move it out of your library import path you'll probably be up and running again.
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
analog tuners behaving differently in wintv and sage robmarch Hardware Support 3 08-30-2010 07:37 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
Sage TV Client won't work when SageTV runs as a "Service" Rezolution SageTV Software 4 05-30-2006 08:33 PM
SageTV 4.0 service - opening Sage UI hangs running SageTV client Surtr SageTV Software 1 11-10-2005 01:25 PM
Licence question - service/sagetv/sagetv client Jeraden SageTV Software 1 11-04-2004 01:04 PM


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


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