TV server doesn't autostart after PC is started up (3 Viewers)

pnyberg

Portal Pro
August 21, 2006
405
36
Stockholm
Home Country
Sweden Sweden
Not relying on the logs (which aren't produced at all when the TVSERVICE fails at boot) but bringing the task manager into focus as soon as the affected PC's boot to desktop and the TVSERVICE is runnng (trying to start) but fails after thirty odd seconds (checked by bringing up the clock).

Keeping a note of the times and then checking against the service logs for MS-SQL and the TVSERVICE is starting well before the MS-SQL has finished starting.

So as mentioned above this looks more like a timing problem (dependencies ?) with certain setups(does this only affect slower machines with MS-SQL).

How can a longer delay in the start of the TVSERVICE be added to try to workaround this problem?

Is the dependency set for the TVSERVICE for the starting of MS-SQL (where a failure may happen) or for the MS-SQL to have completly finished its start up.?




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

The default timeout of any service to start I think is 2 minutes. I think that you can change this setting in the registry, just search kb at microsoft. Another way to try get around this is to have computer startup script that does a startup of the tv service after a certain amount of minutes. Here is a script that should work (save it as startup.cmd):

timeout /T 300
net start tvservice

This script will wait 300 seconds before starting TVService. Or you could replace timeout for "sleep 300". Remember you need to have timeout.exe or sleep.exe for this to work - they are free tools from MS.

You could elaborate this to that the SQL service is started before you start the service but then you need to use an utility or .vbs script... Perhaps out of the scope here..
 

rtv

Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    you could also fire up the registry and add e.g. "messenger" and "spooler" to the DependOnService entry of tvservice.
    Those two are usually the latest starting services and recommended by M$ for late starting. Make sure the messenger is active though since it is disabled as of SP2.
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    So as mentioned above this looks more like a timing problem (dependencies ?) with certain setups(does this only affect slower machines with MS-SQL).

    How can a longer delay in the start of the TVSERVICE be added to try to workaround this problem?

    Is the dependency set for the TVSERVICE for the starting of MS-SQL (where a failure may happen) or for the MS-SQL to have completly finished its start up.?

    When the service control manager of Windows successfully started the MSSQL service this does not necessarily mean that MSSQL is fully functional. So you have a race condition between the internal initialization routines of MSSQL and the TVServer which depends on MSSQL. I think it would be a good idea to add a start delay to the TVServer config similar to that one of MP.

    grubi.
     

    MPUserFromGER

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

    great that the discussion continues...
    However, I don't think it makes sense that we are discussing workarounds here, because the bug has to be fixed later or sooner (better sooner though). If TVE3 comes out of the beta state, this problem will be experienced by many people, I am sure.

    My PC is not that slow and I do not have too many other programs in the autostart folder.

    So what can we do to get really down to the root cause? I can reproduce the issue 100%, so would it not be possible to add some extra debug code to see where exactly it crashes at startup? In thread #39, I explained that at least one line in the log file of the TV Server is being created. Why is it not possible to add some more debug in this area?
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    If you can reproduce that 100% and want to help you could try MySQL and report if it doesn't start there either.
    Like ronilse I am starting my machines quite often but do not run into this...
     

    netgroover

    Portal Member
    December 8, 2006
    30
    0
    England
    Home Country
    United Kingdom United Kingdom
    Hi all,

    I'm still having the problem, but as of svn 15680 I now get the 7009 Timeout error in the Event Log as reported by others.

    I can see you've diagnosed why this is happening, i.e. the database not being fully open, but I think this is a clear bug, and as previously suggested the fix is to make the timeout parameter configurable, simple!

    Or am I missing something?

    Cheers,

    Netg
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    Home Country
    Germany Germany
    If you can reproduce that 100% and want to help you could try MySQL and report if it doesn't start there either.
    Like ronilse I am starting my machines quite often but do not run into this...

    You know that I want to help, otherwise I would not have started this thread...

    The last 1 1/2 hours I did the following:
    1. Installed todays SVN 15680 to check, if the problem still exists. It exists.
    2. Uninstalled TV Server, TV Client plugin and SQL server
    3. Rebooted
    4. Installed MySQL, then TV server and TV client plugin
    5. Configured TV server from scratch, incl. scanning and sorting of all channels (what a mess...)
    6. Selected "wait for TV server" in MP setup
    7. Rebooted
    8. At a first glance, it looked good because the MP startup screen showed "waiting for tv server" shortly and then disappeared that means the MP startup continued.
    9. However, after MP was started I tried to select TV and the screen prompted me to enter the IP address of the TV server (I am using single seat). This was unfortunately a very bad sign already.
    10. I exit MP to check the TV server
    11. After MP has been closed, I did get a popup "MediaPortal.exe has been ended unexpectedly"
    12. I opened TV server console and got a prompt that the TVservice is not started.
    13. After I confirm that it shall be started and start MP again, it works

    Summary: It does also not work with MySQL but it is more strange! :mad:
    Now, MP thinks that the TV server is up and running and starts up but then the TV server is not started! This is also reproducible here.

    Please find attached the logs.
     

    grubi

    Portal Pro
    June 16, 2007
    1,216
    80
    127.0.0.1
    Home Country
    Germany Germany
    Don't want to repeat myself, but can anybody having this issue check if a delaying of starting up TV-Server solves the problem. Simply set it to manually and start it from autostart folder with a net start ...
    This would give a good indication if a racecondition between different services on startup may be the cause.

    grubi.
     

    MPUserFromGER

    MP Donator
  • Premium Supporter
  • July 31, 2006
    403
    3
    Germany
    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
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    Okay this seems to indicate that not the database causes problems. I suspect that some DirectX Interface might not be ready or the drivers of your TV card(s).

    Does my suggestion from post 52 also help?
     

    Users who are viewing this thread

    Top Bottom