Sonar Adding a new project

断了今生、忘了曾经 提交于 2019-12-01 05:38:32

问题


I am trying to add a new project into sonar. When running sonar runner, I'm getting the following error, Can anyone please help me on this.

sonar-runner

Runner configuration file: /opt/lampp/htdocs/typo3/sonar-runner-1/conf/sonar-
runner.properties
Project configuration file: /opt/lampp/htdocs/typo3/sonar-project.properties
Runner version: 2.0
Java version: 1.6.0_24, vendor: Sun Microsystems Inc.
OS name: "Linux", version: "2.6.38-8-generic", arch: "i386"
Default locale: "en_IN", source code encoding: "UTF-8"
Server: http://localhost:9000
Work directory: /opt/lampp/htdocs/typo3/.sonar
Total time: 1:00.153s
Final Memory: 0M/30M
Exception in thread "main" java.lang.IllegalStateException: Fail to request server 
version
    at org.sonar.runner.Bootstrapper.getServerVersion(Bootstrapper.java:73)
    at org.sonar.runner.Runner.checkSonarVersion(Runner.java:220)
    at org.sonar.runner.Runner.execute(Runner.java:15
at org.sonar.runner.Main.execute(Main.java:84)
at org.sonar.runner.Main.main(Main.java:56)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read1(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.URLConnection.getContent(Unknown Source)
at org.sonar.runner.Bootstrapper.remoteContent(Bootstrapper.java:125)
at org.sonar.runner.Bootstrapper.getServerVersion(Bootstrapper.java:71)
... 4 more

XXXXXXXXX:/opt/lampp/htdocs/typo3$ `

回答1:


OK I found the fix by myself , My sonar was working in a port 9005 so i have set url sonar.properties files.




回答2:


The message "Fail to request server" explicitly states that this is something related to the Sonar server. Either it is not available (it might be down), or your configuration is not correct.



来源:https://stackoverflow.com/questions/14272135/sonar-adding-a-new-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!