soscmd.exe -GetFile error: OperationFailed

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

Moderator: SourceGear

Post Reply
jarvisbao
Posts: 2
Joined: Wed Apr 04, 2007 7:44 pm

soscmd.exe -GetFile error: OperationFailed

Post by jarvisbao » Wed Apr 04, 2007 7:50 pm

I use soscmd.exe and successfully enter into Interactive mode by using command Interactive. But when I can not get file in Interactive mode.
The commands are listed as follow:
c:\>soscmd -command Interactive -server *** -name *** -password *** -alias ***
SOS>GetFile -project "$/PMU" -file "PMU.dsw"
Error: Server Response = 400 Operation Failed
SOS>GetFile -project $/PMU -file PMU.dsw
SOS>

It seems that I can not add quotations(") in the -project and -file options.

Note: The SOS version number is 4.1.2.242. It also exists on the SOS for MAC.

Another issue: It can only put the file to current folder even you specify the -workdir option.

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

Post by Beth » Thu Apr 05, 2007 8:33 am

I've checked this out and logged a bug on it. Thank you for bringing this to our attention.

jarvisbao
Posts: 2
Joined: Wed Apr 04, 2007 7:44 pm

When these issues can be fixed?

Post by jarvisbao » Tue Apr 10, 2007 7:30 pm

Beth wrote:I've checked this out and logged a bug on it. Thank you for bringing this to our attention.
Hi Beth, when these issues can be fixed?
I am developing some batch programs to automatically do SOS operations through soscmd. Now the command Interactive can now work well, so I have to create soscmd processes frequently, it is very slow. If the command Interactive can work well, I can create a single soscmd process and type commands into it, and get the results, which will obviousely improve the speed.

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

Post by Beth » Fri Apr 13, 2007 8:18 am

Sorry, but at this time I don't know the time line for that. The developers have meetings to review the bugs and requests and set the priority level for each item and maybe a tentative schedule. It's been logged though, so they will see it.

kfsone
Posts: 20
Joined: Mon Jun 02, 2008 1:48 pm
Location: Bedford, TX

Post by kfsone » Tue Jun 24, 2008 12:40 pm

Using the 4.2 soscmd client, it complains about the lack of -server, -name, -password, -database or -alias although these were specified on the initial command line:
[osmith@fedex build]$ soscmd -server 192.168.0.7:8535 -name validusername -password validpassword -database C:\\shared\\Public\\Ddrive\\VSS-Dev\\srcsafe.ini -command Interactive -soshome /home/osmith/.sos
SOS>GetFileList -project $/ww2/be/host/build
The GetFileList command requires valid -server, -name, -password, -project, and -database or -alias parameters.
SOS>GetFileList -project $/ww2/be/host/build -server 192.168.0.7:8535 -name validusername -password validpassword -database C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini
<lots of files>
SOS>
At least - I believe its the 4.2 client, there's no obvious way to tell.

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

Post by Beth » Tue Jun 24, 2008 3:59 pm

C:\\shared\\Public\\Ddrive\\VSS-Dev\\srcsafe.ini
Did you notice that you had double '\'s listed in the first command in the
path? What happens if you try that with single '\'s like you did the second time?

Also, you didn't use the -soshome the second time around. Try using the exact same command to compare results.

kfsone
Posts: 20
Joined: Mon Jun 02, 2008 1:48 pm
Location: Bedford, TX

Post by kfsone » Wed Jun 25, 2008 11:22 am

Beth wrote:
C:\\shared\\Public\\Ddrive\\VSS-Dev\\srcsafe.ini
Did you notice that you had double '\'s listed in the first command in the
path? What happens if you try that with single '\'s like you did the second time?
The Unix/Mac shells' interpreters will interpret the "" as an escape character and soscmd will complain that there is no database "C:sharedPublicDDriveVSS-Devsrcsafe.ini". The actual string that gets passed to soscmd is "C:\shared\Public\DDrive\VSS-Dev\srcsafe.ini".

Code: Select all

oliversmac:tmp osmith$ /Applications/SourceOffSite/soscmd -command "Interactive" -server 192.168.0.7:8535 -name $USERNAME -password $PASSWORD -database C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini
Failed to open database: C:sharedPublicDdriveVSS-Devsrcsafe.ini


Available databases:
C:\shared\Public\Ddrive\VSS-Terrian\srcsafe.ini
C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini


Can't shutdown socket.. Error: 57 Socket is not connected
Beth wrote:Also, you didn't use the -soshome the second time around. Try using the exact same command to compare results.
I'd tried with and without the soshome in my various experiments; regardless of the commands on the command line - with -soshome, without -soshome, with -nocache, any command I type after the SOS> prompt asks me to specify -server, -name, -password and -database or -alias - which is a minor inconvenience but it /seems/ to defeat the purpose of having an interactive mode, and it suggests that the client is actually doing a fresh connection each time. I've, as yet, to see any advantage to using the interactive mode over reinvoking soscmd multiple times - it doesn't appear to be doing any caching or connection retention.

kfsone
Posts: 20
Joined: Mon Jun 02, 2008 1:48 pm
Location: Bedford, TX

Post by kfsone » Wed Jun 25, 2008 11:26 am

(soscmd is of particular use, interest and value to me because I am responsible for the Server portion of our application under Linux and the Client-Server portion of our application under Windows and Macintosh)

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

Post by Beth » Wed Jun 25, 2008 3:41 pm

Try using the -alias switch instead of "-database C:\shared\Public\Ddrive\VSS-Dev\srcsafe.ini. " Use the alias you see in the drop down combo box from a login window from the SOS GUI client. This is the same string configured in the SOS Server Manager.

Interactive appears to work with the -alias switch.

kfsone
Posts: 20
Joined: Mon Jun 02, 2008 1:48 pm
Location: Bedford, TX

Post by kfsone » Wed Jul 09, 2008 1:26 pm

The -alias is either unrelated to the Project Name in the drop down or it doesn't like spaces in the alias names -- annoyingly, our admin has called the project I need to access "WWIIOL Project" (no quotes).

However, I was able to get it to work by doing the following:

soscmd -server xxx -name xxx -password xxx -database C:\\xxx\xx\x\srcsafe.ini -alias DB -command Interactive
SOS> GetFileList -alias DB -project $/

Which is a big improvement over having to send the details repeatedly.

Thanks


- Oliver

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

Post by Beth » Wed Jul 09, 2008 2:21 pm

Thanks for the update.

kfsone
Posts: 20
Joined: Mon Jun 02, 2008 1:48 pm
Location: Bedford, TX

Post by kfsone » Wed Jul 16, 2008 1:30 pm

Further update - not all commands work like this, however - I ran into a few commands (I didn't make a note) which only work if you specify the full set of arguments :( GetProjectTree is the one I remember.

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

Post by lbauer » Fri Jul 18, 2008 10:32 am

Thanks.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply