command line get command fails

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

Moderator: SourceGear

Post Reply
polakhov
Posts: 8
Joined: Tue Jan 16, 2007 4:43 am

command line get command fails

Post by polakhov » Tue Jan 16, 2007 5:28 am

Hello, I'm using Source Gear Vault 3.5.1.

I need to write a script to get files from Vault.

So I've written the script:

"C:\Program Files\SourceGear\Vault Client\vault.exe" -user "Username" -password "" -host "IPaddress" -workingfolder "D:\TTT\_dev\script1" -repository TTT get $/_dev/script > "D:\LOG\vaultTTT.log"

After running the script I've got the following log file:

<vault>
<error>
Proxy Authentication failed.
</error>
<exception>
System.Exception: Proxy Authentication failed.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGet(ArrayList strItemArray)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>


All the settings from the above script are correct: the user name, empty password, host name. The working folder, repository and the path '$/_dev/script' exist.

There are no problem to get latest version or to get files/dirs if I don't use command line.
So what could be the reason of such fail for command line?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Jan 16, 2007 8:54 am

So what could be the reason of such fail for command line?

It probably has something to do with this error message:
Proxy Authentication failed.
Your GUI client may be set up to handle proxy authentication, but this needs to be added to your script. You can check the proxy settings in your Vault GUI client under Tools->Options->Network settings.

If you look at the CLC documentation (from the command line in the the Vault client directory, type "Vault help get"), you'll see additional options, such as:

-proxyserver
-proxyport
-proxyuser,

etc.
Linda Bauer
SourceGear
Technical Support Manager

polakhov
Posts: 8
Joined: Tue Jan 16, 2007 4:43 am

Post by polakhov » Thu Jan 18, 2007 5:41 am

In Vault options is set : "Do not use a proxy".
So I think the GUI client isn't set to use proxy authentication.

polakhov
Posts: 8
Joined: Tue Jan 16, 2007 4:43 am

Post by polakhov » Thu Jan 18, 2007 9:36 am

Another type of error:

set VaultPath=C:\Program Files\SourceGear\Vault Client
set VaultUser=Dmitry_Polyakhov
set VaultHost=SVRFREJA

set Vault="%VaultPath%\vault.exe"

%Vault% -user "%VaultUser%" -password "" -host "%VaultHost%" -workingfolder D:\LOG -repository TTT get $/_dev/doc >> "D:\LOG\ex.log"

I get LOG:
<error>
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://SVRFREJA/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: The underlying connection was closed: The remote name could not be resolved.
</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://SVRFREJA/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: The underlying connection was closed: The remote name could not be resolved.
at VaultCmdLineClient.VaultCmdLineClient.Login(Boolean bAllowAuto, Boolean bSaveSession)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommandGet(ArrayList strItemArray)
at VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
at VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)
</exception>
<result success="no" />
</vault>

If I change slashes "get $/_dev/doc" to get "$\_dev\doc "

I get LOG

<vault>
<error>
Invalid repository path: $\_dev\doc
</error>
<result success="no" />
</vault>

The repository exeists and the path in the repository exists too.

What can cause such error?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Thu Jan 18, 2007 1:37 pm

Invalid repository path: $\_dev\doc


This is invalid because the repository path is $/_dev/doc.

Verify that the CLC is version 3.5.x.

Also, try running the get command on the Vault Server machine itself, using "localhost" for the servername:

Try using -destpath to get to a non-working folder, just for a test:

"C:\Program Files\SourceGear\Vault Client\vault.exe" GET -user "Username" -password "" -host "localhost" -destpath "D:\TTT\_dev\script1" -repository "TTT" "$/_dev/script"

(Note: I've edited out the actual connection info from your post.)
Linda Bauer
SourceGear
Technical Support Manager

polakhov
Posts: 8
Joined: Tue Jan 16, 2007 4:43 am

Post by polakhov » Fri Jan 19, 2007 4:39 am

Verify that the CLC is version 3.5.x.
[1/17/2007 7:36:26 PM] Version Check: This Vault client is version 3.5.1.4786
[1/17/2007 7:36:26 PM] Version Check: Your Vault server is version 3.5.1.4786
Also, try running the get command on the Vault Server machine itself, using "localhost" for the servername:
It's not a convinient variant to run the script on the host machine because it's the remote server.
Try using -destpath to get to a non-working folder, just for a test:
I've tried to use destpath instead of working folder, also I've tried not to set working folder or destpath at all i.e. "get latest version".

The result was the same:
<error>
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://SVRFREJA/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: The underlying connection was closed: The remote name could not be resolved.
</error>

I've also tried to modify the script:
"C:\Program Files\SourceGear\Vault Client\vault.exe" GET -user "Username" -password "" -host "SVRFREJA.pdc.xx" -destpath "D:\TTT\_dev\script1" -repository "TTT" "$/_dev/script"

But it caused error message of wrong proxy authentication.

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

Post by Beth » Fri Jan 19, 2007 2:51 pm

It is very hard to tell what's happening here without getting the network out of the equation. Whether or not Vault is configured to use a proxy server, if your network wants to run communication through one, you will be stuck having to configure Vault for that.

I think it would be best to start from the beginning on troubleshooting. If any step fails, stop right at that step and let me know the results.
  • 1) Open a web browser and verify that you can bring up the page http://<your vaultserver>/vaultservice

    2) In the same web browser try http://<your vaultserver>/vaultservice/vaultservice.asmx

    3) Open a Vault GUI client and confirm that you can connect to the server and manipulate files.

    4) Find out if there is a proxy on your network. Vault cannot auto-detect that, so you will need to find out.
If any of these fail, then we have to go to the server side to ensure that Vault is working there.

polakhov
Posts: 8
Joined: Tue Jan 16, 2007 4:43 am

Post by polakhov » Mon Jan 22, 2007 5:27 am

4) Find out if there is a proxy on your network. Vault cannot auto-detect that, so you will need to find out.
The problem was actually in the network settings. Now it works 8)

Thanks a lot.

Post Reply