2016-05-19 59 views
1

我公司升級爲SonarQube 5.3。這需要從Eclipse的SonarQube插件更改爲SonarLint。我很遺憾升級,因爲我的項目質量配置文件包含494條規則,並且只有12條來自Squid,所以我們有一個大型項目在Eclipse中使SonarLint變得有用。但是我試圖在我的電腦上安裝SonarLint 2.0.2。當我嘗試測試與SQ服務器的連接時,在SonarLint控制檯中出現錯誤。有什麼問題?SonarLint Eclipse連接到SonarQube服務器提供「沒有服務器聲納存儲」,請更新。「

No storage for server 'sonar'. Please update. 
Fail to request https://sonar.forge.mycompany.com:9000/api/system/status 
java.lang.IllegalStateException: Fail to request https://sonar.forge.mycompany.com:9000/api/system/status 
    at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:202) 
    at org.sonarqube.ws.client.HttpConnector.get(HttpConnector.java:144) 
    at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:133) 
    at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:98) 
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:97) 
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:61) 
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:51) 
    at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:50) 
    at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:45) 
    at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:244) 
    at org.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44) 
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) 
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? 
    at sun.security.ssl.InputRecord.handleUnknownRecord(Unknown Source) 
    at sun.security.ssl.InputRecord.read(Unknown Source) 
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) 
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) 
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) 
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) 
    at com.squareup.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:192) 
    at com.squareup.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:149) 
    at com.squareup.okhttp.internal.io.RealConnection.connect(RealConnection.java:112) 
    at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184) 
    at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126) 
    at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95) 
    at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281) 
    at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224) 
    at com.squareup.okhttp.Call.getResponse(Call.java:286) 
    at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243) 
    at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205) 
    at com.squareup.okhttp.Call.execute(Call.java:80) 
    at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:199) 
    ... 11 more 

回答

0

你專注於錯誤的事情。 「No Storage ...」信息不會阻止它的工作,我始終用最新的聲納/聲納皮棉獲得。

看看你的服務器配置。它看起來像有一個協議不匹配......

java.lang.IllegalStateException: Fail to request https://sonar.forge.mycompany.com:9000/api/system/status 
. 
. 
. 
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? 
2

端口9000是默認HTTP - 端口爲SonarQube。當配置新的服務器連接時,SonarLint建議https://

所以,如果你只需要改變

https://sonar.forge.mycompany.com:9000 

http://sonar.forge.mycompany.com:9000 

,你propably可以SonarQube連接SonarLint。

+1

聽起來不錯。當我回到使用SonarLint時,我會檢查一下。現在我要在Eclipse之外運行Sonar。我們的大部分規則都不是魷魚,所以SonarLint幾乎沒用。 :( – Sinc