TV server doesn't autostart after PC is started up (1 Viewer)

MPUserFromGER

MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    Hi,

    where do I ave to add the dependonservice services in the registry?
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    1. start -> cmd -> regedit
    2. open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TVService
    3. edit "DependOnService"
    4. add a new line "Messenger"
    5. start -> services.msc
    6. Make sure the Messenger is set to start automatically
    7. Check TVService to see your changes have taken effect


    Restart, enjoy and tell us :)
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Hi grubi,

    if I add a batch file to autostart with a single line
    net start tvservice
    then the TV server is started ok, even if it failed to start before automatically.

    However, this is a dirty workaround and I really would like to have the root cause fixed... Not everybody that uses MP is able to do several batch file workarounds before the system works...

    I am waiting for rtv's response to my post 57. Hopefully he is able to see something in the logs. At least I saw several different issues:
    1. "Wait for TV server" option in MP seems not to work with MySQL
    2. PowerScheduler plugin seems to throw exceptions if TV server is not started in single seat

    Regards,

    Andreas

    This was not ment as a workaround but as a step to dignose the problem. AS this fixes the problem it seems we have a racecondition problem.

    @rtv

    Why do you think this indicates it is not a database problem? Looking at the source you can see that connecting to the database is one of the first things happening when the service is started. The service gets it's priority setting out of it. This would also explain why you don't see much in the tvserver log. Maybe adding some further log messages to TVServer for bugtracking would give a hint where the problem is.

    grubi.
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    rtv:

    First of all, thanks a lot for the detailed info how to add more dependencies to the TVService.
    I did it and to get it out of the way: It did not help. :mad:
    The only difference is that with the added dependency, the "wait fo TV server" now works in MP but it will wait forever...

    After looking once more in the Windows event logs, I think I know what the problem is.
    The Windows event logs says (see file "System_eventlog.csv"):
    Zeitüberschreitung (30000 ms) beim Verbindungsversuch mit Dienst TVService.

    The point of interest is "30000ms". That is just 30 seconds. I think the problem is that the TV Server is waiting for the services it depends on and does not respond to some Windows commands within this time frame. That means the other services do need slightly more than 30 seconds, the TV server is waiting for them but does not respond to the Windows internal commands, which in turn propably results in Windows killing the tv service...

    My theory is even more plausible, when looking at a good case (I just had one case where it worked after I deleted the added dependencies!). The TV log in a good case is as follows (please see attached log):
    01.09.2007 12:10:11 1 Controller: using MySQL database connection: Server=htpc;Database=TvLibrary;User ID=root;Password
    01.09.2007 12:10:27 5 TV service starting
    01.09.2007 12:10:27 6 TV service PowerEventThread message loop is running
    01.09.2007 12:10:28 6 TV service PowerEventThread 537
    01.09.2007 12:10:28 6 TV service PowerEventThread 537
    01.09.2007 12:10:28 5 C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\MediaPortal TV Server\gentle.config
    01.09.2007 12:10:28 5 Controller: using MySQL database connection: Server=htpc;Database=TvLibrary;User ID=root;Password
    01.09.2007 12:10:28 5 ----------------------------
    01.09.2007 12:10:33 6 TV service PowerEventThread 537
    01.09.2007 12:10:34 6 TV service PowerEventThread 537
    01.09.2007 12:10:34 5 Detected DVB-S card:technotrend bda/dvb-s tuner

    That means after 27 seconds! the message "TV service starting" appears. For me it really looks like that the TV server does not tell Windows that is it starting until the depended services have been started. Windows then ends TV service and it is never restarted. However, I am not a Windows services expert and do not know when and how a service must respond to Windows internal commands...

    What do you think?
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    Can someon test this observation on their setups.

    It seems the size of the EPG database may be causing this problem (indirectly).

    If you use the TVSETUP to refresh the EPG database which clears all data and before the EPG grab has refilled the data restart the PC then the TVSERVICE starts cleanly.


    TV-Server Version: Latest SVN
    MediaPortal Version: Latest SVN
    MediaPortal Skin: Blue 2 WIDE
    Windows Version: W2Ksp4
    CPU Type: Dual P3 1GHZ
    HDD: 80GB and 2TB
    Memory: 1GB ddr
    Motherboard: Gigabyte 6BXD
    Motherboard Chipset: 440BX intel
    Motherboard Bios:
    Video Card: ATI 9500pro AGP2x
    Video Card Driver: Cat 7.4
    Sound Card: Xitel USB
    Sound Card AC3: USB to Meridian DSP
    Sound Card Driver:
    1. TV Card: Nebula DVB-T pci
    1. TV Card Type:
    1. TV Card Driver:
    2. TV Card: Nebula DVB-t USB
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card: Nebula DVB-t USB
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card: Nebula DVB-t USB
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: Cyberlink ATI
    MPEG2 Audio Codec: Cyberlink ATI
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply: Tagan 530 EC
    Remote: ATI RW 1
    TV: Dell 2707wfp
    TV - HTPC Connection: dvi-d
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Can someon test this observation on their setups.

    It seems the size of the EPG database may be causing this problem (indirectly).

    If you use the TVSETUP to refresh the EPG database which clears all data and before the EPG grab has refilled the data restart the PC then the TVSERVICE starts cleanly.

    You can also try to defragment the harddisk which will also speedup the start of the database engine.
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    Can someon test this observation on their setups.

    It seems the size of the EPG database may be causing this problem (indirectly).

    If you use the TVSETUP to refresh the EPG database which clears all data and before the EPG grab has refilled the data restart the PC then the TVSERVICE starts cleanly.

    You can also try to defragment the harddisk which will also speedup the start of the database engine.


    Thanks for the reply, the HD are defragged regularly so this shouldn't be a problem.

    TV-Server Version: Latest SVN
    MediaPortal Version: Latest SVN
    MediaPortal Skin: Blue 2 WIDE
    Windows Version: W2Ksp4
    CPU Type: Dual P3 1GHZ
    HDD: 80GB and 2TB
    Memory: 1GB ddr
    Motherboard: Gigabyte 6BXD
    Motherboard Chipset: 440BX intel
    Motherboard Bios:
    Video Card: ATI 9500pro AGP2x
    Video Card Driver: Cat 7.4
    Sound Card: Xitel USB
    Sound Card AC3: USB to Meridian DSP
    Sound Card Driver:
    1. TV Card: Nebula DVB-T pci
    1. TV Card Type:
    1. TV Card Driver:
    2. TV Card: Nebula DVB-t USB
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card: Nebula DVB-t USB
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card: Nebula DVB-t USB
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: Cyberlink ATI
    MPEG2 Audio Codec: Cyberlink ATI
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply: Tagan 530 EC
    Remote: ATI RW 1
    TV: Dell 2707wfp
    TV - HTPC Connection: dvi-d
     

    JargenJ

    Portal Member
    August 4, 2007
    12
    0
    Is it so that running MS-SQL is fine, but using MySQL creates problems?

    I am using MySQL and same problems affect me aswell.
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Nope it tends to affect even more MSSQL installations. If DB size would be the issue then giving more time to startup (e.g. via autostart or registry workaround) would clearly help.

    Btw: I am importing from > 120 MB of EPG data and still do not see the issue neither with MSSQL nor with MySQL :(
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    OK lets try something different.

    Attached is a new build of the TVService (based on SVN 15760).
    Maybe you can check it, see if it solves the problem, and report back.
    This is not a bugfix but a release to track down the problem.


    Regards,
    grubi
     

    Users who are viewing this thread

    Top Bottom