首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >在Jenkins中无法访问https://localhost:9000] SonarQube服务器

在Jenkins中无法访问https://localhost:9000] SonarQube服务器
EN

Stack Overflow用户
提问于 2018-08-27 00:23:44
回答 2查看 2.9K关注 0票数 0

我想从Jenkins中的sonarqube构建一个代码覆盖率。该项目来自github。我已经配置了所需的所有内容,但仍然出现以下错误。有人能帮我解决这个问题吗?

代码语言:javascript
复制
Established TCP socket on 59508
[OData] $ java -cp "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.12-alpha-1.jar;D:\downloads\apache-maven-3.5.4\boot\plexus-classworlds-2.5.2.jar;D:\downloads\apache-maven-3.5.4/conf/logging" jenkins.maven3.agent.Maven35Main D:\downloads\apache-maven-3.5.4 "D:\Program Files\war\WEB-INF\lib\remoting-3.21.1.jar" "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.12-alpha-1.jar" "D:\Program Files\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.12-alpha-1.jar" 59508
<===[JENKINS REMOTING CAPACITY]===>channel started
Executing Maven:  -B -f D:\Program Files\workspace\OData\pom.xml clean sonar:sonar
[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------------< OData:OData >-----------------------------
[INFO] Building OData 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ OData ---
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenArtifactArchiver$2; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.MavenFingerprinter$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] 
[INFO] ----------------------------< OData:OData >-----------------------------
[INFO] Building OData 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- sonar-maven-plugin:3.4.1.1168:sonar (default-cli) @ OData ---
[INFO] User cache: C:\WINDOWS\system32\config\systemprofile\.sonar\cache
[ERROR] SonarQube server [https://localhost:9000] can not be reached
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.056 s
[INFO] Finished at: 2018-08-27T00:09:08+08:00
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.1.1168:sonar (default-cli) on project OData: Unable to execute SonarQube: Fail to get bootstrap index from server: Unrecognized SSL message, plaintext connection? -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[JENKINS] Archiving D:\Program Files\workspace\OData\pom.xml to OData/OData/0.0.1-SNAPSHOT/OData-0.0.1-SNAPSHOT.pom
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
channel stopped
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
Skipping sonar analysis due to bad build status FAILURE
Finished: FAILURE
EN

回答 2

Stack Overflow用户

发布于 2018-09-11 23:52:11

对于您的OData项目,当您通过jenkins扫描代码时,您必须在jenkins的设置中设置主机名,不建议放置"localhost“或"127.0.0.1"

尝试使用$HOSTNAME

  1. 转到Jenkins中的设置
  2. 移动到"Sonarqube Servers"
  3. SonarQube服务器-- Sonarqube安装-即:http://myserversonarqube:9000

致以问候。

票数 1
EN

Stack Overflow用户

发布于 2018-08-27 06:06:41

下面的错误不言自明。我有以下问题

  1. 是在本地主机上运行的,端口9000是安全的(即https)?
  2. 您使用的是哪个版本的maven?有时,一些Sonar插件版本不适用于旧的maven版本。

在项目上执行目标时出错。sonarSoure.scanner.maven:sonar-maven- plugin:3.4.1.1168:sonar (OData-cli):Unable to execute SonarQube:无法从服务器获取引导索引:无法识别的SSL消息,是否为明文连接?-> Help 1

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52028135

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档