无法连接到SonarQube服务器

时间:2016-06-06 10:46:26

标签: sonarlint

当我尝试从sonarlint测试连接gui连接到Sonarqube服务器时,它会引发异常:

Fail to request https://sonarqube.mycompany.com/api/system/status
java.lang.IllegalStateException: Fail to request https://sonarqube.mycompany.com/api/system/status  at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:212)
    at org.sonarqube.ws.client.HttpConnector.get(HttpConnector.java:154)
    at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:143)
    at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:99)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:96)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:60)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:50)
    at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:48)
    at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:43)
    at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:225)
    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: java.io.IOException: Unexpected response code for CONNECT: 404
    at com.squareup.okhttp.internal.io.RealConnection.createTunnel(RealConnection.java:300)

1 个答案:

答案 0 :(得分:0)

根据SonarQube Web Api,端点api / system / status仅在5.2版本之后可用。

您的SonarLint版本似乎与您的SonarQube版本不兼容。我打开了这个帖子:https://groups.google.com/forum/#!topic/sonarlint/bkpPRzUyuNc

链接:https://sonarqube.com/web_api/api/system