项目场景:
tomcat安装Jenkins启动,或者Windows直接安装后,启动安装插件报错
问题描述
安装插件,或tomcat启动命令界面报错-PKIX 路径建设失败和找不到要求目标的有效证明路径
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target Relevant discussions can be found on the Internet at: http://www.google.co.jp/search?q=d35baff5 or http://www.google.co.jp/search?q=1446302e TwitterException{exceptionCode=[d35baff5-1446302e 43208640-747fd158 43208640-747fd158 43208640-747fd158], statusCode=-1, message=null, code=-1, retryAfter=-1, rateLimitStatus=null, version=3.0.5} at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:177) at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61) at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:81) at twitter4j.TwitterImpl.get(TwitterImpl.java:1929) at twitter4j.TwitterImpl.search(TwitterImpl.java:306) at jku.cc.servlets.TweetsAnalyzer.main(TweetsAnalyzer.java:38) Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Unknown Source) at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.Handshaker.fatalSE(Unknown Source) at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) at sun.security.ssl.Handshaker.processLoop(Unknown Source) at sun.security.ssl.Handshaker.process_record(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 sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) at twitter4j.internal.http.HttpResponseImpl.<init>(HttpResponseImpl.java:34) at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:141) ... 5 more Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(Unknown Source) at sun.security.validator.PKIXValidator.engineValidate(Unknown Source) at sun.security.validator.Validator.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.validate(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) ... 20 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source) at java.security.cert.CertPathBuilder.build(Unknown Source) ... 26 more Failed to search tweets: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
原因分析:
通过各种论坛、博客、帖子查看,得出结论。假如安装了java8,可能是java不支持部分功能Jenkins所需的了。
1.jdk版本过低
2.jdk不支持版本证书
解决方案:
1.升级jdk在11级,我直接解决了这个问题
2.替换低版本jdk这个网上有很多教程,比较复杂。推荐喜欢动手的优秀人才操作。
把所需的证书放在里面C -> 程序文件 -> java -> jre -> lib -> 安全位置
3.其他待发现的。
Jenkins:报错Build step ‘Execute Windows batch command‘ marked build as faiure解决办法
问题描述

构建虽然失败了,但是命令却是执行成功了, 问题就在于:Build step 'Execute Windows batch command' marked build as failure
原因:
jenkins 执行命令,会把命令生成一个批处理文件执行,而 pybot 命令对于批处理来说是外部命令,所以要加 call 表示调用。而 jenkins 执行 windows 命令; 若退出代码不为0 ,则 jenkins 会将构建标记为失败,所以需要加上 exit 0 表示执行完成退出
Jenkins-查看HTML测试报告-样式不显示问题解决
1.在jenkins系统管理中输入以下脚本运行:System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "")
1找到系统管理-脚本命令行,如下图
输入 System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "" 并执行,如下图
2.清空本地浏览器缓存;
3.重新登录Jenkins查看即可;