Connection to database failed. Reason=Login failed for user '(null

Discussion in 'Update Services' started by wadmhi, Jun 10, 2005.

  1. wadmhi

    wadmhi Guest

    I have installed a frontend/backend solution.
    I followed the guide for deploying WSUS with a SQL-server backend. Both
    servers running 2003 without sp1

    When i go to the administrationsite on the frontend i get this error on the
    webpage:

    Error connecting to the Windows Server Update Services database
    There was an error connecting to the Windows Server Update Services
    database. Either the database is not available or you do not have the correct
    privileges to access the database.

    If you believe you have received this message in error, please check with
    your system administrator.

    In the applicationlog on the frontendserver i get event 421:
    Connection to database failed. Reason=Login failed for user '(null)'.
    Reason: Not associated with a trusted SQL Server connection.. Connection
    string: Data Source=<serveranme>;Initial Catalog=SUSDB;Connection
    Timeout=60;Application Name=WSUS SQL
    Connection;Trusted_Connection=Yes;Pooling='true'; Max Pool Size = 100

    where <servername> = my databaseserver

    Does someone have the same problem or the solution ?

    Sondre.
     
    wadmhi, Jun 10, 2005
    #1
    1. Advertisements

  2. Can you verify that the Frontend machine account is added into the backend
    db? And of course, make sure that the SQL service is running?

    --
    Don Cottam
    Microsoft Corporation
    Windows Server Update Services

    donco AT microsoft DOT com
    (I prefer to communicate through the newsgroup, so please do not email me
    unless necessary...but if necessary, don't hesitate to email me. Thx!)

    =====================
    This posting is provided "AS IS" with no warranties, and confers no rights.
    =====================
     
    Don Cottam [MS], Jun 10, 2005
    #2
    1. Advertisements

  3. wadmhi

    Hanse Davion Guest

    Having a similar issue.

    Servers: both Windows 2003 SP1 - brand new builds
    SSQL01-DMZ (sql server)
    SAPP01-DMZ (wsus server)

    1. Network connectivity fine, dns resolution fine, no firewalls running on
    either server
    2. SQL services running on SQL server
    3. SQL server "WSUS Administrator" group has been delegated the
    Domain\SAPP01-DMZ server, and the everyone security context for testing.
    4. Have tried to use different registry keys to get access to SQL database.
    Example of what I have used below.
    --------------

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Update Services\Server\Setup]
    "SqlServerName"=hex(2):53,00,53,00,51,00,4c,00,30,00,31,00,2d,00,44,00,4d,00
    ,\
    5a,00,00,00
    "SqlAuthenticationMode"="WindowsAuthentication"
    "SqlDatabaseName"="SUSDB"
    "SqlUserName"="DOMAIN\\svc_sql"
    "SqlEncryptedPassword"="password******"

    --------------
    5. Still recieve the following in the application event view. Do not know
    why the user is always '(null)' event when hardcoded to another name
    Connection to database failed. Reason=Login failed for user '(null)'.
    Reason: Not associated with a trusted SQL Server connection.. Connection
    string: Data Source=SSQL01-DMZ;Initial Catalog=SUSDB;Connection
    Timeout=60;Application Name=WSUS SQL
    Connection;Trusted_Connection=Yes;Pooling='true'; Max Pool Size = 100
     
    Hanse Davion, Jun 10, 2005
    #3
  4. wadmhi

    wadmhi Guest

    If you mean that the computeraccount of the frontend is added in to the
    backends group of wsusadmins, the answer is yes. If you mean in the database
    you have to tell in what table to look in.
    Yes the sql service is running.

    I there any recomandations in what account the services should run in?

    Sondre
     
    wadmhi, Jun 10, 2005
    #4
  5. I'm having the same problem, and have run an additional test. I went to the
    command prompt on the front end server logged in as a user with admin rights
    to both servers. I ran the command "osql -S backendservername -E" just to
    test the connection. I connected to the server with no problems. I then
    went to the command prompt on the front end server running from the system
    context and ran the same command. I got the following:

    C:\Program Files\Update Services\Tools\osql>osql -S fmscdbwsus -E
    Login failed for user '(null)'. Reason: Not associated with a trusted SQL
    Server connection.

    This appears to me to be a SQL permissions issue more than a WSUS issue.
    Unfortunately a web search on this error finds a lot of reccomendations to
    go to mixed mode authentication, which I understand is not supported by
    WSUS.

    The front end Server is a member of WSUS Administrators on the back end
    server.

    Anybody have any further suggestions? We don't have a real SQL Server guru
    or I'd be talking to him right now.
     
    Dan Richardson, Jun 14, 2005
    #5
  6. What is the account under which the SQL service is running on the backend?
    If this is not Local System, can you check if changing the account to Local
    System solves the problem?

    Front-end authentication using machine credentials don't work sometime when
    the SQL service account is not Local System. If this is indeed the case, I
    can provide you some additional configuration steps to resolve this issue.

    --
    Rajiv Poonamalli [MSFT]
    Windows Server Update Services

    This posting is provided "AS IS" with no warranties, and confers no rights

     
    Rajiv Poonamalli [MSFT], Jun 14, 2005
    #6
  7. [Pasting from a reply to a previous thread on this topic]

    What is the account under which the SQL service is running on the backend?
    If this is not Local System, can you check if changing the account to Local
    System solves the problem?

    Front-end authentication using machine credentials don't work sometime when
    the SQL service account is not Local System. If this is indeed the case, I
    can provide you some additional configuration steps to resolve this issue.


    --
    Rajiv Poonamalli [MSFT]
    Windows Server Update Services

    This posting is provided "AS IS" with no warranties, and confers no rights
     
    Rajiv Poonamalli [MSFT], Jun 14, 2005
    #7
  8. wadmhi

    wadmhi Guest

    The SQL service is running under Local System Account.

    I ran this command on the frontend :"osql -S backendservername -E", and I
    connected to the databaseserver fine. But in a previous post I saw that 'Dan
    Richardson' had been running this in the systemcontext. I don't know how to
    do that.

    I am running the MSSQL-server in mixed mode authentication(SQL Server and
    Windows).


     
    wadmhi, Jun 15, 2005
    #8
  9. wadmhi

    wadmhi Guest

    JIPPI,

    I installed a new MSSQL-instanse with Windowsauthentication only, and
    removed and reinstalled wsus on both servers. run the little script, made the
    changes in registry, and now it is working.


     
    wadmhi, Jun 15, 2005
    #9
  10. The SQL service account was indeed not Local System. I changed it to Local
    System and restarted the SQL service with no change in indications.

    Thanks

    Dan

     
    Dan Richardson, Jun 15, 2005
    #10
  11. I now know why I was getting this error. Since appendix C says that the
    WSUS Front end server must be running Windows 2003, I did an in place
    upgrade from Windows 2000 to Windows 2003 on my front end server.
    Unfortunately, this leaves the web site running in IIS 5 Isolation mode. On
    the front end server I opened the IIS plug in and went to Web Site
    properties. On the Services tab, I found a check box for IIS 5 Isolation
    mode and cleared it. Then, after restarting IIS and my browser, I was able
    to get into the WSUS admin page.

    Dan Richardson
     
    Dan Richardson, Jun 17, 2005
    #11
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.