Recent problem, Vault fails to connect to DB

This forum is now locked, since Gold Support is no longer offered.

Moderator: SourceGear

Locked
Peach
Posts: 4
Joined: Mon Feb 18, 2008 5:17 am
Location: Glasgow
Contact:

Recent problem, Vault fails to connect to DB

Post by Peach » Mon Feb 18, 2008 5:42 am

Hello,

We've recently started getting the following message when trying to connect to vault from client machines and from the vault server:
The Vault Server could not establish a connection to the database. Please check the server's log for detailed information. (FailDBConn)
The database server is a different box to the vault server.

I've checked the database server event logs and there isn't anything out of the ordinary in there.

On the Vault server there is one error in the event log:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 18/02/2008 09:30:29
Event time (UTC): 18/02/2008 09:30:29
Event ID: 1e9cc795581b45d395bf2764461da398
Event sequence: 12
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/Root/VaultService-1-128478005492721912
Trust level: Full
Application Virtual Path: /VaultService
Application Path: C:\Inetpub\wwwroot\VaultService\
Machine name: DOUGAL2

Process information:
Process ID: 1644
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.

Request information:
Request URL:
Request path:
User host address:
User:
Is authenticated: False
Authentication Type:
Thread account name: HQ\Administrator

Thread information:
Thread ID: 1
Thread account name: HQ\Administrator
Is impersonating: False
Stack trace: at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(HttpApplicationState has, VaultLoginInfo vli, VaultSqlConn& conn)
at VaultServiceAPILib.VaultServiceAPI.Logout(HttpApplicationState has, HttpSessionState hss)
at VaultService.Global.Session_End(Object sender, EventArgs e)


Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
We recently installed Server 2003 SP2 on the database server but not on the Vault server, but this hasn't caused us any problems anywhere else, we can connect to the Vault database through Enterprise Manager from any other machine on our network, we only have a problem when trying to connect through the Vault client or Admin.

I've followed the instructions here http://kb.sourcegear.com/VaultHelp/erro ... ?code=1101 to no avail :(

Here is an extract from the Vault server logs:
----18/02/2008 09:29:27 sgvaultsystem--()--
System Started
Version 3.5.1.4786
Cache Level = 1
DataBase Buffer Size (KB) = 256
LogFile Path = C:\WINDOWS\Temp\sgvault
Log Level = Quiet
Archive Log = Weekly
ReverseDNS Lookup = True
Maximum HTTP Request Length = 102400
Overwrite Log on Startup = False
Session Timeout = 4320
Active Directory Domain =
SGVault Working Directory = C:\WINDOWS\Temp
SGVault Server URL = http://dougal2.HQ.peachdigital.com/VaultService
Identity = HQ\Administrator
----18/02/2008 09:29:55 --()-- Vault Failed to establish a connection to the database.
----18/02/2008 09:29:55 --()-- System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at VaultServiceSQL.VaultSqlConn.OpenConn()
at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(HttpApplicationState has, VaultLoginInfo vli, VaultSqlConn& conn) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32 bytesExpected)
at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt, Boolean trustServerCert, Boolean& marsCapable)
at System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at VaultServiceSQL.VaultSqlConn.OpenConn()
at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(HttpApplicationState has, VaultLoginInfo vli, VaultSqlConn& conn)
----18/02/2008 09:29:55 --()-- Vault Failed to establish a connection to the database.
----18/02/2008 09:29:55 --()-- System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at VaultServiceSQL.VaultSqlConn.OpenConn()
at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(HttpApplicationState has, VaultLoginInfo vli, VaultSqlConn& conn) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at VaultServiceSQL.VaultSqlConn.OpenConn()
at VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(HttpApplicationState has, VaultLoginInfo vli, VaultSqlConn& conn)
----18/02/2008 09:29:55 --()-- The session information was not removed from the database. Please check sgvault.dbo.tblsessions within SQL Server. There may be orphaned sessions stored within the database. Error: FailDBConn
Any ideas?

Thanks,
Greg.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon Feb 18, 2008 9:00 am

When you installed, had you used SQL authentication during the install? Sometimes updates affect things one doesn't expect. The fastest solution is to perform an uninstall and reinstall of the Vault server. During that, you will be asked if you want to keep and reuse the same database, and you want to say 'yes.' It's recommended that you make a backup first or make sure you have a recent backup before making any changes. When the database is on another machine, it often works better for many users to use SQL authentication during the setup provided SQL is set up to allow that.

Peach
Posts: 4
Joined: Mon Feb 18, 2008 5:17 am
Location: Glasgow
Contact:

Post by Peach » Mon Feb 18, 2008 9:29 am

Thanks for the reply Beth, what I tried to do in the meantime was upgrade from 3.5 to 4, and it seems to be connecting to the database now, the only problem is my current 3.5 license code isn't allowing any users to connect, I have upgraded but the version 4 license isn't appearing in my CSP - does this normally take a little while to come through?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Mon Feb 18, 2008 11:14 am

You have to obtain a new license. It doesn't come automatically. You can receive assistance with that by contacting sales at sgstore at sourcegear.com.

Locked