Nuget Push fails sometimes

Hi

I am having an issue which happens sometimes when pushing a nuget package from Jenkins to Octopus Deploy.
Sometimes the nuget server can’t be resolved.
See logs bellow

OctoPack: NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
  OctoPack: Attempting to build package from 'BillAgain.Docs.nuspec'.
  OctoPack: Successfully created package 'C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\obj\octopacked\BillAgain.Docs.1.0.4147.nupkg'.
  OctoPack: Copy file: C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\obj\octopacked\BillAgain.Docs.1.0.4147.nupkg
  OctoPack: Packaging finished successfully
  Publish to repository: https://thecodegroup.octopus.app/nuget/packages
  "C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\packages\OctoPack.3.6.3\build\nuget.exe" push "C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\obj\octopacked\BillAgain.Docs.1.0.4147.nupkg" **** -Source https://thecodegroup.octopus.app/nuget/packages 
  NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
  Pushing BillAgain.Docs.1.0.4147.nupkg to 'https://thecodegroup.octopus.app/nuget/packages'...
    PUT https://thecodegroup.octopus.app/nuget/packages/
  An error was encountered when fetching 'PUT https://thecodegroup.octopus.app/nuget/packages/'. The request will now be retried.
  An error occurred while sending the request.
    The remote name could not be resolved: 'thecodegroup.octopus.app'
    PUT https://thecodegroup.octopus.app/nuget/packages/
  An error was encountered when fetching 'PUT https://thecodegroup.octopus.app/nuget/packages/'. The request will now be retried.
  An error occurred while sending the request.
    The remote name could not be resolved: 'thecodegroup.octopus.app'
    PUT https://thecodegroup.octopus.app/nuget/packages/
  The remote name could not be resolved: 'thecodegroup.octopus.app'
C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\packages\OctoPack.3.6.3\build\OctoPack.targets(109,5): error MSB3073: The command ""C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\packages\OctoPack.3.6.3\build\nuget.exe" push "C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\obj\octopacked\BillAgain.Docs.1.0.4147.nupkg" **** -Source https://thecodegroup.octopus.app/nuget/packages " exited with code 1. [C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\BillAgain.Docs.csproj]
Done Building Project "C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\BillAgain.Docs.csproj" (Clean;Build target(s)) -- FAILED.

Build FAILED.

I tried a few build one after each other all failing, then this one was successful.
From the logs it first could not resolve the remote name for the octopus server, then I retried and it worked.
See logs

  OctoPack: NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
  OctoPack: Attempting to build package from 'BillAgain.Docs.nuspec'.
  OctoPack: Successfully created package 'C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\obj\octopacked\BillAgain.Docs.1.0.4147.nupkg'.
  OctoPack: Copy file: C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\obj\octopacked\BillAgain.Docs.1.0.4147.nupkg
  OctoPack: Packaging finished successfully
  Publish to repository: https://thecodegroup.octopus.app/nuget/packages
  "C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\packages\OctoPack.3.6.3\build\nuget.exe" push "C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\obj\octopacked\BillAgain.Docs.1.0.4147.nupkg" **** -Source https://thecodegroup.octopus.app/nuget/packages 
  NuGet Version: 3.5.0.38733 (Custom build for OctoPack. See http://g.octopushq.com/VersioningInOctopusDeploy)
  Pushing BillAgain.Docs.1.0.4147.nupkg to 'https://thecodegroup.octopus.app/nuget/packages'...
    PUT https://thecodegroup.octopus.app/nuget/packages/
  An error was encountered when fetching 'PUT https://thecodegroup.octopus.app/nuget/packages/'. The request will now be retried.
  An error occurred while sending the request.
    The remote name could not be resolved: 'thecodegroup.octopus.app'
    PUT https://thecodegroup.octopus.app/nuget/packages/
    Created https://thecodegroup.octopus.app/nuget/packages/ 10025ms
  Your package was pushed.
Done Building Project "C:\Program Files (x86)\Jenkins\workspace\BillAgainSvnTrunk\BillAgain.Docs\BillAgain.Docs.csproj" (Clean;Build target(s)).

Build succeeded.

Hi,

Thanks for getting in touch. The most likely cause of this is a DNS replication issue. Are you able to provide some details about how the Jenkins server is hosted and the network configuration around it? These type of issues can occur, for example, if you have multiple DNS servers and one of them hasn’t updated with the record for thecodegroup.octopus.app. If you happen to hit that server on your DNS request it’ll fail, if you happen to hit one of the others that has the record it’ll succeed.

Regards
Shannon

Hey, thanks for the reply

The Jenkins box is on a Windows VM on a dedicated box in an OVH France datacentre.
The ethernet IPv4 DNS Server is 213.186.33.99 which is an OVH DNS server
There are no other DNS Servers set.

I tried pinging the Url from the Jenkins server and at first we get no IP then after a while we get an ip (with a timeout which I assume is due to the DNS rejecting pings)

Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Adm1nAccount>ping thecodegroup.octopus.app
Ping request could not find host thecodegroup.octopus.app. Please check the name and try again.

C:\Users\Adm1nAccount>ping thecodegroup.octopus.app
Ping request could not find host thecodegroup.octopus.app. Please check the name and try again.

C:\Users\Adm1nAccount>ping thecodegroup.octopus.app
Ping request could not find host thecodegroup.octopus.app. Please check the name and try again.

C:\Users\Adm1nAccount>ping thecodegroup.octopus.app

Pinging thecodegroup.octopus.app [52.41.91.212] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 52.41.91.212:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Users\Adm1nAccount>

It then works for a period then it runs through the same issue again.
I assume this happens again when the DNS records expire

I don’t think the Octopus cloud servers are configured to respond to ping, so the request time outs aren’t too surprising. Not finding the host though is certainly point towards a DNS issue.

Would you be able to run nslookup thecodegroup.octopus.app and tracert thecodegroup.octopus.app and see if the results look right?

Here are my results.
Should I change to a different DNS server or add a fallover?

C:\Users\Adm1nAccount>nslookup thecodegroup.octopus.app
Server:  cdns.ovh.net
Address:  213.186.33.99

Non-authoritative answer:
Name:    thecodegroup.octopus.app
Address:  52.41.91.212
C:\Users\Adm1nAccount>tracert thecodegroup.octopus.app
Unable to resolve target system name thecodegroup.octopus.app.
C:\Users\Adm1nAccount>tracert thecodegroup.octopus.app

Tracing route to thecodegroup.octopus.app [52.41.91.212]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  54.38.177.252
  2    <1 ms    <1 ms    <1 ms  10.50.177.125
  3    <1 ms    <1 ms    <1 ms  10.17.145.122
  4    <1 ms    <1 ms    <1 ms  10.73.0.44
  5     1 ms     1 ms     1 ms  10.95.33.8
  6     3 ms     3 ms     3 ms  be100-1107.ldn-1-a9.uk.eu [91.121.215.179]
  7    69 ms    69 ms    69 ms  be100-1295.nwk-1-a9.nj.us [192.99.146.127]
  8    74 ms    75 ms    75 ms  be100-1039.ash-1-a9.va.us [198.27.73.203]
                                                 9   130 ms   130 ms   131 ms  be100-1366.lax-la1-bb1-a9.ca.us [178.32.135.157]
 10   137 ms   136 ms   137 ms  be100-1365.sjo-sv5-bb1-a9.ca.us [198.27.73.105]
 11   138 ms   138 ms   138 ms  equinix01-sfo5.amazon.com [206.223.116.177]
 12     *        *        *     Request timed out.
 13     *        *        *     Request timed out.

We’ve done more testing from our end and can’t see any issues.

One point of interest is that I think you’d normally expect the first hop on the tracert to hit the same IP as the server from the nslookup (cdns.ovh.net(213.186.33.99) in your case). It certainly did that in our testing from a number of locations.

Unfortunately this is about the limit of the what I can assist with from here, I’d recommend contacting support for the datacentre to see if they can help understand what is happening.

Regards
Shannon

Thanks
We switched to another dns server and issue is not happening anymore.

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