sgvaultuser login failed in SQL Server
Moderator: SourceGear
sgvaultuser login failed in SQL Server
A little while ago I noticed that in our SQL Server log we are seeing constant recurring messages stating "Login failed for user 'sgvaultuser'. Reason: Password did not match that for the login provided".
So I changed the SQL Server password for the sgvaultuser login. I also changed it in the Web.config file in the C:\inetpub\wwwroot\VaultService folder. I changed it in three places in that file and replaced the pwd encrypted variable with the plain text password variable instead.
Vault is still working fine, the users are not having any issues, but this error about the bad password is still happening constantly in my SQL Server log. Did I miss a place where I needed to change the password or is there another problem?
Thank you for your assistance,
Mark
So I changed the SQL Server password for the sgvaultuser login. I also changed it in the Web.config file in the C:\inetpub\wwwroot\VaultService folder. I changed it in three places in that file and replaced the pwd encrypted variable with the plain text password variable instead.
Vault is still working fine, the users are not having any issues, but this error about the bad password is still happening constantly in my SQL Server log. Did I miss a place where I needed to change the password or is there another problem?
Thank you for your assistance,
Mark
Re: sgvaultuser login failed in SQL Server
The password for sgvaultuser is encrypted by default, so if you're just typing in the password it's not correct.
The error for login failure for sgvaultuser might specify on which database it has a problem. Does it say sgvault or some other database?
The error for login failure for sgvaultuser might specify on which database it has a problem. Does it say sgvault or some other database?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: sgvaultuser login failed in SQL Server
The original password was encrypted and was in the format of "pwd=encryptedpassword". When I changed it I made it "password=plaintextpassword".
The entire error message is :
02/20/2017 08:48:25,Logon,Unknown,Login failed for user 'sgvaultuser'. Reason: Password did not match that for the login provided. [CLIENT: 10.1.0.55]
02/20/2017 08:48:25,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 8.
There is no database specified.
The entire error message is :
02/20/2017 08:48:25,Logon,Unknown,Login failed for user 'sgvaultuser'. Reason: Password did not match that for the login provided. [CLIENT: 10.1.0.55]
02/20/2017 08:48:25,Logon,Unknown,Error: 18456<c/> Severity: 14<c/> State: 8.
There is no database specified.
Re: sgvaultuser login failed in SQL Server
Let's figure out the database first then. Go to C:\Windows\Temp. In there are multiple Vault-related folders, such as sgvault, sgnotify, and so on. In each one is a log file or text file with logging information. Check each log for the failure for sgvaultuser to login and let me know which ones have it.
[ns]
[ns]
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: sgvaultuser login failed in SQL Server
The txt file in the SGVaultNotify named vaultnotifyservice.txt is huge (7.3 GB). After managing to open it it has the following at the end which contains Login failed for user sgvaultuser:
2/20/2017 10:52:38 AM <generic>: [System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'sgvaultuser'.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at VaultPluginLib.PluginSQLConn.OpenSqlConnection(String strConn, Int32 nCommandTimeout, ResourceManager rm, Boolean bThrowException, PluginSQLConn& conn, Exception& exGenerated)
ClientConnectionId:a57d286d-9597-4186-9d40-74f6a71554c3
Error Number:18456,State:1,Class:14] Login failed for user 'sgvaultuser'.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at VaultPluginLib.PluginSQLConn.OpenSqlConnection(String strConn, Int32 nCommandTimeout, ResourceManager rm, Boolean bThrowException, PluginSQLConn& conn, Exception& exGenerated)
2/20/2017 10:52:38 AM <generic>: [System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'sgvaultuser'.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at VaultPluginLib.PluginSQLConn.OpenSqlConnection(String strConn, Int32 nCommandTimeout, ResourceManager rm, Boolean bThrowException, PluginSQLConn& conn, Exception& exGenerated)
ClientConnectionId:a57d286d-9597-4186-9d40-74f6a71554c3
Error Number:18456,State:1,Class:14] Login failed for user 'sgvaultuser'.
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at VaultPluginLib.PluginSQLConn.OpenSqlConnection(String strConn, Int32 nCommandTimeout, ResourceManager rm, Boolean bThrowException, PluginSQLConn& conn, Exception& exGenerated)
Re: sgvaultuser login failed in SQL Server
You can delete that huge log file and Vault will create a new one.
Go to the location of the Vault website on the server's hard drive, and then go to vaultservice/vaultnotifyservice. In there is a web.config file that has SQL connect strings. Check that those are correct.
Go to the location of the Vault website on the server's hard drive, and then go to vaultservice/vaultnotifyservice. In there is a web.config file that has SQL connect strings. Check that those are correct.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: sgvaultuser login failed in SQL Server
That was the issue. There was another Web.config file in there that was using the old password. I changed it to the new one and it fixed the SQL Server log issue. Thanks for the help.
Re: sgvaultuser login failed in SQL Server
Thank you for the update. I'm happy to hear you are working again.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support