Vault Server: Problem logging in after installation

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Goalie35
Posts: 3
Joined: Tue Feb 02, 2010 9:08 pm

Vault Server: Problem logging in after installation

Post by Goalie35 » Tue Feb 02, 2010 9:22 pm

Hello.
I installed VaultServer_5_0_2_18753 to my windows 2003 server (standard edition). After installation, a browsers pops up & prompts me to log into the vault admin section. After clicking login however, I get the following error:
Login Failed: The Vault Server could not establish a connection to the database. Please check the server's log for detailed information. (FailDBConn)
I've tried uninstalling & reinstalling vault server a dozen times but no luck.

After checking the log, I see the following error lines (I switched server's name & IP address to "myComputerName" & "myIPAddress" in this code):
2/2/2010 9:17:38 PM admin--MyComputerName(myIPAddress)--SSL Disabled Vault Failed to establish a connection to the database.
2/2/2010 9:17:38 PM admin--MyComputerName(myIPAddress)--SSL Disabled System.Data.SqlClient.SqlException: Logon failed for login 'NT AUTHORITY\NETWORK SERVICE' due to trigger execution.
Changed database context to 'sgvault'.
Changed language setting to us_english.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
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(VaultSqlConn& conn) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
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(VaultSqlConn& conn)
Any idea where my problem is?

Thanks.

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

Re: Vault Server: Problem logging in after installation

Post by Beth » Wed Feb 03, 2010 8:52 am

Is your SQL server on the same machine or a different machine than where you are installing Vault?

Are you using Windows authentication or SQL authentication to connect during the install?
Beth Kieler
SourceGear Technical Support

Goalie35
Posts: 3
Joined: Tue Feb 02, 2010 9:08 pm

Re: Vault Server: Problem logging in after installation

Post by Goalie35 » Wed Feb 03, 2010 1:24 pm

Hi Beth. Thanks for the reply.

Yes, Sql Server 2005 is on the same machine as where I'm trying to install. I'm using "(local)" to specify my sql server database. Also, I'm logging in via Windows Authentication.

I'm not sure if this would be an issue but in my "Vault Server" web.config file, my "sessionState" line contains a sql login using the "sa" user id. I understand this is supposed to represent the admin, but should this perhaps be switched to something else?
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=" cookieless="false" timeout="10080"/>
Thanks again.

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

Re: Vault Server: Problem logging in after installation

Post by Beth » Wed Feb 03, 2010 1:55 pm

That line matches exactly what my servers have and I don't think that's related to the issue. Don't change that line.

Was this a brand new install or an upgrade?

Can you go to your SQL Server Management Studio, expand Databases - sgvault - Security - Users and see if there is a Network Service user there. Check for the same thing under sgmaster. After that expand Security for your entire SQL instance, then Logins and see if Network Service is listed there as well. Is that account in all 3 locations?
Beth Kieler
SourceGear Technical Support

Goalie35
Posts: 3
Joined: Tue Feb 02, 2010 9:08 pm

Re: Vault Server: Problem logging in after installation

Post by Goalie35 » Wed Feb 03, 2010 2:19 pm

Beth, that led me to my problem. Thanks a million!

I did have Network Service in all 3 locations HOWEVER it appears my Network Service account for my entire sql instance didn't have the propper permissions in place.

The Network Service account for the sgvault & sgmaster db's were both set as dbowner, so that appeared fine, however when I checked the server roles of the Network Service account for my entire sql instance, it only had the "public" permission checked. I went & checked the "sysadmin" permission, and it seems to have done the trick.

Thanks for your help!

Regards,
-Ryan

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

Re: Vault Server: Problem logging in after installation

Post by Beth » Wed Feb 03, 2010 3:29 pm

Thanks for the update. I'm happy to hear you got it working.
Beth Kieler
SourceGear Technical Support

kadorken
Posts: 77
Joined: Mon Feb 16, 2004 8:38 am
Contact:

Re: Vault Server: Problem logging in after installation

Post by kadorken » Mon Apr 05, 2010 3:16 am

I ran into the same problem installing a vault server for a customer on a windows 7 ultimate desktop. Even after setting the sysadmin property for Network Service, I had to uninstall and reinstall the vault server before it would connect as the Admin user.

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

Re: Vault Server: Problem logging in after installation

Post by Beth » Mon Apr 05, 2010 7:42 am

Was this a brand new install or an upgrade?

F: 15400
Beth Kieler
SourceGear Technical Support

kadorken
Posts: 77
Joined: Mon Feb 16, 2004 8:38 am
Contact:

Re: Vault Server: Problem logging in after installation

Post by kadorken » Wed Apr 07, 2010 10:08 am

Sorry for the tardy reply.

It was a new install.

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

Re: Vault Server: Problem logging in after installation

Post by Beth » Tue May 04, 2010 10:24 am

I haven't been able to reproduce this issue so far.

Can either user who has posted here tell me if their Vault server is on a virtual machine?
Beth Kieler
SourceGear Technical Support

kadorken
Posts: 77
Joined: Mon Feb 16, 2004 8:38 am
Contact:

Re: Vault Server: Problem logging in after installation

Post by kadorken » Tue May 04, 2010 10:26 am

In my case, it was not a virtual machine.

Post Reply