Error "The package XXX was not found on this machine" but it's in there (but in the .Tentacle folder)

Hi guys,

A deployment fails on the error “package not found on the machine”. I’ve seen this more often but this time I investigated it. Octopus server downloads the file and uploads it to the tentacle without any error. The step where it does the actual deployment throws an exception that it can’t find the package.

The package is there in the .Tentacle folder (I see a few of them, probably from the retries).

What’s worth mentioning, I just created a new project and the all the deployments fail on this project. Maybe it’s related.

I attached the log.

Regards,
Serge

tasks-81475.txt (61 KB)

Hi Serge,

We’ve heard of this happening in two cases:

  1. Sometimes it is the case if the package is stored on a Windows file share, and the package ID is not cased correctly in the step configuration (probably not the case here), or;
  2. Using some NuGet servers, the package won’t be correctly retrieved when some elements in the package metadata (nuspec) like Title etc. are missing.

Hope this helps. (BTW, If you have an opportunity to upgrade to the latest Octopus version, we’ve done a lot of work to make this part of the process more robust.)

Regards,
Nick

One more possibility - if you have multiple steps using the same .nupkg, but the retention count set to ‘1’ or ‘0’ on the Tentacle, the package may be deleted prematurely - increasing the retention count here can help.

Hi Nick,

Thanks for the response.

We identified a problem on our side. The nuget server we’re using returned unexpected matches for that name. So Otocopus server downloaded and uploaded the incorrect package.

We are planning an upgrade of Octopus, I expect within weeks.

Thanks again!

Regards,
Serge

Thanks Serge - so that we can keep an eye out for this, can you let us know the server? (E.g. was it Artifactory?)

Regards,
Nick

Sure!

We’re using Nuget.Lucene (https://github.com/themotleyfool/NuGet.Lucene).

Regards,
Serge

Hi Guys, we’re seeing this issue with TeamCity 8.1a and the Octopus Deploy 2.1.3.1223. TeamCity hosts our NuGet repository and Octopus is configured using the guest URL for the NuGet feed.

The odd part is this has been working flawlessly for months. We had done a successful deployment of the application not 30 minutes before this problem started. The other 25 projects we have configured appear to be working fine.

Edit:

Changing the deployment process to “Each Tentacle will download the package directly from the NuGet server” solved the issue for a single deployment. Subsequent deployments after this change have all failed.

I have deleted and re-created all the process steps, deleted C:/Octopus/Applications/.Tentacle/Packages/* to clear out old data, purged the entire build history from TeamCity - all to no avail.

Hi,

If you re-deploy the same release, say 20 minutes after the build has finished or later, does it work? TeamCity’s NuGet feed isn’t always updated immediately after a build completes.

You could try pushing packages to the inbuilt Octopus NuGet feed in 2.1 instead.

Paul

Hi Paul,

The issue persisted regardless of the length of time after TeamCity’s publish. We have 25+ other builds that follow the same pattern and this one project is the only one exhibiting the issue.

One thing i had noticed is that there were many previous builds with the same version number (from testing the build process some time ago). I’m not sure if it factors into this issue however, since the package that Octopus downloaded was the correct version. Unzipping an inspecting the package showed all the current changes as well. I don’t believe this to be a case of Octopus downloading an incorrect package from TeamCity, or of the package being corrupted.

In any case, I was able to resolve the problem by re-installing the Tentacle & deleting all of the tentacle config files on the machine.

I have a backup of the files and I can post them if you think they will help.

-Brian

Hi Brian,

Thanks for the update. If this happens again, could you post the full deployment log?

Paul