How to resolve "manifest invalid" error when running task "Purge unused docker manifests and images"

If you see the following error in the Nexus logs when running the task "Purge unused docker manifests and images", then you have hit a bug where a docker blob has been misidentified as a manifest.

 

2017-07-05 06:06:35,729+0000 ERROR [quartz-1-thread-1] *SYSTEM org.sonatype.nexus.repository.docker.internal.DockerGCTask - Failed to run task 'Purge unused docker manifests and images' on repository 'Docker'
org.sonatype.nexus.repository.docker.internal.V2Exception$ManifestInvalid: manifest invalid

 

See the following jira for more details.

https://issues.sonatype.org/browse/NEXUS-12962

Below are the recovery steps:

  1. Shutdown Nexus
  2. Make a backup of "sonatype-work/nexus3/db/component".
  3. Then open a command prompt and run:

    java -jar <nrexus-install>/lib/support/nexus-orient-console.jar

  4. This will open a prompt. At that prompt execute the following commands (you may need to change depending on your sonatype work location):

    connect plocal:sonatype-work/nexus3/db/component admin admin

    update asset set attributes.docker.asset_kind='BLOB' where format='docker' and name like '%/blobs/%' and attributes.docker.asset_kind='MANIFEST'

    exit

  5. This will convert this blobstore file back into an asset of type "BLOB" which is what is should be.
  6. After executing the above commands restart the server.
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk