Communication Breakdown between Client and TV Server in Single-Seat Installation (1 Viewer)

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    TV Server is crashing!
    Mmmm, maybe... but what's going on here?
    [2017-08-26 08:37:18,788] [Log ] [RebootHandler] [INFO ] - RebootHandler: Reboot system

    If it's "crashing" because you're rebooting the system then it's possibly a "once off" and not particularly relevant.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    Mmmm, maybe... but what's going on here?
    [2017-08-26 08:37:18,788] [Log ] [RebootHandler] [INFO ] - RebootHandler: Reboot system

    If it's "crashing" because you're rebooting the system then it's possibly a "once off" and not particularly relevant.
    I ascertained that the TV Server was down by starting TV Server Configuration, which reported that the service was not running.
    I told it to start the service. I rebooted later, because that fixed the problem the last time it occurred. However, the stopped TV Service does indeed appear to be a "once off" as the communication problem cropped up again later, while the TV Server was still running. I have attached complete logs from that incident and would appreciate any tips you can give me on how to remedy or at least diagnose the situation.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I have attached complete logs...
    That's always helpful. (y)

    The log files show TV Server is stopping due to a database command timeout:
    [collapse]
    [2017-08-26 22:15:08,353] [Log ] [5 ] [INFO ] - Tvservice stopped due to an unhandled app domain exception System.NullReferenceException: Object reference not set to an instance of an object.
    at MySql.Data.MySqlClient.MySqlCommand.TimeoutExpired(Object commandObject)
    at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.TimerQueueTimer.CallCallback()
    at System.Threading.TimerQueueTimer.Fire()
    at System.Threading.TimerQueue.FireNextTimers()
    at System.Threading.TimerQueue.AppDomainTimerCallback()[/collapse]

    ...and again:
    [collapse]
    [2017-08-25 17:20:07,964] [Log ] [16 ] [INFO ] - Tvservice stopped due to an unhandled app domain exception System.NullReferenceException: Object reference not set to an instance of an object.
    at MySql.Data.MySqlClient.MySqlCommand.TimeoutExpired(Object commandObject)
    at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.TimerQueueTimer.CallCallback()
    at System.Threading.TimerQueueTimer.Fire()
    at System.Threading.TimerQueue.FireNextTimers()
    at System.Threading.TimerQueue.AppDomainTimerCallback()[/collapse]

    ...and again:
    [collapse]
    [2017-08-21 10:46:40,077] [Log ] [13 ] [INFO ] - Tvservice stopped due to an unhandled app domain exception System.NullReferenceException: Object reference not set to an instance of an object.
    at MySql.Data.MySqlClient.MySqlCommand.TimeoutExpired(Object commandObject)
    at System.Threading.TimerQueueTimer.CallCallbackInContext(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
    at System.Threading.TimerQueueTimer.CallCallback()
    at System.Threading.TimerQueueTimer.Fire()
    at System.Threading.TimerQueue.FireNextTimers()
    at System.Threading.TimerQueue.AppDomainTimerCallback()[/collapse]

    Evidence suggests all of these timeouts are happening because you're allowing your system to go to sleep (suspend/hibernate) while EPG grabbing:
    [2017-08-26 18:37:52,117] [EPG ] [EPG Update thread] [INFO ] - IdleEpgGrabber: Rai News lastUpdate:26.08.2017 14:03:45
    [2017-08-26 18:37:54,199] [Log ] [PowerEventThread] [INFO ] - TvController.OnSuspend()

    ...and again:
    [2017-08-25 12:35:11,575] [EPG ] [EPG Update thread] [INFO ] - IdleEpgGrabber: SWR BW HD lastUpdate:25.08.2017 08:42:16
    [2017-08-25 12:35:38,991] [Log ] [PowerEventThread] [INFO ] - TvController.OnSuspend()

    ...and again:
    [2017-08-21 09:45:05,695] [EPG ] [EPG Update thread] [INFO ] - IdleEpgGrabber: Tele 1 lastUpdate:21.08.2017 08:45:11
    [2017-08-21 09:45:30,884] [Log ] [PowerEventThread] [INFO ] - TvController.OnSuspend()


    Obviously the associated database commands (create/update EPG program details) will timeout (reach time limit) if you allow or force the system suspend/hibernate while they're running!

    Configure PowerScheduler properly (enable "do not put the computer to sleep while grabbing EPG") to prevent that from happening.
    Server Configuration - MediaPortal 1 - MediaPortal Wiki

    From experience, I suspect you may enable that option... then some days later you may notice your PC isn't going to sleep anymore. That will be because you haven't configured the DVB EPG grabber appropriately. So please check your EPG grabber configuration (ie. ensure only one channel per provider/transponder are ticked for both TV and radio etc.) as well.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    That's always helpful. (y)
    Thanks for your analysis!
    Configure PowerScheduler properly (enable "do not put the computer to sleep while grabbing EPG") to prevent that from happening.
    Server Configuration - MediaPortal 1 - MediaPortal Wiki
    Unfortunately, that setting is already active. I thought that perhaps the OS was overriding it, but I had also saved the power scheme from my previous installation and installed and activated it in this one, so I don't understand why this installation should behave differently.
    From experience, I suspect you may enable that option... then some days later you may notice your PC isn't going to sleep anymore. That will be because you haven't configured the DVB EPG grabber appropriately. So please check your EPG grabber configuration (ie. ensure only one channel per provider/transponder are ticked for both TV and radio etc.) as well.
    I don't recall seeing these symptoms in this or the previous installation, and I'm not sure I understand. I have only one cable provider, Quickline. Does that mean that I should only select one TV Channel and one Radio Channel? If I also check "Store data only for selected channels" as also recommended in the wiki, won't that limit my guide to one channel?

    P.S: The only difference which occurs to me between this and my previous installation is that I previously used SQL Server, instead of the default DB I have now. In one of the more recent incidents I had an error message saying that the client had connected to the TV server, but not to the DB. I also have the impression that it takes longer to start playback of a TV recording than it did in the previous installation. Could there be a connection?
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Unfortunately, that setting is already active.
    From the log files it really doesn't look like it. :confused:
    I don't know what more I can say...

    Does that mean that I should only select one TV Channel and one Radio Channel?
    One TV channel or one radio channel.

    If I also check "Store data only for selected channels" as also recommended in the wiki, won't that limit my guide to one channel?
    Yes it would. In my opinion the recommendation in the wiki is a bad recommendation. I would instead recommend to untick both "store data only for selected channels" and "grab EPG only for channels on same transponder".
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    From the log files it really doesn't look like it. :confused:
    I don't know what more I can say...
    I can only tell you what I see (screenshot attached). If you will give me the path name, I will happily provide the TV Server configuration settings file as well.
    One TV channel or one radio channel.


    Yes it would. In my opinion the recommendation in the wiki is a bad recommendation. I would instead recommend to untick both "store data only for selected channels" and "grab EPG only for channels on same transponder".
    Thanks for the explanation! I will give it a try. As a docs team member, I should be able to update the wiki, but I have been inactive for a long time and must evidently first get a new login.
     

    Attachments

    • PowerSchedulerConfig.jpg
      PowerSchedulerConfig.jpg
      124.1 KB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I can only tell you what I see (screenshot attached). If you will give me the path name, I will happily provide the TV Server configuration settings file as well.
    It's not that I doubt you. Rather, it's that I doubt the setting is applied properly.

    The TV Server settings are stored in TV Server's database (MySQL or SQL Server), not in a file. However, you can export them to file using the import/export section of TV Server Configuration.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    Thanks for the vote of confidence! Attached is the export file.
     

    Attachments

    • 2017-09-01-export.xml
      449.2 KB

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    :confused:
    <setting tag="PowerSchedulerEPGPreventStandby" value="True"/>

    I'm sorry, I don't know what's going on there.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,137
    117
    Home Country
    Switzerland Switzerland
    :confused:
    I'm sorry, I don't know what's going on there.
    Sorry to hear that! The failure to connect to the DB now seems to be a chronic condition (see attached screenshots) I'm not sure that my attempts to change from computer name to localhost or 127.0.0.1 from the MP client GUI are having an effect, because they don't seem to be remembered when I restart the PC. In the latest logs (also attached,) I don't see the correlation you mentioned earlier between OnSuspend and the EPG exceptions.
    SInce my previous setup was working with SQL Server and the error messages claim that the connection problem is to the DB, not the TV service, I am wondering if it would help to try using it again.
    OTOH, Since you suggested early on this thread that there might be ill effects from having both MP2 and MP1 installed (I installed in that order), perhaps I would be better off uninstalling both and reinstalling MP1 from scratch. What do you think?
     

    Attachments

    • DB unconnected.jpg
      DB unconnected.jpg
      69.4 KB
    • localhost ports blocked.jpg
      localhost ports blocked.jpg
      68.6 KB

    Users who are viewing this thread

    Top Bottom