Error Occuring in VaultIndexService - Find In Files

If you are having a problem using Vault, post a message here.
Post Reply
nbuckle
Posts: 15
Joined: Thu Mar 26, 2009 1:15 pm

Error Occuring in VaultIndexService - Find In Files

Post by nbuckle » Thu Jul 10, 2014 11:11 am

Hi,

This error is occurring when I try to save my Find In Files flag to on. I've already referred to several of the other threads related to this feature. I've already upgraded my instance of vault server to 6.1 and verified my plug in urls are pointing to the right location.

Sql Server DB is on another network location. The plugin is not passing my credentials to the SQL Server DB. An attempt is being made to login to the db from the VaultIndexService as my machine account, not the impersonated credentials. The error I'm getting is as follows.

----7/9/2014 6:02:57 PM admin--devfortress.pt.int(10.0.100.29)--SSL Disabled Login
----7/9/2014 6:02:57 PM --()-- Vault Failed to establish a connection to the database.
----7/9/2014 6:02:57 PM --()-- System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'DOMAIN\THEVAULTSERVERNAME$'.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
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, TimeoutTimer timeout, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, 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 VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(VaultServiceDBConnectType vsDbType, VaultSqlConn& conn) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
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, TimeoutTimer timeout, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, 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 VaultServiceAPILib.VaultServiceAPISystem.GetOpenSqlConn(VaultServiceDBConnectType vsDbType, VaultSqlConn& conn)

When I upgraded the vault server, I provided a service account credential to run under and selected Windows Auth as a method to connect to the database (according to the instructions in the wizard, this would only be needed at the time of installation). I see that per the web.config for all of those plugin services that correct service account credential is being impersonated, yet when the service makes the call to the database that credential is not being passed.

Any assistance you can offer would be greatly appreciated.

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

Re: Error Occuring in VaultIndexService - Find In Files

Post by Beth » Thu Jul 10, 2014 2:29 pm

When SQL is on another machine, there can be problems connecting with system accounts. When SQL is on another machine, your best choices when installing are:

1) Use Machine for the IIS Process Model and SQL authentication when connecting to the SQL Server (login with SQL admin account, such as 'sa').

2) Use Custom for the IIS Process Model and provide it with an Active Directory user (best to use the browse buttons) and then you can use SQL authentication or Windows authentication when connecting to the SQL Server.

At this point, I'd recommend you uninstall Vault, but choose the option to keep the database, and then reinstall using either option 1 or 2.
Beth Kieler
SourceGear Technical Support

nbuckle
Posts: 15
Joined: Thu Mar 26, 2009 1:15 pm

Re: Error Occuring in VaultIndexService - Find In Files

Post by nbuckle » Thu Jul 10, 2014 3:22 pm

Thank you for your quick response.

Yesterday I re-installed Vault server and proceeded with steps per your number TWO (2)
I selected Windows Authentication for connecting to SQL Server. During the installation I was logged into the server as the active directory service account I needed the process to run under.

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

Re: Error Occuring in VaultIndexService - Find In Files

Post by Beth » Thu Jul 10, 2014 3:36 pm

You don't need to login as the user you want Vault to run under. You can, but it's not required. What sets the account is the IIS Process Model. The domain user needs to be set there. As long as you did that, you should be good to go.

Is everything working better now?
Beth Kieler
SourceGear Technical Support

nbuckle
Posts: 15
Joined: Thu Mar 26, 2009 1:15 pm

Re: Error Occuring in VaultIndexService - Find In Files

Post by nbuckle » Thu Jul 10, 2014 3:52 pm

Unfortunately no...

I don't get error messages from the admin page.. but the setting is not saved and when I view the log, I get that error I posted earlier

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

Re: Error Occuring in VaultIndexService - Find In Files

Post by Beth » Fri Jul 11, 2014 1:37 pm

Are you using Windows 2008 Server?

Do you have the ability to use SQL authentication? You won't need to make any users for Vault in SQL. Reinstall, select SQL authentication, and login with a SQL admin account such as 'sa'. Vault will make its own user called sgvaultuser and give it the minimum permissions needed on the SQL Server.
Beth Kieler
SourceGear Technical Support

Post Reply