Thursday, May 17, 2018

Nexus OrientDB self-upgrading versions when run as root

this is VERY weird..... be VERY careful not to run Nexus 3.10 NXRM as root, unless you have set the "run_as_user="centos" in nexus.rc

org.sonatype.nexus.upgrade.internal.UpgradeServiceImpl - The database model for component is 1.12, but the latest supported by this version of nexus is 1.11

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

https://stackoverflow.com/questions/42951710/orientdb-corruption-state-in-nexus-repository-version-3-2-0-01

https://support.sonatype.com/hc/en-us/articles/115002930827-Accessing-the-OrientDB-Console


start karaf console (vi nexus.vmoptions, set -Dkaraf.startLocalConsole=true then ./nexus run )
orient
connect plocal:data/db/config admin admin
update upgrade_model_versions set component='1.12'


restart nexus.... you will get the error

Now you can't start again Nexus...you are screwed... you must use the orient console:

java -jar ./lib/support/nexus-orient-console.jar
connect plocal:/home/centos/nexus310/sonatype-work/nexus3/db/config/ admin admin
update upgrade_model_versions set component='1.11'



Issue was that we started nexus with the user "root" and we forgot to set the actual "run_as_user" in nexus.rc
Doing a chmod on all files in the karaf.data directory fixed the issue, without having to touch manually the oriondb






No comments: