Find in Files not turning on

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

Moderator: SourceGear

Post Reply
sduncan359
Posts: 2
Joined: Thu Dec 29, 2016 2:17 pm

Find in Files not turning on

Post by sduncan359 » Fri Apr 21, 2017 6:10 pm

We are using Vault Standard Version 8.0.1.299. It seems to be working fine except when trying to turn on Find in Files.

I searched this board and saw people with similar problems, but couldn't find a solution that works, although I have not tried uninstalling and reinstalling. I would prefer to leave Find in Files non-functional than reinstalling since everything else seems to be working fine and we can't afford to have the system stop working.

I suspect this has something to do with the two connectstring keys at the bottom of the web.config in the VaultIndexService folder since it was changed last May (by somebody else). I tried using the old web.config and doing an IIS reset but it still didn't work.

I think the person who used to be in charge of this system had to do something with the password to get Shadowing to work, but I am not sure what was done (Shadowing is now working correctly).

Is there anything we can do beside uninstalling and reinstalling?

The following shows up in the vaultindexservice.txt log file:

4/21/2017 4:54:19 PM <generic>: GetEntryAssembly() returned null; not logging assembly name
4/21/2017 4:54:19 PM <generic>: SourceGear Index Service started.
4/21/2017 4:54:19 PM <generic>: Failed to retrieve login information for the Vault Server. The Find In Files Index Server may not be able to contact the Vault Server for repository information. [VaultLib.VaultCryptoException: Bad Data.

at VaultLib.VaultCrypto.Decrypt(String strBase64Buf)
at VaultIndexService.VaultIndexManager.GetVaultPluginLoginInfo(String& strVaultServer, String& strLogin, String& strPlainPassword)] Bad Data.

at VaultLib.VaultCrypto.Decrypt(String strBase64Buf)
at VaultIndexService.VaultIndexManager.GetVaultPluginLoginInfo(String& strVaultServer, String& strLogin, String& strPlainPassword)

4/21/2017 4:54:23 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 7. The username or password supplied is invalid.
4/21/2017 4:54:27 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 7. The username or password supplied is invalid.

jclausius
Posts: 3649
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Find in Files not turning on

Post by jclausius » Sat Apr 22, 2017 8:49 am

Both Shadow Folder and Find in Files will need to authenticate to the Vault Server.

Since Shadow Folder is working, take a look at web.config for Shadow Folder. Within the <appSettings>, you will see elements for the shadowfolder_login, shadowfolder_password and shadowfolder_vaultserver entries.

Now, open the web.config file for the VaultIndexService (Find in Files). Take a look and compare/contrast the internal values with the Find in Files vault_server, vault_login, and vault_password. Do the values match? If not,
  • Make a copy of the Find in Files' web.config file just in case
  • Change the Find in File web.config values only, (not the key) match Shadow Folders values
  • Save the file
Now retry your Find in Files configuration, and re-check the Find in Files log file. Hopefully it is something that just got out of sync.
Jeff Clausius
SourceGear

sduncan359
Posts: 2
Joined: Thu Dec 29, 2016 2:17 pm

Re: Find in Files not turning on

Post by sduncan359 » Mon Apr 24, 2017 5:42 pm

Here is the section from the web.config in VaultIndexService (I have not made any changes on this copy):

<!--
This section is used as authentication to connect to the vault server.

Example (using loopback) :
key="vault_server" value="http://{VAULT-SERVER-HOSTNAME}/VaultService"
key="vault_login" value="admin"
key="vault_password" value=" **!ENCRYPTED PASSWORD!** "
-->
<add key="vault_server" value="http://127.0.0.1/VaultService" />
<add key="vault_login" value="admin" />
<add key="vault_pwd" value="QiI2vaeUOwqBpnX26inYTGBlY2B8HKzv" />

I noticed that the vault_pwd key shows as vault_password in the comment. I tried to changing it but no change in behavior (except the log file no longer gets a "Bad Data" error).

Here is the section from the web.config in VaultShadowFolder:

<add key="shadowfolder_cachepath" value="E:\VaultShadowCache\cache" />
<add key="shadowfolder_login" value="admin" />
<add key="shadowfolder_password" value="yQRiPb3KvoUEROGRp8UTkh8YhRFWl274" />
<add key="shadowfolder_vaultserver" value="http://VAULTVM1.skagit.local/VaultService" />

I see that the passwords do not match and the servers do not match (although they should resolve to the same thing) so I tried changing the web.config in the VaultIndexService folder so the passwords matched and the server values match but I still get the "The username or password supplied is invalid." in the log.

I think there may be 2 problems (at least). It appears that the key name for the vault password somehow got to be "vault_pwd" when it should be "vault_password". Based on what I read in another thread, I don't think I can look to the VaultShadowFolder web.config to get the password since we are on Standard.

Not sure what to try at this point. With our current web.config (with the possible bad key name for vault_password), I get this in our vaultindexservice.txt log file:

4/24/2017 4:26:36 PM <generic>: GetEntryAssembly() returned null; not logging assembly name
4/24/2017 4:26:37 PM <generic>: SourceGear Index Service started.
4/24/2017 4:26:37 PM <generic>: Failed to retrieve login information for the Vault Server. The Find In Files Index Server may not be able to contact the Vault Server for repository information. [VaultLib.VaultCryptoException: Bad Data.

at VaultLib.VaultCrypto.Decrypt(String strBase64Buf)
at VaultIndexService.VaultIndexManager.GetVaultPluginLoginInfo(String& strVaultServer, String& strLogin, String& strPlainPassword)] Bad Data.

at VaultLib.VaultCrypto.Decrypt(String strBase64Buf)
at VaultIndexService.VaultIndexManager.GetVaultPluginLoginInfo(String& strVaultServer, String& strLogin, String& strPlainPassword)

4/24/2017 4:26:40 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 7. The username or password supplied is invalid.
4/24/2017 4:26:44 PM <generic>: Could not contact the server at http://127.0.0.1/VaultService for repository id 7. The username or password supplied is invalid.

With the web.config changed so that "vault_pwd" is "vault_password" and 127.0.0.1 is changed to VAULTVM1.skagit.local I get this in the log file:

4/24/2017 4:23:53 PM <generic>: GetEntryAssembly() returned null; not logging assembly name
4/24/2017 4:23:53 PM <generic>: SourceGear Index Service started.
4/24/2017 4:23:57 PM <generic>: Could not contact the server at http://VAULTVM1.skagit.local/VaultService for repository id 3. The username or password supplied is invalid.
4/24/2017 4:24:01 PM <generic>: Could not contact the server at http://VAULTVM1.skagit.local/VaultService for repository id 3. The username or password supplied is invalid.
4/24/2017 4:24:05 PM <generic>: Could not contact the server at http://VAULTVM1.skagit.local/VaultService for repository id 3. The username or password supplied is invalid.
4/24/2017 4:24:09 PM <generic>: Could not contact the server at http://VAULTVM1.skagit.local/VaultService for repository id 3. The username or password supplied is invalid.
4/24/2017 4:24:09 PM <generic>: The Find In Files Index Server could not obtain a client connection to the Vault server. Rep ID 3 will not be indexed.

jclausius
Posts: 3649
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Re: Find in Files not turning on

Post by jclausius » Tue Apr 25, 2017 7:35 am

OK. Please restore the web.config file from the copy you made. That didn't work.

Can you send an email to support AT sourcegear DOT com with a short description and a link to this forum post? Support should be able to help re-encrypt the passwords and you can save that within the file.
Jeff Clausius
SourceGear

Post Reply