Octopus download package error: Part URI is not valid per rules defined in the Open Packaging Conventions specification

I have uploaded a package into our nuget feed, and have a package deployment task in our process, but the acquire packages step is failing with the following error:

Downloading NuGet package <Package> from feed: 'http://feed/nuget/Default'
15:11:42Error
Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
15:11:42Error
Failed to download package <Package> from feed: 'http://feed/nuget/Default'
15:11:42Error
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.
15:11:42Error
   at Calamari.Integration.PackageDownload.PackageDownloader.AttemptToDownload(String packageId, SemanticVersion version, Uri feedUri, String cacheDirectory, String& downloadedTo, IPackage& downloaded) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 146
15:11:42Error
   at Calamari.Integration.PackageDownload.PackageDownloader.DownloadPackage(String packageId, SemanticVersion version, String feedId, Uri feedUri, Boolean forcePackageDownload, String& downloadedTo, String& hash, Int64& size) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 45
15:11:42Error
   at Calamari.Commands.DownloadPackageCommand.Execute(String[] commandLineArguments) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Commands\DownloadPackageCommand.cs:line 59

Looking at the raw log I can see:

                |       Running: Download package Sitecore version 8.2.2 from 

http://feed/nuget/Default
14:09:33   Verbose  |         Octopus Deploy: Calamari version 3.3.32+Branch.master.Sha.d4b60a3db38fae9b6afdec2d088705a7689dfb08
14:09:33   Verbose  |         Name                           Value
14:09:33   Verbose  |         ----                           -----
14:09:33   Verbose  |         PSVersion                      5.0.10586.117
14:09:33   Verbose  |         PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
14:09:33   Verbose  |         BuildVersion                   10.0.10586.117
14:09:33   Verbose  |         CLRVersion                     4.0.30319.42000
14:09:33   Verbose  |         WSManStackVersion              3.0
14:09:33   Verbose  |         PSRemotingProtocolVersion      2.3
14:09:33   Verbose  |         SerializationVersion           1.1.0.1
14:09:33   Verbose  |         Octopus Deploy: Calamari version 3.3.32+Branch.master.Sha.d4b60a3db38fae9b6afdec2d088705a7689dfb08
14:09:33   Verbose  |         Checking package cache for package <Package>
14:09:33   Info     |         Downloading NuGet package <Package> from feed: 'http://feed/nuget/Default'
14:09:33   Verbose  |         Downloaded package will be stored in: 'C:\Octopus\Files\feeds-'
14:09:33   Verbose  |         Finding package (attempt 1 of 5)
14:09:33   Verbose  |         Found package Sitecore version 8.2.2
14:09:33   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_E5E7A496910166469362029C4D3EBA0F.nupkg
14:09:33   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:09:33   Verbose  |         Attempt 1 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:09:33   Verbose  |         Finding package (attempt 2 of 5)
14:09:33   Verbose  |         Found package Sitecore version 8.2.2
14:09:33   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_F85FDFD2EF823C41BDBB00C7F0EB1542.nupkg
14:09:33   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:10:12   Verbose  |         Attempt 2 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:10:17   Verbose  |         Finding package (attempt 3 of 5)
14:10:17   Verbose  |         Found package Sitecore version 8.2.2
14:10:17   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_15F1514B91F27942A9EF470B11369AA7.nupkg
14:10:17   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:10:47   Verbose  |         Attempt 3 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:10:52   Verbose  |         Finding package (attempt 4 of 5)
14:10:52   Verbose  |         Found package Sitecore version 8.2.2
14:10:52   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_3A117290B32E084485CBC25FA4D17611.nupkg
14:10:52   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:11:32   Verbose  |         Attempt 4 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:11:32   Verbose  |         Finding package (attempt 5 of 5)
14:11:32   Verbose  |         Found package Sitecore version 8.2.2
14:11:32   Verbose  |         Downloading to: C:\Octopus\Files\feeds-\<Package>_E78C9F7C3950E6449F88B98A13C966A2.nupkg
14:11:32   Verbose  |         A direct download is possible; bypassing the NuGet machine cache
14:11:37   Verbose  |         Attempt 5 of 5: Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:11:42   Error    |         Unable to download package: Part URI is not valid per rules defined in the Open Packaging Conventions specification.
14:11:42   Error    |         Failed to download package <Package> from feed: 'http://feed/nuget/Default'
14:11:42   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.
14:11:42   Error    |         at Calamari.Integration.PackageDownload.PackageDownloader.AttemptToDownload(String packageId, SemanticVersion version, Uri feedUri, String cacheDirectory, String& downloadedTo, IPackage& downloaded) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 146
14:11:42   Error    |         at Calamari.Integration.PackageDownload.PackageDownloader.DownloadPackage(String packageId, SemanticVersion version, String feedId, Uri feedUri, Boolean forcePackageDownload, String& downloadedTo, String& hash, Int64& size) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Integration\PackageDownload\PackageDownloader.cs:line 45
14:11:42   Error    |         at Calamari.Commands.DownloadPackageCommand.Execute(String[] commandLineArguments) in Z:\BuildAgent\work\14ffc968155e4956\source\Calamari\Commands\DownloadPackageCommand.cs:line 59

If I log into the tentacle I can see the package is being downloaded multiple times.

What is causing the error?

Hi David,

Thanks for getting in touch. Could I just check, where do you have your NuGet packages hosted? Based on the Url, it’s a self hosted product?

Could you confirm that when you created the external feed you were able to use the Test button on the feed page and search the feed successfully for packages?

If the test works from server, is it possible there’s something on the network that would stop the tentacle from being able to connect to that Url?

Regards
Shannon

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