TV Server crashes on resume from hibernation (1 Viewer)

jmarc

MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    Hello team,

    Setup: MP 1.28 single seat on Win 10 pro x64, using MySQL database, wired NIC to router.
    The setup works fine until I put the computer on hibernate, then on resume TV server does not find MySQL and crashes. MySQL service is fine though.

    I can't just restart TV service as it's hung and need to restart the whole computer.

    It looks like TV service can't find my local IP address 192.168.1.70 (fixed DHCP lease) on resume. I tried to fix this by adding the DisableDHCPMediaSense=1 option in registry, to no avail.

    I finally fixed it by changing 192.168.1.70 to 127.0.0.1 in DefaultProvider name="MySQL" connectionString="Server=127.0.0.1 in gentle.config

    Not a big deal now that it's working as expected but it's more a workaround than a fix. Anyone has experienced the same issue?

    Log with comments is attached.

    Thanks!
     

    Attachments

    • TVService.log
      11.4 KB

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,938
    Nuenen
    Home Country
    Netherlands Netherlands
    Well I don't really agree that putting 127.0.0.1 is a "workaround", I think its a correct fix (for probably not all needed networking stuff fully operational after a resume).
    That being said, I don't really have a different solution, sleep/resume is quite nasty to do correctly
     

    azzuro

    Test Group
  • Team MediaPortal
  • May 10, 2007
    9,948
    5,617
    France - IDF
    Home Country
    France France
    hello, you can use also localhost as IP adress, or the Computer Name.
    define your IP is not good, your problem is maybe related than your server can't reach the IP before starting MySQL DB and TVservice.
     

    jmarc

    MP Donator
  • Premium Supporter
  • August 21, 2008
    65
    9
    Home Country
    Australia Australia
    Thanks both. I'll look into it. Maybe using a static IP address instead of a fixed DHCP assignment would also work. I just don't like using static IP addresses on my network.

    There is something odd though: the TV service crashes straight away on computer resume because it can't find the MySQL server although there should be a 30 seconds timeout. Any idea?

    [2021-10-30 17:26:44,758] [Log ] [PowerEventThread] [INFO ] - Tvservice stopped due to an unhandled app domain exception Error: DatabaseUnavailableUnclassified Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached.
    Check the connection string: Server=192.168.1.70;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30; ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown. at MySql.Data.MySqlClient.NativeDriver.Open()

    Cheers,

    JM
     

    Users who are viewing this thread

    Top Bottom