Unable to download package: One or more errors occurred. …
System.Exception: Error downloading …
See error-output.txt for the raw details
The issue only happens when the Octopus server itself needs a package, tentacles download packages fine.
What we see:
zero bytes files created server cache, example D:\Octopus\OctopusServer\PackageCache\feeds-klondike\OctopusScripts.1.0.170105.88_54E4BE37DEA29B4BB43933697C8EED62.nupkg
We see Octopus Server making successful request to Klondike
Unfortunately I haven’t been able to reproduce the issue you are seeing running a script from a package on the Octopus Server.
Would you mind trying with a package from NuGet (https://www.nuget.org/api/v2/) and seeing if you have any luck? (for example the OctoPack package)
Can you retrieve your package using NuGet.exe (https://dist.nuget.org/index.html) while on the Octopus Server? You may need to add your repository using NuGet.exe sources and then install with NuGet.exe install.
Hi Shane, thanks for your help and sorry for the late response.
I have tried other NuGet feeds it fails on all of them. NuGet.exe works fine, using same package, folder, username… it is definitely not the Feed itself.
Out of desperation I have build a new Octopus Server, same version, same network, same users and after setting up a test project it works fine!
So my guess now is that something is corrupted in my existing Octopus Server and my efforts are now around restoring Octopus data into this new empty server.
Does a new Octopus instance on the same box have problems accessing NuGet feeds?
Does uninstalling and re-installing help? (You can uninstall without losing your instances, just make sure to take a backup of your master key).
My first instinct was a network issue (proxy/firewall) but if you can access from the same network and via NuGet.exe it seems unlikely. I could make a utility that does the same download process to help us debug the issue but if you are committed moving to the new server it may not be worth it.
I think the problem you are encountering is because the master key contained in the Server.config file you copied over can not be used on another machine. When you set up the new instance you will need to point it at your duplicated Octopus database and enter the master key of your old instance. This will create a new Server.config with a master key encrypted for use on your new machine - do not replace this one with your old one.
So we restored the DB and the home folder in another server (deleting the OctopusServer.config), then run the installation entering the master key.
The new server clone starts fine and Nuget feeds work fine again so all fixed.
My guess is the old Octopus server installation was corrupted in some way (it has had a lot of upgrades over the years), maybe a re-install would have fixed it but I was trying solutions that were always leaving the old server intact.