System.Exception: The connection to the server failed

If you are having a problem using Vault, post a message here.
Post Reply
JanBrzozowski
Posts: 8
Joined: Thu Sep 18, 2014 2:20 am

System.Exception: The connection to the server failed

Post by JanBrzozowski » Fri Sep 09, 2016 8:25 am

On two workstations after upgrade to windows 10 (six weeks after upgrade) users can't run command rememberlogin.

GUI client just work perfectly
No proxy settings in system and vault
I checked couple workstation and all works fine.
User name and password are correct
No error messages in vault server logs and IIS logs.
Vault 7.2.1.30265

Any idea where lookup for solution?

Error message:

<vault> <error> <exception>System.Exception: The connection to the server failed: server cannot be contacted or uses a protocol that is not supported by this client. Unable to connect to http://vault/VaultService. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: Unable to connect to the remote server ---> System.Exception: Unable to connect to http://vault/VaultService. No server was found at the specified URL. Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client. Web Exception: Unable to connect to the remote server at VaultClientNetLib.VaultConnection.Login(String strURLBase, String strUserLogin, String strPassword) at VaultClientOperationsLib.ClientInstance.Login(String urlbase, String username, String password) at
VaultClientIntegrationLib.ServerOperations.Login(AccessLevelType altCommand, Boolean bAllowAuto, Boolean bSaveSession) --- End of inner exception stack trace --- at VaultClientIntegrationLib.ServerOperations.Login(AccessLevelType altCommand, Boolean bAllowAuto, Boolean bSaveSession) at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg) at
VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)</exception> </error> <result> <success>False</success> </result> </vault>

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

Re: System.Exception: The connection to the server failed

Post by Beth » Mon Sep 12, 2016 1:24 pm

The error related to Protocol almost always means that the client version does not equal the server version.

Did the user possibly install Vault 9 command line client?

Is the Remember Login command being run on a machine that has a GUI client or no GUI client?

Is the CLC the .NET CLC or the Java CLC?
Beth Kieler
SourceGear Technical Support

JanBrzozowski
Posts: 8
Joined: Thu Sep 18, 2014 2:20 am

Re: System.Exception: The connection to the server failed

Post by JanBrzozowski » Tue Sep 13, 2016 3:17 am

Beth wrote:The error related to Protocol almost always means that the client version does not equal the server version.
The client version is the same as the server. Remember login works some time ago, since this time there was no changes in vault server and client.
Beth wrote:Did the user possibly install Vault 9 command line client?
No
Beth wrote:Is the Remember Login command being run on a machine that has a GUI client or no GUI client?
GUI client is installed
Beth wrote:Is the CLC the .NET CLC or the Java CLC?
No

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

Re: System.Exception: The connection to the server failed

Post by Beth » Tue Sep 13, 2016 7:27 am

If you're not using a CLC, then are you using the Vault client API?

Can you show a small screenshot of using the RememberLogin? (You can black out private data.)
Beth Kieler
SourceGear Technical Support

JanBrzozowski
Posts: 8
Joined: Thu Sep 18, 2014 2:20 am

Re: System.Exception: The connection to the server failed

Post by JanBrzozowski » Wed Sep 14, 2016 1:31 am

Yes, I'm using the Vault client API

Logs from vault server:
----2016-09-14 09:19:52 JBrzozowski--workstation(192.168.1.1)--SSL Disabled Login
----2016-09-14 09:19:52 JBrzozowski--workstation(192.168.1.1)--SSL Disabled Logout
You do not have the required permissions to view the files attached to this post.

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

Re: System.Exception: The connection to the server failed

Post by Beth » Wed Sep 14, 2016 8:04 am

Open a browser on the same machine and put in the URL http://vault/vaultservice/index.html. Does that return anything?

Next, open a command prompt and change directories to the Vault client. Then run the command:

vault help|more

In the results, it should list the full Vault version next to the <usage> tag. Can you post the information that shows up here?
Beth Kieler
SourceGear Technical Support

JanBrzozowski
Posts: 8
Joined: Thu Sep 18, 2014 2:20 am

Re: System.Exception: The connection to the server failed

Post by JanBrzozowski » Thu Sep 15, 2016 1:04 am

Beth wrote:Open a browser on the same machine and put in the URL http://vault/vaultservice/index.html. Does that return anything?
Return standard vault page:

Vault Professional Home Page
vault Server Installation
Version 7.2.1.30265 Installed 02-09-2015
Beth wrote:Next, open a command prompt and change directories to the Vault client. Then run the command:

vault help|more

In the results, it should list the full Vault version next to the <usage> tag. Can you post the information that shows up here?
SourceGear Vault Professional Command Line Client 7.2.1.265

All result in attachment
You do not have the required permissions to view the files attached to this post.

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

Re: System.Exception: The connection to the server failed

Post by Beth » Thu Sep 15, 2016 12:59 pm

Do you have the 3.5 .NET framework on the machine? Or try to install the 3.5 .NET framework.
Beth Kieler
SourceGear Technical Support

JanBrzozowski
Posts: 8
Joined: Thu Sep 18, 2014 2:20 am

Re: System.Exception: The connection to the server failed

Post by JanBrzozowski » Mon Sep 19, 2016 6:11 am

.NET Framework 3.5 was installed.
I uninstalled and installed it again, but did not bring improvement.

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

Re: System.Exception: The connection to the server failed

Post by jclausius » Mon Sep 19, 2016 8:50 am

By default, te REMEMBERLOGIN command is going to store credentials in the user's %localappdata%\SourceGear\Vault_1\Client\vault_cmdline_client_session.txt.


Can you verify that path and file exist?

Do those users with the problem have correct permissions to that directory path / file?

Can you make a copy of that file if it exists (do not rename the existing file)? Next, try "vault.exe FORGETLOGIN". If the file exists, is it removed? After the FORGETLOGIN command, re-try with REMEMBERLOGIN. Any change in behavior?
Jeff Clausius
SourceGear

JanBrzozowski
Posts: 8
Joined: Thu Sep 18, 2014 2:20 am

Re: System.Exception: The connection to the server failed

Post by JanBrzozowski » Tue Sep 20, 2016 1:40 am

The path and file exist.
Permissions are good, user can write.

When I invoke "vault.exe FORGETLOGIN" file was removed.
After retry REMEMBERLOGIN new file wasn't created.

Invoke-WebRequest -uri "http://vault/vaultservice"
StatusCode : 200
StatusDescription : OK
Content : .....

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

Re: System.Exception: The connection to the server failed

Post by jclausius » Tue Sep 20, 2016 7:31 am

Thank you. It's not permissions issue since FORGETLOGIN was able to remove the file. Users can rename the copy of vault_cmdline_client_session.txt back if they wish

From there error message, it appears the command line client cannot resolve or reach "vault".

A couple of thoughts:

In the user's %temp% directory, is there a file named VaultCLC.txt file? Perhaps there is a bit more of the error found in here.

Do you know the IP address of the Vault server? Does the REMEMBERLOGIN work with an IP address instead of a hostname? For example, "-host 10.5.2.20" instead of "-host vault"
Jeff Clausius
SourceGear

Post Reply