TV Service doesn't start automatically with XP (1 Viewer)

CathodeRay

Portal Member
August 2, 2012
41
5
50
United Kingdom United Kingdom
Oh dear, back again...

Everything working except MP's TV service doesn't start automatically with Windows (MP 1.2, XP SP3, all the .net clobber added). Notes:

MySQL service and all the other TV service dependencies start automatically (MySQL rather slowly but it gets there).

TV service can be started manually (net start tvservice) but it's a bore(!) (and it means EPG grabbing while idle doesn't happen from the get go)

mysqlcheck mptvdb - all OK

XP Event logs: no clues that I can see, MySQL gives an event ID 100 unknown error but (probably) not relevant - and service starts OK.

TV server error.log (actually it in error.bak) has this (repeated a number of times) (cut & paste as not too many lines, very happy to zip and upload other logs if needed):

2015-08-12 13:26:03.640625 [TVService(6)]: TvService OnStart failed : System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.SleepInternal(Int32 millisecondsTimeout)
at TvService.TvServiceThread.OnStart()
2015-08-12 13:26:03.734375 [scheduler thread(9)]: card: unable to connect to slave controller at:media-pc
2015-08-12 13:45:11.296875 [DVB EPG timer(12)]: Exception :confused:ystem.Runtime.Remoting.RemotingException: Requested Service not found

Server stack trace:
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at TvControl.IController.IsRecording(IUser& user)
at TvService.EpgCard.IsCardIdle(Int32 cardId)
at TvService.EpgCard.GrabEpgForChannel(Channel channel, IChannel tuning, Card card)
at TvService.EpgCard.GrabEpg()
at TvService.EpgGrabber.GrabEpgOnCard(EpgCard epgCard)
at TvService.EpgGrabber._epgTimer_Elapsed(Object sender, ElapsedEventArgs e)

2015-08-12 15:56:11.671875 [DVB EPG timer(12)]: Exception :confused:ystem.Runtime.Remoting.RemotingException: Requested Service not found

tv.log has:

2015-08-12 19:53:04.468750 [(4)]: Setting up EventWaitHandle with name: Global\MPTVServiceInitializedEvent
2015-08-12 19:53:07.953125 [(6)]: TV service: Starting
2015-08-12 19:53:08.000000 [TVService(6)]: TVService v1.2.2.0 is starting up on Windows XP ( Service Pack 3 ) [5.1.2600.196608]
2015-08-12 19:53:08.015625 [TVService(6)]: Build: 1.2.2.0
2015-08-12 19:53:08.093750 [TVService(6)]: Controller: Initializing TVServer
2015-08-12 19:53:08.093750 [TVService(6)]: Controller: 1 init attempt
2015-08-12 19:53:08.109375 [PowerEventThread(8)]: TV service PowerEventThread message loop is running
2015-08-12 19:53:08.203125 [TVService(6)]: C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal TV Server\gentle.config
2015-08-12 19:53:08.203125 [TVService(6)]: Controller: using MySQL database connection: Server=media-pc;Database=MpTvDb;User ID=root;Password
2015-08-12 19:53:08.218750 [TVService(6)]: ----------------------------
2015-08-12 19:53:08.218750 [TVService(6)]: Detecting Cards
2015-08-12 19:53:08.375000 [TVService(6)]: Detected IP TV Card 0
2015-08-12 19:53:09.140625 [TVService(6)]: Found card:nova-dt dvb-t tuner (dev1 path0)
2015-08-12 19:53:09.171875 [TVService(6)]: Detected DVB card:nova-dt dvb-t tuner (dev1 path0)

ie presumably this is the manual start, no prior entries for this boot up of the pc

The TV service always used to start automatically, so after booting the PC I could after waiting a few moments for everything to settle down I could go straight to MP via a button on the remote. Now I have to do cmd prompt > 'net start tvservice' first... not the end of the world, but it would be good not to have to do so. I suppose I could use a batch file, but again its a work-around. Any ideas?

Thanks in advance.

CathodeRay
 

mm1352000

Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Hello

    If you would like help, please:
    1. Use the watchdog with option 3 to collect full log files then attach the zip file here.
    2. Tell us when the system last booted and TV service failed to auto-start.
    Regards,
    mm
     

    CathodeRay

    Portal Member
    August 2, 2012
    41
    5
    50
    United Kingdom United Kingdom
    Hi

    Watchdog option 3 produces a 11Mb zip file containing 881 files with heaven knows what personal information in it - it probably even has my inside leg measurement somewhere in it! Very happy to extract relevant files and zip/upload them, if you let me know which ones.

    TV service now fails to start automatically at every system boot, last system boot was around 10:30 this morning. The things is, I'm not sure the problem is being logged because the problem is the service isn't starting, no service = no logs (for the service, until I start it manually).

    I've googled and searched the forum about this problem (TV service not starting automatically with Windows) and there are some posts but no real solid information that I can find. Until a few days ago (when I had the mptvdb corruption problem) it always started fine. I've already rechecked mptvdb and it reprts all tables as OK. I've even deleted (dropped) mptvdb and rebuilt it from scratch and done a repair install of MySQL (5.1).

    I've checked all the service dependencies for tvservice and they all run as they should. The only thing of possible note is the MySQL service is slow to start, but it does start in the end. So I wonder whether this is tvservice trying to start before MySQL is running, but shouldn't Windows take care of that ie not try to start tvservice until MySQL has conformed it is running - isn't that how dependencies work?

    As I say, very happy to upload any relevant log files (but not the one with my inside leg measurement in it)!

    Best wishes

    CathodeRay
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,105
    3,689
    Lehmden
    Germany Germany
    Country flag
    Hi.
    Looks like the same issue I always had the ole days I still was using MP1...
    MySQL is not ready fast enough on system start. It tells the system it is ready, but it still isn't... So TVService can't start. I've tried SQLExpress where this did not happen that often, but it still happens every now and then. The only thing that really has helped me then was to start TVService manual with a batch in Autostart.. Did not have the batch any more as I won't use MP1 any more but iirr it was soemthing like:
    Net start MySQLd.exe
    wait 5000
    Net start TVService.exe
    This issue never was fixed, not in MySQL and not in TVService so I think this can be the case here too...
     

    HTPCSourcer

    MP2 Product Manager
  • Team MediaPortal
  • May 16, 2008
    11,431
    2,334
    Germany Germany
    Country flag
    As I say, very happy to upload any relevant log files (but not the one with my inside leg measurement in it)!
    CathodeRay, logs are important and required to diagnose problems. No personal information is transmitted and the community neither works for Google nor Microsoft or Apple. If you have doubts, you may take a look at the zip content yourself and verify that what I am telling you here is true.

    With all respect: please understand that we don't want to speculate about a system or have to request one more log file, and then another one, etc. until the issue is tracked down. You can accept this or not. This is entirely your choice.

    EDIT: And by the way - it is actually a good idea to clean the log directory/ies before triggering the issue another time. This way only recent and relevant information is contained in the file rather than very old log files.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Watchdog option 3 produces a 11Mb zip file containing 881 files with heaven knows what personal information in it - it probably even has my inside leg measurement somewhere in it! Very happy to extract relevant files and zip/upload them, if you let me know which ones.
    Well, the intention of the tool is to give you the ability to give us what we need without wasting our time or yours. Presumably the reason it has picked up so many files in your case is because you have months (years?) worth of historical log files. I'm not going to look at anything more than a week old (I'll want to check back to before your recent corruption episode), so you can remove the ancient history... but I'd prefer you leave the rest in there and upload as is.

    Obviously you are able to check what you're uploading before you upload it, and pull it down afterwards if you're really concerned. Things like the application and system event logs are included... because obviously they're needed for dealing with problems like this. If you consider that to be your "inside leg measurement" then I guess I can't help.

    TV service now fails to start automatically at every system boot, last system boot was around 10:30 this morning. The things is, I'm not sure the problem is being logged because the problem is the service isn't starting, no service = no logs (for the service, until I start it manually).
    You asked for help. I'm happy to do that if you can provide the information I need. It may well be that you're right, but I won't know that until I've been able to check out the log files for myself. :)
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Looks like the same issue I always had the ole days I still was using MP1...
    Your opinion is noted. However, I'm not sure how you've been able to come to that conclusion without having had the ability to assess the evidence/information properly. ;)

    I understand you're trying to be helpful. However, guessing and assuming can mislead people and lead to extensive time wasting when guesses/assumptions are wrong. I'm not saying you're wrong. In fact you may well be right. However, I'd appreciate it if we could take things one step at a time, logically etc.
     

    CathodeRay

    Portal Member
    August 2, 2012
    41
    5
    50
    United Kingdom United Kingdom
    Lehmden - my hunch FWIW is that this timing/ready but not ready thing is perhaps the problem (I take mm1352000's point about guessing and assuming, but I think we are guessing and assuming based on hunches (past experience?), rather than just thin air). I just wonder whether the --auto-repair I did the other day somehow changed something and so MySQL behaves just slightly differently. The auto-run batchfile with a wait solution had already occurred to me and it is interesting that you used it as a solution but as it is a work-around it isn't first choice, but if MySQL/MP 1.x has this glitch and it hasn't been fixed then it is probably the way to go. I'd probably compile the .bat file into an .exe and put it in the start up folder. I'm sticking with MP I.2 for now because (crazy I know) I've patched some of it and I like what I've got and the thought of redoing it all for another MP version gives me the heebie-jeebies.

    HTPCSourcer and mm1352000 - be sure that I really appreciate the help you provide on this forum and I am in no way trying to be obstructive, just a little more focused. I had already unzipped the WD file and seen that it has a lot of old files so what I have done is deleted all but the last weeks files. re-zipped, and now attach that file. If it contains my inside leg measurement, so be it...
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Thanks for trusting us with the log files. :)

    Just a quick question as I look through the tv.log...
    Last night (12 August) at ~22:41 it looks like the TV service and/or PC were forcibly stopped. I see an exception as the DB connection is dropped, then nothing.
    Same seems to have happened earlier at ~16:14, ~13:38... (haven't looked back further)

    That's the sort of pattern that can cause database corruption. When the database is not happy, it can cause TV Server to fail to start.

    Are you able to shed any light on what might have been happening at the above-mentioned times?
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    Oh, and here's something else I have seen...
    "12/08/2015 19:41:43";"Service Control Manager";"(0)";"Error";"The MySQL service hung on starting.";"3221232494"
    "12/08/2015 19:41:43";"Service Control Manager";"(0)";"Error";"The TVService service depends on the MySQL service which failed to start because of the following error: %After starting, the service hung in a start-pending state.";"3221232473"

    Edit:
    ...and again twice "this morning":
    "13/08/2015 09:35:42";"Service Control Manager";"(0)";"Error";"The MySQL service hung on starting.";"3221232494"
    "13/08/2015 09:35:42";"Service Control Manager";"(0)";"Error";"The TVService service depends on the MySQL service which failed to start because of the following error: %After starting, the service hung in a start-pending state.";"3221232473"

    "13/08/2015 10:14:42";"Service Control Manager";"(0)";"Error";"The MySQL service hung on starting.";"3221232494"
    "13/08/2015 10:14:42";"Service Control Manager";"(0)";"Error";"The TVService service depends on the MySQL service which failed to start because of the following error: %After starting, the service hung in a start-pending state.";"3221232473"

    This is coming from the system event log. The more I see, the more convinced I am that MySQL is not happy, and that is the underlying cause of your problem.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    L Service keeps crashing General 5
    X [solved] Display needs to be turned on for TV services to function General 1
    T [solved] failed to-startup tvservice Installation, configuration support 1
    F [solved] Could not find the MediaPortal.Common.Logging.ILogger service after upgrading from 2.2.2 to 2.2.3 General 2
    DHosein Mediaportal & Antimalware Service High CPU issue General Support 2
    Z TV-Service in falscher Version Installationsprobleme? 9
    T Missing sound in online streaming service (SVTPlay) General Support 3
    emphatic Pictures in the cloud - would a plugin be possible for services like Google Photos MediaPortal 1 Plugins 1
    K sudden complication watching recorded TV Newcomers Forum 6
    P [solved] MP2 fails to install: "Insufficient privileges to start services" General 11
    J TV service not available General 7
    M [solved] Setup Issue - Hanging on Starting Services General 3
    ajs Sync databases by Media Sync Service MediaPortal 1 Talk 26
    BlueMax1916 [Question] What does MP2 Server Service have to do with ...microsoft.com/filestreamingservice...? MediaPortal 2 3
    Holzi [solved] MediaPortal 2 will not install - Failed to start services MediaPortal 2 1
    Stéphane Lenclud [solved] TV Server Service preventing sleep General Support 18
    D Remove "Old" client names from Service Monitor? General 5
    B Server service on the service monitor keeps stopping randomly. Client can't see server status. 2.2 Archive 5
    D Upgrade to MP2.2 pre release fails with failure to start service 2.2 Archive 32
    T MP2.2 Pre Release fails installation with not starting the MP2-service 2.2 Archive 4
    F MP2 - V2.1 MP2 TV Service won't start Older releases 3
    da3dsoul MP2 Plugin - Getting Started (Directory Tree and Player) Plugin Development 27
    BrownGhost Mepo/MediaInfo takes 59 secunds to open library and start play :o( General Support 26
    D Getting Started General Support 30
    horned_reaper [Music] 5012: Start current music track from the beginning Improvement Suggestions 37
    Similar threads

























    Top Bottom