Jenkins builds, uses Octo.exe to push to Octopus, and it times out with this message from Jenkins:
Pushing LibertyMutual.Staging2.1.1.118.nupkg to 'http://deploy/nuget/packages'... PUT http://deploy/nuget/packages/ An error was encountered when fetching 'PUT http://deploy/nuget/packages/'. The request will now be retried. The HTTP request to 'PUT http://deploy/nuget/packages/' has timed out after 100000ms. PUT http://deploy/nuget/packages/ An error was encountered when fetching 'PUT http://deploy/nuget/packages/'. The request will now be retried. The HTTP request to 'PUT http://deploy/nuget/packages/' has timed out after 100000ms. PUT http://deploy/nuget/packages/ A task was canceled. Pushing took too long. You can change the default timeout of 300 seconds by using the -Timeout <seconds> option with the push command.
On the Octopus side, I have this in the diagnostics:
Unhandled exception from web server: One or more errors occurred. System.Net.HttpListenerException (0x80004005): Incorrect function at System.Net.HttpRequestStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at Nancy.Extensions.StreamExtensions.<>c__DisplayClass3.<CopyTo>b__2(IAsyncResult writeResult) 2017-01-09 17:06:45 Error Unhandled exception from web server: One or more errors occurred. System.Net.HttpListenerException (0x80004005): An operation was attempted on a nonexistent network connection at System.Net.HttpRequestStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at Nancy.Extensions.StreamExtensions.<>c__DisplayClass3.<CopyTo>b__2(IAsyncResult writeResult)
I’m not 100% that they’re related, as the time codes don’t line up perfectly. This is a LARGE package, and smaller packages seem to succeed. Making the package smaller is going to be problematic…is there some way to force Octopus to accept the package?
This means that if you upgrade your TeamCity plugin to the latest version, you should be able to add --timeout [int] in your TC Octopus step on the “Additional Arguments” field.
It doesn’t look like Octopack is propagating the timeout switch to the nuget call, so it’s still timing out. Tried lowercase, too. We’re running 3.4.7 of Octopack.
Oh you are using Octopack for the package push! Your initial sentence confused me a bit: Jenkins builds, uses Octo.exe to push to Octopus
To setup a timeout for the package push in Octopack you need to pass the argument to msbuild like this: “/p:OctoPackNuGetPushProperties=-Timeout=55000”.
That single argument should be double-quoted, so the whole thing would look like
This e-mail transmission may contain confidential information or may be otherwise legally privileged. If you are not the intended recipient you are hereby notified that any use, disclosure, copying, forwarding, or distribution of any of the information contained in or attached to this message is STRICTLY PROHIBITED.
This e-mail transmission may contain confidential information or may be otherwise legally privileged. If you are not the intended recipient you are hereby notified that any use, disclosure, copying, forwarding, or distribution of any of the information contained in or attached to this message is STRICTLY PROHIBITED.
That behavior sounds a lot like this regression bug from Nuget: https://github.com/dotnet/core-setup/pull/1187 . I’m gonna pass this to our team to get some thoughts and get back to you.
In the meantime and to get you up and running: Octopack is only 1 of the ways to create a Nuget package and push it to Octopus. Another one that I personally like more is to hook up Octo.exe in your build steps to pack and push your package. You can read more about this console app here: