Nuget download failed, but for 1 package / 1 server, other packages/servers work fine

We have 5 Projects and 5 Servers in 4 Environments. Since 3.0 our DevServer is failing to download a projects package.

The log indicates, that the download is failing (“The connection with the remote server cannot be established”), because no connection can be made with the (teamcity) nuget server. But this cant be true in general, because the other 4 projects can be downloaded/deployed to that server.

Here is the verbose output of the failing package/server,
at the bottom the message of the same tentacle with succesing package:


Checking package cache for package Titan 5.4.1.26-marketplace
08:26:47
Verbose
Downloading NuGet package Titan 5.4.1.26-marketplace from feed: 'http://192.168.42.41/guestAuth/app/nuget/v1/FeedService.svc/'
08:26:47
Verbose
Downloaded package will be stored in: 'D:\Octopus\Files\feeds-teamcity-nuget'
08:26:47
Verbose
Finding package (attempt 1 of 5)
08:27:10
Verbose
...
Verbose
Attempt 4 of 5: Unable to download package: Die Verbindung mit dem Remoteserver kann nicht hergestellt werden.
08:28:25
Verbose
Finding package (attempt 5 of 5)
08:28:45
Verbose
Attempt 5 of 5: Unable to download package: Die Verbindung mit dem Remoteserver kann nicht hergestellt werden.
08:28:50
Error
Unable to download package: Die Verbindung mit dem Remoteserver kann nicht hergestellt werden.
08:28:50
Error
Failed to download package Titan 5.4.1.26-marketplace from feed: 'http://192.168.42.41/guestAuth/app/nuget/v1/FeedService.svc/'
08:28:50
Error
System.Exception: The package could not be downloaded from NuGet. If you are getting a package verification error, try switching to a Windows File Share package repository to see if that helps.
08:28:50
Error
   bei Calamari.Integration.PackageDownload.PackageDownloader.AttemptToDownload(String packageId, SemanticVersion version, Uri feedUri, String cacheDirectory, String& downloadedTo, IPackage& downloaded) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:Zeile 153.
08:28:50
Error
   bei Calamari.Integration.PackageDownload.PackageDownloader.DownloadPackage(String packageId, SemanticVersion version, String feedId, Uri feedUri, Boolean forcePackageDownload, String& downloadedTo, String& hash, Int64& size) in y:\work\b1fd300731d5f2fc\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:Zeile 46.
08:28:50
Error
   bei Calamari.Commands.DownloadPackageCommand.Execute(String[] commandLineArguments) in y:\work\b1fd300731d5f2fc\source\Calamari\Commands\DownloadPackageCommand.cs:Zeile 60.
Downloading packages
08:25:07
Info
Making a list of packages to download
08:25:07
Verbose
Checking package cache for package Elara.Service 1.0.340
08:25:07
Verbose
Package Elara.Service version 1.0.340 was found in cache. No need to download. Using file: E:\Octopus\OctopusServer\PackageCache\feeds-teamcity-nuget\Elara.Service.1.0.340_64E0AF8D5C28CE41AE065911B2564D5D.nupkg
08:25:07
Verbose
SHA1 hash of package Elara.Service is: f5ef03c0b6f39a13668f42b46a088f3c20286513
08:25:07
Verbose
Checking package cache for package Elara.WebApi 1.0.340
08:25:07
Verbose
Package Elara.WebApi version 1.0.340 was found in cache. No need to download. Using file: E:\Octopus\OctopusServer\PackageCache\feeds-teamcity-nuget\Elara.WebApi.1.0.340_13FAE4E8AAE8E0409C9E0A8E674AEE1F.nupkg
08:25:07
Verbose
SHA1 hash of package Elara.WebApi is: a0a7bde3a39a107ed7dfd75c580241775e365da6
08:25:13
Info
All packages have been downloaded
08:25:13
Verbose
Acquire Packages completed


Package Elara.Service 1.0.340 hash f5ef03c0b6f39a13668f42b46a088f3c20286513 has already been uploaded
08:25:11
Info
Package Elara.Service 1.0.340 found in cache. No need to upload. Using D:\Octopus\Files\Elara.Service.1.0.340.nupkg-a4489f05-fe99-427f-9841-5f45e2f482bf

Hi Jakub,
Looking at your 2 provided logs it appears as though the “successful” deployment is actually using the package that has previously been downloaded and already exists on the Tentacle.

Checking package cache for package Elara.Service 1.0.340.
Package Elara.Service version 1.0.340 was found in cache. No need to download. Using file: E:\Octopus\OctopusServer\PackageCache\feeds-teamcity-nuget\Elara.Service.1.0.340_64E0AF8D5C28CE41AE065911B2564D5D.nupkg

The error on the other deployment

Attempt 4 of 5: Unable to download package: Die Verbindung mit dem Remoteserver kann nicht hergestellt werden.
which translated sounds like it is indeed having problems connecting.

My bet is that if you force the “successful” deployment to re-fetch the package from the repository it will probably have the same failure.
Have the credentials/endpoint changed at all?
Cheers,
Rob

Hi,

no credentials have changed (the feed is public in the private network). The other tentacles dont have these issues. But the cache message got me thinking and recheck the log. The difference is that for all packages/server combinations the package will be uploaded:

Upload package Elara.Service 1.0.340
08:25:11
Info
Package Elara.Service 1.0.340 found in cache. No need to upload. Using D:\Octopus\Files\Elara.Service.1.0.340.nupkg-a4489f05-fe99-427f-9841-5f45e2f482bf

While for the failing package/server the server tries to download the package:

Download package Titan 5.4.1.26-marketplace from http://192.168.42.41/guestAuth/app/nuget/v1/FeedService.svc/
07:23:49
Info
Downloading NuGet package Titan 5.4.1.26-marketplace from feed: 'http://192.168.42.41/guestAuth/app/nuget/v1/FeedService.svc/'

So i changed the Download Option of this package and Voiilá, it works. So it seems that this particulary server has some connectivity issues with the teamcity nuget server (isnt port 80 being used here for download?). And the package was the only one configured with “Each Tentacle will download the package directly from the NuGet server”.

Thanks for bringing the cache up! (actually it was the octopus server cache here)

Jakob

Jakob,
Great to hear you got this one sorted out. Sometimes all it takes is another set of eyes on the same problem to bring up the right idea to try.
Cheers,
Rob