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