Problem rebuilding packages index


We just did the upgrade to Octopus 2022.2.8011, and just saw a problem rebuilding the package index.
The task keeps running and every so much seconds, gives the following error for a couple of packages;

Error indexing package ‘\wur\dfs-root\projects\OctopusShared\Packages\Spaces-1\feeds-builtin******.’. End of Central Directory record could not be found.

System.IO.InvalidDataException: End of Central Directory record could not be found.

at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()

at System.IO.Compression.ZipArchive…ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)

at Octopus.Core.Packages.Extraction.NupkgPackageExtractor.GetIndexPackageData(String packageFile, SpaceId spaceId, ILog log) in ./source/Octopus.Core/Packages/Extraction/NupkgPackageExtractor.cs:line 52

at Octopus.Server.Orchestration.ServerTasks.SynchronizeBuiltInPackageRepositoryIndex.SynchronizeBuiltInPackageRepositoryIndexTaskController.AddFileToIndex(String file, BuiltInPackageIndex repository, ICollection`1 packagesToAddToIndex, IBuiltInPackageRepository builtInPackageRepository, ISpecificSpacePartition spacePartition) in ./source/Octopus.Server/Orchestration/ServerTasks/SynchronizeBuiltInPackageRepositoryIndex/SynchronizeBuiltInPackageRepositoryIndexTaskController.cs:line 249

at Octopus.Server.Orchestration.ServerTasks.SynchronizeBuiltInPackageRepositoryIndex.SynchronizeBuiltInPackageRepositoryIndexTaskController.<>c__DisplayClass11_0.<b__0>d.MoveNext() in ./source/Octopus.Server/Orchestration/ServerTasks/SynchronizeBuiltInPackageRepositoryIndex/SynchronizeBuiltInPackageRepositoryIndexTaskController.cs:line 173

Octopus.Server version 2022.2.8011 (2022.2.8011)

I checked one of those packages and the specific version number, but this specific package with that number is not present in the package repository anymore (has been cleaned because of the policy).

Why does this happen and how can i solve this?

Thanks in advance!

Best regards,

Hi @jeffreywels,

Thank you for contacting Octopus Support. I’m sorry you are running into this issue with re-indexing your built-in feed.

It looks like this package may have been cleaned up inside Octopus. However, the error indicates that the file still exists on-disk and is likely corrupted. Could you try manually deleting \wur\dfs-root\projects\OctopusShared\Packages\Spaces-1\feeds-builtin******. and try running the re-index again?

Let me know if that works at your earliest convenience.

Best Regards,

1 Like

Hi Donny,

That did the trick!

Thanks for the quick reply :wink:

Best regards,

1 Like