tv service not beeing loaded automatically on startup (1 Viewer)

RicoHTPC

MP Donator
  • Premium Supporter
  • February 4, 2011
    1,441
    172
    Cuxhaven
    Home Country
    Germany Germany
    After a (actually two) clean installation of mp 1.8 final on my tv server I encouter the problem that the tv service is not beeing loaded.
    I realized this because of a sql window after entering the server config where I was asked to test my connection. Which failed.
    The reason for this was the missing tv service. After starting this manually I then could enter the tv server config.
    The service is set to automatic but won't get loaded after reboot.
    Machine is running on Win7 HP 64bit.
    I guess I wont be displayed in the logs but will post them if needed.
     

    RicoHTPC

    MP Donator
  • Premium Supporter
  • February 4, 2011
    1,441
    172
    Cuxhaven
    Home Country
    Germany Germany
    Sure...
    What I've done there was:
    -starting the system
    -checking tv service with the taskmanager (was not running)
    -tried to open tv server config - mp database connection failure window opened
    -started tv service manually within the taskmanager
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I can confirm this. I think it's due to the time MySQL needs to be up and running. No matter if you set up the TVService to start delayed or not, TVService gives up before MySQL is ready. This happens on every reboot on my new machine...
    I will try to workaroud this with a batch script in Autostart, something like:

    net start MySQL
    wait 10
    net start TVService

    But didn't find the time up to now...
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    I am running MSSQL Express and have the same problem, so it's not specific to MySQL. However, a dependency on SQL Browser exists in TV Server, which makes the behavior pretty weird. Lehmden's suggestion is what I already told RicoHTPC in his German thread ;) (via Task Planner)

    @mm1352000 : The MediaPortal logs don't show anything. I browsed through the Windows event log and could not see much either. No errors logged after non-successful starts of TV Server. And to make things even more funny, I had run into the situation where the TV service was showing to be running, however, clients could not connect. A manual restart of the service corrected this situation.

    Something appears to have changed since 1.7.1 as this behavior is absolutely new.

    HTPC_Sourcer
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Something appears to have changed since 1.7.1 as this behavior is absolutely new.
    Maybe, I've switched from 1.6 to 1.8 and I'm not sure if this was a wise decision as this is not the only issue I have with MP 1.8...
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    I am rebooting my Fresh install of 1.8.0 now.
    I am running MySQL 5.6.11

    I stopped the TVService and went to clear the logs.
    Interesting note: There is a folder for MediaPortal Setup TV yet the SetupTV logs are writing to the folder MediaPortal TV Server

    Reboot completed and I have no issues with MySQL or the TVService having startup issues.

    Those having TVSerice startup issues, Do you know the location of your mptvdb file?
    Get properties on it (Size), and reboot. When the TVSerice does not start, is the mptvdb file and same size?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    -starting the system
    Please be more specific - what date/time?
    I can see that the system resumes from standby/hibernate - not "cold start" (different!) - at ~10:44AM 11 July. It looks like the TV service is running okay.

    -checking tv service with the taskmanager (was not running)
    Again, what date/time?
    So far from the log files I can't confirm. I see that the service was stopped and restarted:
    [2014-07-11 10:45:23,572] [Log ] [1 ] [DEBUG] - TV Service got PRESHUTDOWN event
    [2014-07-11 10:45:23,572] [Log ] [TVService] [INFO ] - TV Service is being stopped
    ...
    [2014-07-11 10:48:56,224] [Log ] [TVService] [INFO ] - TVService v1.8.0.0 is starting up on Windows 7 ( Service Pack 1 ) [6.1.7601.65536]

    ...so don't know how it can be not running

    -tried to open tv server config - mp database connection failure window opened
    I can also see that you attempt to start TV Server configuration at ~10:48 and get asked for DB connection details:
    [2014-07-11 10:48:25,510] [Log ] [SetupTv ] [INFO ] - ---- SetupTv v1.8.0.0 is starting up on Windows 7 ( Service Pack 1 ) [6.1.7601.65536]
    [2014-07-11 10:48:25,560] [Log ] [SetupTv ] [INFO ] - ---- check connection with database ----
    [2014-07-11 10:48:28,465] [Log ] [SetupTv ] [INFO ] - ---- ask user for connection details ----

    This does not mean the TV service is not running. It means that SetupTv can't connect to the MySQL database.


    I can confirm this. I think it's due to the time MySQL needs to be up and running. No matter if you set up the TVService to start delayed or not, TVService gives up before MySQL is ready. This happens on every reboot on my new machine...
    Sorry, that's not what I'm seeing in @RicoHTPC's log files. Please post your log files so they can be checked. :)


    I am running MSSQL Express and have the same problem, so it's not specific to MySQL.
    I think that assumption ("same problem") cannot be proven without log files.

    The MediaPortal logs don't show anything.
    RicoHTPC's logs show things, so either you have a different problem or you're not looking in the right place. :)

    And to make things even more funny, I had run into the situation where the TV service was showing to be running, however, clients could not connect. A manual restart of the service corrected this situation.
    Almost certainly TV service bound to 127.0.0.1 instead of a proper IP address due to network adaptor not having been assigned its IP address before the TV service starts. Delayed start of the TV service can help with this... and use of IP address instead of hostname.

    Something appears to have changed since 1.7.1 as this behavior is absolutely new.
    You can see the code that has changed:
    https://github.com/MediaPortal/MediaPortal-1/commits/master/TvEngine3/TVLibrary

    I don't see anything obvious there that could cause this, but I did not test any of these patches. I now work only on TVE 3.5 so the people that introduced the patches while TVE should be under code freeze are responsible for testing and support. (@Sebastiii ;))


    There is a folder for MediaPortal Setup TV...
    From TVE 3.5 (MP2 native TV).
     

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    From TVE 3.5 (MP2 native TV).
    Thanks mm!! That explains a lot... :LOL:

    Almost certainly TV service bound to 127.0.0.1 instead of a proper IP address due to network adaptor not having been assigned its IP address before the TV service starts. Delayed start of the TV service can help with this... and use of IP address instead of hostname.
    Could this also be that the users machine is running DHCP? Would explain the time delays needed to get an IP vers TV Server startup. ;)
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Could this also be that the users machine is running DHCP? Would explain the time delays needed to get an IP vers TV Server startup. ;)
    Possibly. I always advocate use a of a static IP address for the PC running TV Server, and that should be configured on the NIC not in a router or some other place.
     

    Users who are viewing this thread

    Top Bottom