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 - The database model for component is 1.12, but the latest supported by this version of nexus is 1.11

start karaf console (vi nexus.vmoptions, set -Dkaraf.startLocalConsole=true then ./nexus run )
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 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 directory fixed the issue, without having to touch manually the oriondb

No comments: