From what I can tell the 3.71.0
tag is the same as 3.71.0-java17-ubi
and 3.71.0-ubi
(see: https://hub.docker.com/r/sonatype/nexus3/tags?page=&page_size=&ordering=&name=3.71 and compare the digest codes).
That said you are correct - after this whole ordeal I’m also getting Duplicate key
errors.
Quick googling found this thread: Cannot upload after OrientDB to H2 migration: Unique index or primary key violation · Issue #449 · sonatype/nexus-public · GitHub
There seems to be a script there which solves the issue. I’m going to give it a go after breakfast. Also worth noting that the script author has also provided instructions a few responses further on how to execute this in a docker-based instance.
EDIT: The script from Github appears to work and seems to have fixed the issue.
Instructions for running the script when dealing with a dockerized Nexus:
- copy the script to an
.sh
file - modify the script as needed to point to the docker-based location for
NEXUS_DATA
and the followingNEXUS_BIN
:
NEXUS_BIN=/opt/sonatype/nexus/
NEXUS_DATA=/nexus-data/db
- bind/mount the created
.sh
file to your Nexus container and run it by overriding theentrypoint
parameter - if all went well then remove the overridden
entrypoint
and remove the script bind to cleanup - restart your Nexus container as normal