-
Type:
Story
-
Resolution: Fixed
-
Priority:
Major
-
None
In case nexus db got corrupted and you get errors like this:
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.22.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.22.2: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.22.2 from/to nexus (https://repo.cloud.cnaf.infn.it/repository/maven-public): Failed to transfer file: https://repo.cloud.cnaf.infn.it/repository/maven-public/org/apache/maven/plugins/maven-surefire-plugin/2.22.2/maven-surefire-plugin-2.22.2.pom. Return code is: 500 , ReasonPhrase:javax.servlet.ServletException: com.orientechnologies.orient.core.exception.OPageIsBrokenException: Following files and pages are detected to be broken ['browse_node.cpm' :18251;], storage is switched to 'read only' mode. Any modification operations are prohibited. To restore database and make it fully operational you may export and import database to and from JSON.?? DB name="component". -> [Help 1]
the error can be fixed by exporting and importing the orient db as follows:
CONNECT PLOCAL:/opt/sonatype/sonatype-work/nexus3/db/component admin admin
export database component-export
drop database
create database plocal:/opt/sonatype/sonatype-work/nexus3/db/component
import database component-export.json.gz
DISCONNECT
This task is here for future reference