Can't connect using Java CLC

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

Moderator: SourceGear

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Can't connect using Java CLC

Post by ajj3085 » Tue Jan 05, 2016 12:34 pm

Upgrading to Vault Standard 9, and I can't seem to connect using the Java CLC. The Vault GUI client works fine (from another computer) and I can connect via the web browser on the computer which experiences the issue. The error is:

Code: Select all

<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 https://<myserver>/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:  ---> System.Exception: Unable to connect to https://<myserver>/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:
        at clr.System.ExceptionStaticWrapper.ExceptionCtor(Exception.jvm.cs:38)
        at VaultClientNetLib.VaultConnection.Login(Unknown Source)
        at VaultClientOperationsLib.ClientInstance.Login(Unknown Source)
        at VaultClientIntegrationLib.ServerOperations.Login(ServerOperations.cs:4163)
        at VaultClientIntegrationLib.ServerOperations.Login(ServerOperations.cs:4301)
        at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Unknown Source)
        at VaultCmdLineClient.VaultCmdLineClient.$Main$(Unknown Source)
        at VaultCmdLineClient.VaultCmdLineClient.main(Unknown Source)

        at clr.System.ExceptionStaticWrapper.ExceptionCtor(Exception.jvm.cs:38)
        at VaultClientNetLib.VaultConnection.Login(Unknown Source)
        at VaultClientOperationsLib.ClientInstance.Login(Unknown Source)
        at VaultClientIntegrationLib.ServerOperations.Login(ServerOperations.cs:4163)
        at VaultClientIntegrationLib.ServerOperations.Login(ServerOperations.cs:4301)
        at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Unknown Source)
        at VaultCmdLineClient.VaultCmdLineClient.$Main$(Unknown Source)
        at VaultCmdLineClient.VaultCmdLineClient.main(Unknown Source)
   --- End of inner exception stack trace ---
        at clr.System.ExceptionStaticWrapper.ExceptionCtor(Exception.jvm.cs:45)
        at VaultClientIntegrationLib.ServerOperations.Login(ServerOperations.cs:4174)
        at VaultClientIntegrationLib.ServerOperations.Login(ServerOperations.cs:4301)
        at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Unknown Source)
        at VaultCmdLineClient.VaultCmdLineClient.$Main$(Unknown Source)
        at VaultCmdLineClient.VaultCmdLineClient.main(Unknown Source)
</exception>
  </error>
  <result>
    <success>False</success>
  </result>
I'm at a loss; I'm using TeamCity as my build server, which uses the Java CLC.

Any help appreciated. And yes, I did grab the 9.0.0 CLC.

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

Re: Can't connect using Java CLC

Post by Beth » Tue Jan 05, 2016 1:20 pm

The error you received tells me that your Java CLC is still at Vault 8. You will need to download the latest Java CLC and overwrite your current one with it.
Beth Kieler
SourceGear Technical Support

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Re: Can't connect using Java CLC

Post by ajj3085 » Tue Jan 05, 2016 2:19 pm

Beth wrote:The error you received tells me that your Java CLC is still at Vault 8. You will need to download the latest Java CLC and overwrite your current one with it.
I did; the file was vaultJavaCLC_9_0_0_452.zip.

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

Re: Can't connect using Java CLC

Post by Beth » Tue Jan 05, 2016 2:38 pm

Did you place the Jars into the correct location at <TeamCity Data Directory>/plugins/VaultAPI/lib folder?

Would it be possible to have you try a Get against the Vault Java CLC separately from TeamCity? The command you will use will look something like

Code: Select all

vault GET -host myvaultserver -user username -password "password" -repository "RepositoryName" $/FolderABC/Subfolder/FileA.txt" 
Beth Kieler
SourceGear Technical Support

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Re: Can't connect using Java CLC

Post by ajj3085 » Tue Jan 05, 2016 2:45 pm

Beth wrote:Did you place the Jars into the correct location at <TeamCity Data Directory>/plugins/VaultAPI/lib folder?

Would it be possible to have you try a Get against the Vault Java CLC separately from TeamCity? The command you will use will look something like

Code: Select all

vault GET -host myvaultserver -user username -password "password" -repository "RepositoryName" $/FolderABC/Subfolder/FileA.txt" 
Hi Beth, yes, I am trying in a location separate from TeamCity; I just extracted the files to a temporary location and am trying the listrepositories command.

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

Re: Can't connect using Java CLC

Post by Beth » Tue Jan 05, 2016 2:59 pm

What error do you receive separate from TeamCity?
Beth Kieler
SourceGear Technical Support

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Re: Can't connect using Java CLC

Post by ajj3085 » Tue Jan 05, 2016 3:05 pm

Beth wrote:What error do you receive separate from TeamCity?
The error I posted above is what I see in the command prompt window when I try the CLC manually.

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

Re: Can't connect using Java CLC

Post by Beth » Tue Jan 05, 2016 3:44 pm

Open a web browser on your TeamCity machine and see if you can reach the Vault code from there. The url is http://<your Vault server>/vaultservice/vaultweb. Try to login as the same user you're using in the Java CLC. If you can't reach it from the web client then I'll need to see the error it gives.
Beth Kieler
SourceGear Technical Support

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Re: Can't connect using Java CLC

Post by ajj3085 » Tue Jan 05, 2016 5:01 pm

Beth wrote:Open a web browser on your TeamCity machine and see if you can reach the Vault code from there. The url is http://<your Vault server>/vaultservice/vaultweb. Try to login as the same user you're using in the Java CLC. If you can't reach it from the web client then I'll need to see the error it gives.
Hi Beth, i can reach the site via the browser on the same computer.

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Re: Can't connect using Java CLC

Post by ajj3085 » Mon Jan 11, 2016 8:03 pm

I've tried using Fiddler to capture the traffic but it doesn't look like Java apps can be captured. Any way to log the actual HTTP requests?

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

Re: Can't connect using Java CLC

Post by Beth » Tue Jan 12, 2016 10:13 am

I just noticed your URL in the error says https. Java has extra steps for using SSL. Follow the instructions in this KB article: http://support.sourcegear.com/viewtopic.php?t=10526.
Beth Kieler
SourceGear Technical Support

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Re: Can't connect using Java CLC

Post by ajj3085 » Tue Jan 12, 2016 10:27 am

Beth wrote:I just noticed your URL in the error says https. Java has extra steps for using SSL. Follow the instructions in this KB article: http://support.sourcegear.com/viewtopic.php?t=10526.
Yes, I have SSL required for Vault. I never had to do that for Vault 8; are you sure that document applies to me? I'm doing this on Windows, not OSX/Linux. It's also a purchased SSL cert, not a self-signed one.

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

Re: Can't connect using Java CLC

Post by Beth » Tue Jan 12, 2016 1:42 pm

Could you try hitting our Vault demo server using your Java CLC?
login: guest1
password: guest1
server: vaultdemo.sourcegear.com (unless you're using Pro, then it's vualtprodemo.sourcegear.com)

So that you can see the structure ahead of time, just go to http://vaultdemo.sourcegear.com/vaultservice/vaultweb in a browser and you'll see what files are there to use in a test.
Beth Kieler
SourceGear Technical Support

ajj3085
Posts: 228
Joined: Thu Feb 16, 2006 11:39 am

Re: Can't connect using Java CLC

Post by ajj3085 » Tue Jan 12, 2016 1:47 pm

Beth wrote:Could you try hitting our Vault demo server using your Java CLC?
login: guest1
password: guest1
server: vaultdemo.sourcegear.com (unless you're using Pro, then it's vualtprodemo.sourcegear.com)

So that you can see the structure ahead of time, just go to http://vaultdemo.sourcegear.com/vaultservice/vaultweb in a browser and you'll see what files are there to use in a test.
I tried that and it works, both with and without SSL.

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

Re: Can't connect using Java CLC

Post by Beth » Wed Jan 13, 2016 10:45 am

To summarize, it looks like it's been established that
--You can use the Vault Java CLC from the machine with TeamCity separately with no issue.
--You can use the Vault Java CLC against our demo server.
--The correct Vault Java CLC DLLs have been dropped into the same location as the old Vault Java CLC DLLs.

Since the error says there could be a protocol conflict, I still think it's possible that the DLLs are either the wrong version or not in the right place.

Has TeamCity been notified? Do they have any additional instructions for when upgrading the SCC provider? I think they need to be in on this as well.
Beth Kieler
SourceGear Technical Support

Post Reply