繁体   English   中英

SonarLint for Eclipse Neon无法连接到SonarQube服务器

[英]SonarLint for Eclipse Neon not connection to SonarQube server

我目前无法使用Eclipse Neon中的SonarLint连接到我的SonarQube服务器。 安装细节可以在本文的底部找到。

打开视图以通过菜单/窗口/显示视图/其他/ SonarQube服务器添加SonarQube服务器后 ,我输入了我的网络界面的URL: http://10.231.83.124:9000//10.231.83.124:9000

然后我添加用于通过webinterface登录的用户名和密码。 当按下Test Connection按钮时,我在SonarQube控制台中获得以下堆栈跟踪:

无法从服务器xxx更新数据:

java.lang.IllegalStateException
    at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.handleError(SonarLintWsClient.java:123)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:102)
    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:48)
    at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:43)
    at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:323)
    at org.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

由于我无法在网上找到有关我的问题的任何信息,我现在希望通过在线发布我的问题获得一些帮助。 我可以提供以下附加背景信息:

eclipse.buildId=4.6.1.M20160907-1200
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -data file:/opt/workspace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product

由于错误说明内容不可用,我无法通过市场安装SonarLint。 这就是为什么然后我从https://bintray.com/sonarsource/SonarLint-for-Eclipse/releases/3.0.0手动下载zip文件并使用Menu / Help / Install New Software将插件安装到Eclipse中。 。

我正在研究(cat / proc / version):

Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19)

SonarQube服务器版本为:v6.2服务器安装了以下插件版本(菜单>管理员>系统>更新中心>已安装:

  • C#5.5.1.522
  • Git 1.2
  • Java 4.3.0.7717
  • JavaScript 2.18.0.3454
  • SVN 1.3

我可以提供有关eclipse安装的以下信息: 版本:Neon.1a Release(4.6.1)Build id:20161007-1200

SonarLint的版本是3.0.0.201704111237(参见上面的下载链接:bintray.com/sonarsource/SonarLint-for-Eclipse/releases/3.0.0)。 我也可以在提供的ip上ping我的服务器。 根据网站(sonarlint.org/eclipse),SonarLint与5.6或更高版本的所有SonarQube版本兼容。 还检查了我正在使用的Java版本:java版本“1.8.0_111”Java(TM)SE运行时环境(版本1.8.0_111-b14)Java HotSpot(TM)64位服务器VM(版本25.111-b14,混合模式)

org.eclipse.equinox.p2.core.ProvisionException: Unable to read repository at sonarsource.bintray.com/SonarLint-for-Eclipse/releases/3.0.0‌​/…. ...Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

问题似乎是缺少JVM中的证书。 要添加证书,请使用以下在线指南:connect2id.com/blog/importing-ca-root-cert-into-jvm-trust-st ore

修复证书问题后,我卸载了该插件并使用Eclipse Marketplace重新安装它。 尝试连接Sonarqube服务器时仍然遇到相同的错误:

Starting SonarLint for Eclipse 3.0.0.201704111237 SonarLint analysis of file /participant/pom.xml... Starting standalone SonarLint engine 3.0.0.201704111237... Found 0 issue(s) SonarLint analysis of file /participant/src/test/java/de/mycompany/services/an/Particip‌​antTest.java... Found 0 issue(s) SonarLint analysis of project participant (3 files)... Found 3 issue(s) java.lang.IllegalStateException [...]

卸载eclipse,重新安装ecilpse neon 3而不是1a,并通过Marketplace安装插件SonarLint。 按下“测试连接”按钮后再次出现相同问题:它开始列出文件,然后在控制台中生成最初发布的堆栈跟踪,并显示在我的最后一条评论中。

设置要连接的服务器时,我输入端口作为URL的一部分:10.20.30.40:9000。 这个对吗? 如果我不提供端口9000,则返回错误503。 如果我收到不同的错误消息,我也输入了一个错误的IP只是为了看。 我再次遇到同样的错误 - 没有区别。 似乎服务器根本就不存在,但我可以ping服务器。

我还尝试了IntelliJ的SonarLint-Plugin,并且在连接服务器时遇到了同样的问题。

我的SonarQube服务器上的权限设置如下:我将一个新组myGroup添加到名为“任意”和“声纳管理员”的现有组中。

全局权限:(订单=管理系统,管理质量配置文件,管理质量门,执行分析,创建项目)

  • 任何人:0,0,0,1,0
  • 声纳管理员:1,1,1,1,1
  • myGroup:0,0,0,1,0

此外,我通过以下方式设置默认模板来配置权限模板:(顺序=浏览,请参阅源代码,管理问题,管理,执行分析)

  • 项目创建者:1,1,1,1,1
  • 任何人:1,0,0,0,0
  • 声纳管理员:0,0,1,1,0
  • myGroup:1,1,0,0,1

非常感谢您的帮助。

问候,丹尼尔

SonarQube和SonarLint需要兼容版本。 您的SonarQube是6.2,您的SonarLint怎么样? 通过为更老的SonarQube安装最新的SonarLint,我遇到了类似的错误。

此外,只是为了预留任何网络问题,你能ping你的SonarQube服务器吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM