Error in sonar startup, Unable to start JVM: No such file or directory (2)

Rishi picture Rishi · Mar 30, 2015 · Viewed 45.8k times · Source

I am facing strange issue with sonarqube 5.0.1 , one one of the machine it is not starting. Here is the error log - sonar.log -

--> Wrapper Started as Daemon
Launching a JVM...
Unable to start JVM: No such file or directory (2)
JVM exited while loading the application.
JVM Restarts disabled.  Shutting down.
<-- Wrapper Stopped

Machine is x86_64 GNU/Linux - Centos 5.1.

this box has java installed -

$java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

The same sonarqube package works on another machine.

Any idea what could be the issue here?

Thanks.

Answer

Rishi picture Rishi · Apr 11, 2015

Issue was in the wrapper.conf where the java wrapper command was not getting resolved. It worked if I give the absolute path - ‘wrapper.java.command=/path/to/my/jdk/bin/java’

This could be an issue with an environment on a host.. not sure.

Few things that helped me in troubleshooting this -

  • log level changed to DEBUG in wrapper.conf
  • comments given in the wrapper.conf!

Thanks all for chiming in! Appreciate your inputs.