Troubleshooting Nexus Startup Issues

Here are some of the more common reasons a Nexus instance might fail to start.

Unsupported Version of Java

Nexus 2.5 and older requires a Sun/Oracle/IBM JRE version 1.6 or higher in order to run. Nexus 2.6 requires a 1.7 JRE.

Also there are know problems with very early versions of Oracle Java 7.0, Nexus requires version 7.0u1 or later of the Oracle JRE.

By default Nexus will pick up whatever java executable is on the path. You can change this by editing $NEXUS_HOME/bin/jsw/conf/wrapper.conf and setting the "wrapper.java.command" property to the absolute path of your java executable.

If you're sure the above is correct, try running "java -version". Be sure to check not only the version, but the vendor. GCJ and OpenJDK are often shipped as the default Java on Linux systems, they don't work.

Startup Timeout

If it takes longer than the period in the wrapper.conf's "wrapper.startup.timeout" property to start Nexus then the wrapper executable will assume Nexus is hung, and restart it. After several tries it will give up.

This can happen if Nexus is run on a very heavily loaded machine. The startup time can be adjusted, but it is better to address the underlying problem.

Starting In Nexus 2.5, we have disabled the automatic restart mechanism by setting the timeout to zero. This is provide Nexus administrators the ability to more easily get a thread dump from a poorly performing Nexus instance.

java.net.BindException: Address already in use

If you attempt to start up Nexus and the port specified in "nexus.properties"  ( plexus.properties in older Nexus versions ) is in use, the startup will fail.

You can figure out what ports are in use on a Linux machine by running 'nmap localhost" or "netstat -atun".

To change the port Nexus listens on read this article.

"IOException: Stream Closed"

Several of you have reported issues starting Nexus on Debian or Ubuntu when running under gjc.    If you see a IOException: Stream Closed during startup, check your JVM or JRE and read this article for the fix.

"java.lang.OutOfMemoryError: unable to create new native thread"

This error occurs when Nexus tries to create more threads than are available/allowed for the user running Nexus.  See this article for instructions on fixing this.

Have more questions? Submit a request

3 Comments

  • 0
    Avatar
    Ryan Brueske

    The path to the wrapper.conf is wrong (at least in 2.7.1), it is <nexus\_root>/bin/jsw/conf/wrapper.conf

  • 0
    Avatar
    Rich Seddon

    Thanks, for pointing that out. I've fixed this.

  • 0
    Avatar
    Peter Lynch

    We are closing this article for comments.

    If you have a support license, please contact us by submitting a support ticket.

    If you do not have a support license, please use our Nexus Users List or our other free support resources.

Article is closed for comments.
Powered by Zendesk