TV-Service starts before SQL-Server (1 Viewer)

Patric

Portal Pro
August 27, 2004
84
2
Home Country
Germany Germany
MediaPortal Version: 0.2 SVN11439
Windows Version: Windows XP SP2
CPU Type:
HDD:
Memory:
Motherboard:
Motherboard Chipset:
Motherboard Bios:
Video Card:
Video Card Driver:
Sound Card:
Sound Card AC3:
Sound Card Driver:
1. TV Card: Hauppauge PVR250
1. TV Card Type: HW
1. TV Card Driver: 1.18.21.22301
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: NVIDIA PureVideo
MPEG2 Audio Codec: NVIDIA PureVideo
Satelite/CableTV Provider:
HTPC Case:
Cooling:
Power Supply:
Remote:
TV:
TV - HTPC Connection:

Installation Type: single seat

TV-Server tv.log: http://pastebin.team-mediaportal.com/11163
TV-Server error.log: http://pastebin.team-mediaportal.com/11165

I have the problem that the TV-Service starts before the SQL-Server has finished loading so that the TV-Service can't connect to the database.
I have to manually shutdown MP and restart the TV-Service via the services control panel.

Wouldn't it be possible to add the SQL-Server-Service to the dependencies of the TV-Service when installed on the same machine?

Just wondering that I'm the only one facing this problem.

Nevertheless great work Frodo!

Patric
 

Smirnuff

Portal Pro
December 7, 2004
630
3
United Kingdom
Wouldn't it be possible to add the SQL-Server-Service to the dependencies of the TV-Service when installed on the same machine?

Indeed this is the correct way to get around this problem. You'd have to do it manually at present through the Services management console.
 

Patric

Portal Pro
August 27, 2004
84
2
Home Country
Germany Germany
Well, after fiddling around now and inserting a dependancy for the SQL-Server into the TV-Service my problem still remains.

But I found that it seems to be a timing problem. When the two services start directly after each other (because of the dependancy) the login from TV-Service to SQL-Server fails. When I start the database and wait a few seconds before firing up the TV-Service everthing works fine.

I just grabbed the SQL-Server logs for a working and a non-working startup:

Successfull startup: http://pastebin.team-mediaportal.com/11166
Failed startup: http://pastebin.team-mediaportal.com/11167

Does anyone have an idea how to get around this or should this be addressed by Frodo in the service itself? Perhaps the service could try to connect three times. Or something thelike.

Patric
 

moullas

Portal Pro
January 15, 2005
103
0
Home Country
Cyprus Cyprus
open services
Go to the service you want (TV Server or whatever it's called, i don't have a TV card so i can't test)

Go on the recovery tab
and on the First Failure option tell it to restart the service.
Below that, there will be an option activated for how many minutes to wait till restarting, tell it to wait 1 minute.

Try this and tell us if it fixed it, along with the dependency added.
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Wouldn't it be possible to add the SQL-Server-Service to the dependencies of the TV-Service when installed on the same machine?

    Indeed this is the correct way to get around this problem. You'd have to do it manually at present through the Services management console.


    But the SQL server might be running also on a different PC :)
     

    Patric

    Portal Pro
    August 27, 2004
    84
    2
    Home Country
    Germany Germany
    moullas
    The problem is not that the TV-Service doesn't start. It does but cannot connect to SQL-Server so stays in an unusable state.

    tourettes
    That's why I thought to ask if the SQL-Server runs on the same machine while installing the TV-Service.
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    To work around the error so you can check further.

    Set the TV service to manual.

    Ensure all SQL services are on automatic .

    Disable MP from autostart .

    Reboot .

    You should now have SQL running and no errors.

    Now check the dependencies for the TV service,( it shouldn't start until its dependencies are running when set to automatic.) what does it state?

    You are still in manual mode so now when you start the TVservice control panel it should ask if you want to start the TV service, let it start and check that no errors have occured.

    If you are happy with the runnig Tv service now set it back to automatic and reboot .

    Are you still seeing problems ?
     

    Patric

    Portal Pro
    August 27, 2004
    84
    2
    Home Country
    Germany Germany
    To work around the error so you can check further.

    Set the TV service to manual.

    Ensure all SQL services are on automatic .

    Disable MP from autostart .

    Reboot .

    You should now have SQL running and no errors.

    Exactly as supposed to.

    Now check the dependencies for the TV service,( it shouldn't start until its dependencies are running when set to automatic.) what does it state?

    It's stopped because it's set to manual.

    You are still in manual mode so now when you start the TVservice control panel it should ask if you want to start the TV service, let it start and check that no errors have occured.

    Smooth starting of service.

    If you are happy with the runnig Tv service now set it back to automatic and reboot .

    Are you still seeing problems ?

    Yep. TV-Server error.log states again:
    Code:
    01.11.2006 21:25:37 !!!Controller:Unable to connect to database!!!
    01.11.2006 21:25:37 Controller: database connection string:Password=mediaportal;Persist Security Info=True;User ID=sa;Initial Catalog=TvLibrary;Data Source=dign\SQLEXPRESS;
    01.11.2006 21:25:37 Sql error:The database backend (provider SQLServer) could not be reached.
    Check the connection string: Password=mediaportal;Persist Security Info=True;User ID=sa;Initial Catalog=TvLibrary;Data Source=dign\SQLEXPRESS;

    It would be nice if the TV-Service refuses to start if it's unable to connect to the DB.

    I'm a bit clueless right now...

    Patric
     

    SciDoctor

    Retired Team Member
  • Premium Supporter
  • February 2, 2005
    1,465
    139
    England
    When you initialy set up SQL did you allow for client access and set a password?

    Is the MP client set to the correct SQL login ?

    Is your firewall allowing access?
     

    Patric

    Portal Pro
    August 27, 2004
    84
    2
    Home Country
    Germany Germany
    When you initialy set up SQL did you allow for client access and set a password?

    Yip. SQL-Server is set to SQL-Server- and Windows-authentication and allows remote connections.

    Is the MP client set to the correct SQL login ?

    Yes sir. As stated in the posted logs the useraccount is sa the pass is mediaportal (see last line with connection string).

    Is your firewall allowing access?

    No firewall (Windows firewall is disabled) or virus scanner at all on the machine.

    The problem is that it works when waiting a few seconds before starting the TV-Service... *sigh*

    Patric
     

    Users who are viewing this thread

    Top Bottom