Octo.exe push of a zip file results in HttpListenerException on Server

When attempting to push this zip file to Octopus it hangs. I’m able to push other zips just fine. Is there something about the structure of the zip file that would cause this?

Octo.exe push --package=“Artifacts\bci.imageview.web.175885.16.2.zip” --replace-existing --server="***" --apikey=""
Octopus Deploy Command Line Tool, version 4.35.1

‘’’
Unhandled exception from web server processing POST to http://myservername/api/Spaces-1/packages/raw?replace=True: The I/O operation has been aborted because of either a thread exit or an application request
System.Net.HttpListenerException
at System.Net.HttpRequestStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at Nancy.IO.RequestStream.MoveStreamContentsToFileStream()
at Nancy.IO.RequestStream.MoveStreamOutOfMemoryIfExpectedLengthExceedSwitchLength(Int64 expectedLength)
at Nancy.IO.RequestStream…ctor(Stream stream, Int64 expectedLength, Int64 thresholdLength, Boolean disableStreamSwitching)
at Octopus.Server.Web.OctopusNancyHost.ConvertRequestToNancyRequest(HttpListenerRequest request)
at Octopus.Server.Web.OctopusNancyHost.Process(HttpListenerContext ctx) System.Net.HttpListenerException (0x80004005): The I/O operation has been aborted because of either a thread exit or an application request
at System.Net.HttpRequestStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
at Nancy.IO.RequestStream.MoveStreamContentsToFileStream()
at Nancy.IO.RequestStream.MoveStreamOutOfMemoryIfExpectedLengthExceedSwitchLength(Int64 expectedLength)
at Nancy.IO.RequestStream…ctor(Stream stream, Int64 expectedLength, Int64 thresholdLength, Boolean disableStreamSwitching)
at Octopus.Server.Web.OctopusNancyHost.ConvertRequestToNancyRequest(HttpListenerRequest request)
at Octopus.Server.Web.OctopusNancyHost.Process(HttpListenerContext ctx)
May 12th 2021 13:37:59Error
An exception was thrown disposing the HttpListenerContext.Response whilst dealing with an unhandled exception: An operation was attempted on a nonexistent network connection System.Net.HttpListenerException (0x80004005): An operation was attempted on a nonexistent network connection
at System.Net.HttpResponseStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.Net.HttpListenerResponse.System.IDisposable.Dispose()
at System.Net.HttpListenerResponse.Close()
at Octopus.Server.Web.OctopusNancyHost.SafelyHandleProcessException(Exception e, HttpListenerContext httpListenerContext, NancyContext nancyContext)
May 12th 2021 14:07:18Error

Hi @jack.lunn,

Thank you for contacting Octopus Support.

This type of error usually indicates something going on in the host environment such as a firewall/router issue, out-of-memory condition, NIC issue, shaky VPN connection, etc. Is there anything different, in particular, about this package that is different from other .ZIP packages? Is this a larger .ZIP file? Also, for reference, what version of Octopus Server are you currently running.

Let me know at your earliest convenience.

Regards,
Donny

Version is 2019.1.1

File size is 3.5MB, I can manually push a 5MB file using the CLI without an issue.

I’m trying to figure out what is different about this zip. I’ll i know thus far is that the package is dotnet 5 and that is something we recently started using in house.

Also note that i can’t upload this same zip file using the web GUI either. I guess it’s trying to do a POST just like the CLI.

Hi @jack.lunn,

Thank you for getting back to me.

Are you building these packages using octopack or something else? If you are able share the file, I’m happy to test the package in test environment on my end. You may attach it to the thread here, PM it to me directly, email it to Support@Octopus.com, or you may upload it via secure link here:
https://octopus.com/support/individual/xctgk5mbpfsnrqtnpjosg43qpt4sh51ycjts13dbpbz1ha5xpwt84$47BD36F$6ado5wzjq9569yz79wq5eq7czsrieb16

I look forward to hearing back from you.

Regards,
Donny

Donny, you were correct that it was a firewall issue. Our firewall was picking up a flagged word in a json config file that is part of the package. We renamed the key in the json file and it made it across the wire. That key had been added to the project and then this started failing.

Jack

1 Like

Hi @jack.lunn,

Thank you for getting back to me and letting me know. I’m glad you were able to get it figured out.

If there is anything else we can assist with, don’t hesitate to ask!

Regards,
Donny

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