Summary
Part of our deployment process is to use octo.exe
to pack
a deployment package and then push
it to our octopus server. I keep getting an error whenever we try to push the package.
Due to the sensitive data I have I replaced some of the contents with tags (i.e. <tag_name>
Also I should note that this has worked in the past. We updated to 2018.2.1 from 2018.1.2 on March 20th.
Versions:
octo.exe
: 4.31.2
Octopus Server: 2018.2.1
I understand that our server is a few versions behind but I need to know if this will fix it before I can begin to plan an upgrade. After looking through the release notes that doesn’t seem to be the case.
As always, if you need more information to help me fix this issue just ask.
Thanks
Procedure
Write-Output "=============================================================="
Write-Output "====================== Creating package ======================"
Write-Output "=============================================================="
& "$OctopusExe" pack --id=<package_name> --format="nupkg" --version=<version> --basePath=<base_dir> --include=<content> --overwrite
Write-Output "=============================================================="
Write-Output "====================== Pushing package ======================="
Write-Output "=============================================================="
& "$OctoExe" push --server=<octopus_server> --apiKey=<api_key> --package=<package_path> --replace-existing
Error and Logs
octo.exe
Error
Octopus Deploy Command Line Tool, version 4.31.2
Handshaking with Octopus server: http://<our_octopus_server>/
Handshake successful. Octopus version: 2018.2.1; API version: 3.0.0
Authenticated as: <service_account>
Pushing package: <package_path.nupkg>
Octopus Server returned an error: The process cannot access the file '<octopus_server_package_path.nupkg>' because it is being used by another process.
Error from Octopus server (HTTP 500 InternalServerError)
Exit code: -7
Octopus Deploy Server Log
Unhandled error on request: http://<octopus_server>/api/packages/raw?replace=True 8fb99776dae347a7a4b9553d8cd3de6c by <service_account> : The process cannot access the file '<octopus_server_package_path.nupkg>' because it is being used by another process.
System.IO.IOException: The process cannot access the file '<octopus_server_package_path.nupkg>' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Octopus.Core.BuiltInFeed.BuiltInPackageRepository.AddPackage(IndexedPackage package, String srcPath)
at Octopus.Server.Web.Api.NuGet.PackagePushActionBase`1.Execute()
at Octopus.Server.Web.Infrastructure.Api.Responder`1.ExecuteRegistered()
at Octopus.Server.Web.Infrastructure.Api.Responder`1.Respond(TDescriptor options, NancyContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
at CallSite.Target(Closure , CallSite , Object , Object , NancyContext )
at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object x)
at CallSite.Target(Closure , CallSite , Func`2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.<Wrap>b__3(Object parameters, CancellationToken context)