Error in sonar startup, Unable to start JVM: No su

2019-02-03 09:10发布

问题:

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.

回答1:

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.



回答2:

I had the same symptoms (wrapper starts then immediately stops). I tried these steps and finally succeeded (on a windows 10 pc):

1) in wrapper.conf, specified the java command:
wrapper.java.command=C:\Program Files\Java\jdk1.7...\bin\java.exe

That did not help.

2) Finally this fixed the problem. In the windows Services, open the Sonar service and then open Log On tab. Changed the Log On to myself as follows:



回答3:

1.Just close all running jvm from task manager 2. Change the port of the sonar runner from the properties



回答4:

I was facing the same issue on sonar startup. After reading this post , i modified the JDK path in below file and it works.

  1. Modify the JDK path in wrapper.conf

  2. wrapper.java.command=%JAVA_HOME%/bin/java



回答5:

Could you verify the Java version on the machine starting?

Java 6 is no more supported http://docs.sonarqube.org/display/SONAR/Requirements#Requirements-Prerequisite but from your error message, I don't know if this is the problem you meet.