Nexus silently fails very early into startup

Hi!

I’ll get right to the point, I’m a bit of an amateur programmer, have been using maven for a long time and am brand new to nexus.

Through following a tutorial yesterday, I downloaded and successfully set up Nexus 3.41.1, which on use, said that the version was affected by the Log4J exploit. So I attempted first to use 3.70.1, then 3.68.1 using the exact same steps, however these 2 versions are both failing and will not start.

These are the exact setup steps I’m using:

  1. wget tar
  2. decompile tar
  3. mv to /opt so both the nexus and sonatype-work are in /opt
  4. change run_as_user in nexus.rc to “nexus” and uncomment it
  5. change Xms, Xmx and -XX:MaxDirectMemorySize to 1024m
  6. chown the nexus and sonatype-work directories recursively to the nexus user
  7. chmod the nexus and sonatype-work directories recursively to 770
  8. use systemctl start nexus (which runs /opt/nexus/bin/nexus start)

I’ve tried all 3 versions with both java 8 and java 11. Due to my usage case and the small scale of my projects, I want to keep the OrientDB functionality and not change to H2 or PostgreSQL. There is currently no data on my nexus repository due to me trying to upgrade it and waiting until I manage, so I’m happy to do clean installs where needed.

After about 30 seconds 3.41.1 fully sets up and starts working, and I can access it on my server and browser totally fine. When 3.68.1 and 3.70.1 are started, they immediately fail, do not generate a log file or any files on sonatype_work/nexus3/log/ (which includes jvm.log), do not output any errors to journalcte -xeu nexus.service and just lie in an error state with systemctl status nexus. Starting and checking the status of nexus directly using the nexus.exe also says that it’s not starting, but is not saying why.

Does anyone know any further set up steps I need or am missing between this big version gap? I’ve tried swapping java versions between 8, 11 and 17, I’ve tried changing the heap size, all of which isn’t helping.

Thanks!

Hi James,

Have you tried running Nexus with the run parameter, so it shows output immediately in the console window?

Change directory to the bin folder (/opt/nexus/bin)
./nexus run

See if that provides enough output to troubleshoot.

Also, in the nexus file, there is a run as line:
# user to execute as; optional but recommended to set
run_as_user=‘’

You don’t have to set it, but I always do: run_as_user=‘nexus’

Lastly, usually when I run into the situation that you are currently, it has something to do with the JVM, if that doesn’t start, nothing else will.

Double check your nexus.vmoptions and make sure that there is nothing badly formatted or such.

Easiest way to troubleshoot that file is to not change anything in it. Use the Java that is the System Java and don’t worry about memory settings.

I hope something said here helps.

John

Hi John!

Thank you so much! That worked perfectly! I created a nexus user for it anyway and had it running off that, but when you mentioned running it, it told me exactly what the issue was. Guess what it was!!

My inability to read!
image

All working perfectly now, thanks so much!

1 Like