Troubleshooting Nexus Repository 2 Startup Issues

Visit for documentation on Nexus Repository version 2.

Here are some of the more common reasons a Nexus Repository 2 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 Repository 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 "" 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 Repository 2, then the wrapper executable will assume Nexus is hung, and restart it. After several tries it will give up.

This can happen if Nexus Repository 2 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. Address already in use

If you attempt to start up Nexus and the port specified in ""  ( 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 Repository 2 listens on, read this article.

"IOException: Stream Closed"

Several users have reported issues starting Nexus Repository 2 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 Repository 2 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


  • 0
    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
    Rich Seddon

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

  • 0
    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.