Nant client error: System.IO.IOException: The file exists.

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

Moderator: SourceGear

Post Reply
caelevy
Posts: 2
Joined: Fri Mar 18, 2011 9:01 am

Nant client error: System.IO.IOException: The file exists.

Post by caelevy » Fri Mar 18, 2011 9:09 am

After a recent server reboot, we just starting getting a strange error during our nant builds. Seems to be occurring during the VaultClientIntegrationLib.ServerOperations.SetRepository operation. The calling script is:

Code: Select all

	<vaultsetloginoptions user="${SGV.username}" password="${SGV.password}" URL="${SGV.url}" repository="${SGV.repository}" />
	<vaultgettolocationoutsideworkingfolder destPath="${basedir}\build">
	  <getoptions Merge="OverwriteWorkingCopy"  />
      <vaultfileset>
        <include name="$/build" />
      </vaultfileset>
    </vaultgettolocationoutsideworkingfolder>
Error received is:

Code: Select all

INTERNAL ERROR

System.IO.IOException: The file exists.

   at VaultClientIntegrationLib.ServerOperations.SetRepository(String repositoryName)
   at VaultClientIntegrationLib.ServerOperations.Login(AccessLevelType altCommand, Boolean bAllowAuto, Boolean bSaveSession)
   at NAnt.Contrib.Tasks.SourceGearVault.VaultTask.CheckLoggedIn()
   at NAnt.Contrib.Tasks.SourceGearVault.vaultgettolocationoutsideworkingfolder.ExecuteTask()
   at NAnt.Core.Task.Execute() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Task.cs:line 186
   at NAnt.Core.Target.Execute() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Target.cs:line 247
   at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies) in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Project.cs:line 1031
   at NAnt.Core.Project.Execute() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Project.cs:line 983
   at NAnt.Core.Project.Run() in C:\cygwin\home\rmboggs\nant\src\NAnt.Core\Project.cs:line 1068
Error on VaultService machine is:

Code: Select all

Application information: 
    Application domain: /LM/W3SVC/1/Root/VaultService-1-129449307332661675 
    Trust level: Full 
    Application Virtual Path: /VaultService 
    Application Path: C:\Inetpub\wwwroot\VaultService\ 
    Machine name: C-ART-APP01 
 
Process information: 
    Process ID: 2192 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 
 
Exception information: 
    Exception type: HttpException 
    Exception message: The remote host closed the connection. The error code is 0x80072746. 
 
Request information: 
    Request URL: http://c-art-app01/VaultService/VaultFileDownload.aspx?DownloadToken=75f1147a-d24b-46f4-ba04-dda11daa15ef 
    Request path: /VaultService/VaultFileDownload.aspx 
    User host address: 10.0.0.14 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: CART\Administrator 
 
Thread information: 
    Thread ID: 7 
    Thread account name: CART\Administrator 
    Is impersonating: False 
    Stack trace:    at System.Web.Hosting.ISAPIWorkerRequestInProcForIIS6.FlushCore(Byte[] status, Byte[] header, Int32 keepConnected, Int32 totalBodySize, Int32 numBodyFragments, IntPtr[] bodyFragments, Int32[] bodyFragmentLengths, Int32 doneWithSession, Int32 finalStatus, Boolean& async)
   at System.Web.Hosting.ISAPIWorkerRequest.FlushCachedResponse(Boolean isFinal)
   at System.Web.Hosting.ISAPIWorkerRequest.FlushResponse(Boolean finalFlush)
   at System.Web.HttpResponse.Flush(Boolean finalFlush)
   at System.Web.HttpResponse.Flush()
   at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
   at System.Web.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at System.IO.BufferedStream.Write(Byte[] array, Int32 offset, Int32 count)
   at VaultLib.VaultStreamCopy.CopyStream(Stream sIn, Stream sOut, Byte[] buf, Int32 nBufSize)
   at VaultLib.VaultStreamCopy.CopyStream(Stream sIn, Stream sOut, Int32 nBuf)
   at VaultService.VaultFileDownload.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
We can use the Vault client no problems, it's just the nant library that is no longer working. Server, client and library versions are 5.0.3.18802.

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

Re: Nant client error: System.IO.IOException: The file exist

Post by Beth » Fri Mar 18, 2011 9:27 am

Is there a working folder set somewhere either in your script or using the Vault GUI client?

Can you login to a Vault GUI client on the same machine the scripts run on using the same user the scripts use?

Can you post any errors you see in your Vault Server Log that happened at the same time?
Beth Kieler
SourceGear Technical Support

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

Re: Nant client error: System.IO.IOException: The file exist

Post by Beth » Fri Mar 18, 2011 9:29 am

I just now saw your other post where you say:
Regular client (with the same credentials, from the same machine) work fine. Just this nant client is now not working. All components (nant client, regular client and server) are version 5.0.3.18802.
Still check that client to see if working folders are set.

I will remove the duplicate post.
Beth Kieler
SourceGear Technical Support

caelevy
Posts: 2
Joined: Fri Mar 18, 2011 9:01 am

Re: Nant client error: System.IO.IOException: The file exist

Post by caelevy » Fri Mar 18, 2011 9:35 am

Fixed by deleting files from the calling users \AppData\Local\Temp folder. We had over 70,000 files in there, and I guess the nant client was trying to assign a file name that was already extant.

Thanks for the quick response though.

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

Re: Nant client error: System.IO.IOException: The file exist

Post by Beth » Fri Mar 18, 2011 9:49 am

Thank you for the update. I'm happy to hear about what you found.
Beth Kieler
SourceGear Technical Support

Post Reply