Every once in a while I receive an error at the end of my build like:
C:\Builds\1\Pulse\Pulse\src\Trunk\packages\OctoPack.3.0.44\tools\OctoPack.targets (105): The command "“C:\Builds\1\Pulse\Pulse\src\Trunk\packages\OctoPack.3.0.44\tools\NuGet.exe” push “C:\Builds\1\Pulse\Pulse\src\Trunk\Pulse.Web\obj\octopacked\Pulse.Web.22.214.171.124.nupkg” API-AJFU33JMOUSEYMICKYOVQ72C1UB -s http://hh1-ggg-blda-02.dev.local/nuget/packages " exited with code 1.
I will run the build again and it will succeed. There is no other package with the number 126.96.36.199, so that isn’t the issue. I look through the log and there are no more details than what is displayed above. I can’t find anything on the server, I don’t think it made it there yet (unless there some type of http log I am not aware of). How do I go about troubleshooting this?
Octopus version 3.1.4
OctoPack version 3.0.44
Building on TFS 2013
This is a public forum, your API key and Octopus server url were posted unobfuscated. You may want to change your API key. I’ve marked the thread as private.
I would try calling
NuGet.exe push directly instead of through OctoPack. You might get a more detailed error code in your logs to help troubleshoot. You could also pass
-verbosity detailed to NuGet.exe.
There error is not very helpful, is it? I’ll have a look at what we can do better in OctoPack to make it more helpful. I have a feeling NuGet is returning something that OctoPack is not logging.
The API is actually obfuscated, hence the Micky Mouse within. I have made this post public so it may help others.
Thanks I will try that. Not actually sure where I would use `-verbosity detailed’. I am assuming if I call Nuget directly or updating the OctoPack command.
I have tried running this from the command line many times hoping for more of a message, though to date it has always succeeded when I have done that.
Ah, I didn’t catch the Micky Mouse.
At the end of your build I imagine you have /p:OctoPackPublishPackageToHttp? Instead of that, would it be possible to add another step that calls NuGet.exe directly, like this:
"NuGet.exe" push "C:\Builds\1\Pulse\Pulse\src\Trunk\Pulse.Web\obj\octopacked\Pulse.Web.188.8.131.52.nupkg" API-AJFU33JMOUSEYMICKYOVQ72C1UB -s http://hh1-ggg-blda-02.dev.local/nuget/packages "
You can pass
-verbosity detailed to NuGet.exe or by using the
OctoPackNuGetArguments parameter with OctoPack.
Is there a variable I can use to know what the current package and path is? Can’t really hard code that stuff.
Here is what the command looks like in OctoPack:
$(OctoPackNuGetExePath)" push "@(OctoPackBuiltPackages)" $(OctoPackPublishApiKey) -s $(OctoPackPublishPackageToHttp) $(OctoPackNuGetPushProperties)
You may be able to use
@(OctoPackBuiltPackages) as the variable for the package to push.
So I did get a error out of the log:
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
I found there was more detail further up in the log where the OctoPack steps are logged.
Being intermittent probably something with our environment. I was never able to add another step for the nuget push.