TV-Service starts before SQL-Server

Discussion in 'fixed TV-Server / Client Bugs' started by Patric, November 1, 2006.

  1. Patric

    Patric Portal Pro

    Joined:
    August 27, 2004
    Messages:
    84
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Show System Specs
    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
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Smirnuff

    Smirnuff Portal Pro

    Joined:
    December 7, 2004
    Messages:
    630
    Likes Received:
    3
    Occupation:
    Software Developer
    Location:
    United Kingdom
    Ratings:
    +3 / 0
    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.
     
  4. Patric

    Patric Portal Pro

    Joined:
    August 27, 2004
    Messages:
    84
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Show System Specs
    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
     
  5. moullas

    moullas Portal Pro

    Joined:
    January 15, 2005
    Messages:
    103
    Likes Received:
    0
    Ratings:
    +0 / 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.
     
  6. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3

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

    Patric Portal Pro

    Joined:
    August 27, 2004
    Messages:
    84
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Show System Specs
    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.
     
  8. SciDoctor
    • Team MediaPortal

    SciDoctor Retired Team Member

    Joined:
    February 2, 2005
    Messages:
    1,465
    Likes Received:
    128
    Location:
    England
    Ratings:
    +138 / 0
    Show System Specs
    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 ?
     
  9. Patric

    Patric Portal Pro

    Joined:
    August 27, 2004
    Messages:
    84
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Exactly as supposed to.

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

    Smooth starting of service.

    Yep. TV-Server error.log states again:
    Code (Text):
    1. 01.11.2006 21:25:37 !!!Controller:Unable to connect to database!!!
    2. 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;
    3. 01.11.2006 21:25:37 Sql error:The database backend (provider SQLServer) could not be reached.
    4. 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
     
  10. SciDoctor
    • Team MediaPortal

    SciDoctor Retired Team Member

    Joined:
    February 2, 2005
    Messages:
    1,465
    Likes Received:
    128
    Location:
    England
    Ratings:
    +138 / 0
    Show System Specs
    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?
     
  11. Patric

    Patric Portal Pro

    Joined:
    August 27, 2004
    Messages:
    84
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Yip. SQL-Server is set to SQL-Server- and Windows-authentication and allows remote connections.

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

    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
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!