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

前端 未结 7 2164
日久生厌
日久生厌 2020-12-28 14:18

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 D         


        
相关标签:
7条回答
  • 2020-12-28 14:28

    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

    0 讨论(0)
  • 2020-12-28 14:31

    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.

    0 讨论(0)
  • 2020-12-28 14:33

    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.

    0 讨论(0)
  • 2020-12-28 14:36

    Solution 1

    Set java path globally

    Solution 2

    • Go to sonarqube-{version}/conf directory
    • Edit wrapper.conf file
    • Replace wrapper.java.command=java with wrapper.java.command= {path-to-your-java-bin-directory}/java

      eg: wrapper.java.command=/usr/java/bin/java

    0 讨论(0)
  • 2020-12-28 14:38

    Try using a relative path, if your Sonar Folder is located in the same root folder as your jdk. For me my sonar and jdk are both under "Program Files", which has restrictive permission, hence the error.

    E.g:

    wrapper.java.command=../../../Java/jdk-11.0.4/bin/java

    0 讨论(0)
  • 2020-12-28 14:42

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

    0 讨论(0)
提交回复
热议问题