Intermittent Push Package failure from Azure DevOps

We’re having intermittent failures when pushing a package from Azure DevOps to Octopus. These failures are across multiple Azure pipelines and none of them fail all the time. Below is the log from an Azure DevOps pipeline which exhibited the failure. Any help will be very much appreciated.

Octopus Version: 3.17.14

##[section]Starting: Push Packages to Octopus
==============================================================================
Task         : Push Package(s) to Octopus
Description  : Push your NuGet or Zip package to your Octopus Deploy Server
Version      : 2.0.135
Author       : Octopus Deploy
Help         : Version: 2.0.135. [More Information](http://docs.octopusdeploy.com/display/OD/Use+the+Team+Foundation+Build+Custom+Task)
==============================================================================
##[command]"D:\a\_tasks\OctopusPush_d05ad9a2-5d9e-4a1c-a887-14034334d6f2\2.0.135\Octo.exe" push --server=https://my-octopus-server/ --apiKey=***  --package="D:\a\1\a\MyPackage.nupkg" --replace-existing
Octopus Deploy Command Line Tool, version 4.34.0

Handshaking with Octopus server: https://my-octopus-server/
Handshake successful. Octopus version: 3.17.14; API version: 3.0.0
Authenticated as: administrator <administrator@MyCompany.com> 
Pushing package: D:\a\1\a\MyPackage.nupkg...

System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.BeginReceive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, AsyncCallback callback, Object state)
   at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
   --- End of inner exception stack trace ---
   at System.Net.Security._SslStream.EndRead(IAsyncResult asyncResult)
   at System.Net.TlsStream.EndRead(IAsyncResult asyncResult)
   at System.Net.PooledStream.EndRead(IAsyncResult asyncResult)
   at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Octopus.Client.OctopusAsyncClient.<DispatchRequest>d__53`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Post>d__43`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.Commands.Package.PushCommand.<Request>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.Commands.ApiCommand.<Execute>d__38.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at Octopus.Cli.Commands.ApiCommand.<Execute>d__36.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.CliProgram.Run(String[] args)
Exit code: -3
##[error]Process 'Octo.exe' exited with code '-3'.
##[section]Finishing: Push Packages to Octopus

Hi @Brian_Buff,

I just replied to an email from one of your teammates about this same issue. I noticed that you were on CC, so I wanted to ask you if we could continue this conversation via that email thread.

Best regards,
Dalmiro

Yes, Dalmiro. Sounds good.

I do have similar issue pushing package from Azure Devops .

but the error it slightly different

Handshake successful. Octopus version: 3.17.14; API version: 3.0.0

Authenticated as: administrator <administrator@server.com>

Pushing package: D:\a\1\a\OPackage1.nupkg…

Server does not support delta compression for package push

Falling back to pushing the complete package to the server

System.Net.Http.HttpRequestException: An error occurred while sending the request. —> System.Net.Http.WinHttpException: The server returned an invalid or unrecognized response

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Octopus.Cli.CliProgram.Run(String[] args) in C:\buildAgent\work\289bf0fca31007af\source\Octopus.Cli\CliProgram.cs:line 52

Exit code: -3

##[error]Error: The process ‘C:\hostedtoolcache\windows\Octo\6.12.0\x64\Octo.cmd’ failed with exit code 4294967293

##[error]Failed to push package. The process ‘C:\hostedtoolcache\windows\Octo\6.12.0\x64\Octo.cmd’ failed with exit code 4294967293

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.