无法让Jenkins启动并正常运行

时间:2018-01-28 06:30:28

标签: jenkins jetty jenkins-plugins winstone

我正在关注Jenkins文档中的“入门”指南;但是,我无法让Jenkins正常运行。当我运行命令java -jar jenkins.war --httpPort=8080时,我收到一系列警告/错误,Jenkins将无法按预期运行。我无法安装任何插件或完成入门指南的下一步。

我收到的第一个警告是删除临时文件。它似乎失败了,因为该位置没有文件。

Jan 27, 2018 11:58:13 PM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file 
/var/folders/mg/r5m253mx4hz75sk1f_gn5xg80000gn/T/winstone/jenkins.war

我得到的下一个警告是Jetty警告。我不知道这里有什么问题,因为我对Jetty并不熟悉。

Jan 27, 2018 11:58:16 PM 
org.eclipse.jetty.server.handler.ContextHandler setContextPath
WARNING: Empty contextPath

下一个警告是,

Jan 27, 2018 11:58:34 PM jenkins.slaves.DeprecatedAgentProtocolMonitor 
initializerCheck
WARNING: This Jenkins instance uses deprecated Remoting protocols: CLI-
connect,CLI2-connect,JNLP-connect,JNLP2-connectIt may impact stability 
of the instance. If newer protocol versions are supported by all system 
components (agents, CLI and other clients), it is highly recommended to 
disable the deprecated protocols.

最后,我对某种类型的Hudson或认证问题进行了冗长的堆栈跟踪。

Jan 27, 2018 11:58:37 PM hudson.model.UpdateCenter updateDefaultSite
WARNING: Upgrading Jenkins. Failed to update the default Update Site 
'default'. Plugin upgrades may fail.
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(Alerts.java:192)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
    at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1513)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at hudson.model.DownloadService.loadJSON(DownloadService.java:167)
    at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:190)
    at hudson.model.UpdateCenter.updateDefaultSite(UpdateCenter.java:2194)
    at jenkins.install.SetupWizard.init(SetupWizard.java:184)
    at jenkins.install.InstallState$3.initializeState(InstallState.java:105)
    at jenkins.model.Jenkins.setInstallState(Jenkins.java:1037)
    at jenkins.install.InstallUtil.proceedToNextStateFrom(InstallUtil.java:98)
    at jenkins.model.Jenkins.<init>(Jenkins.java:927)
    at hudson.model.Hudson.<init>(Hudson.java:86)
    at hudson.model.Hudson.<init>(Hudson.java:82)
    at hudson.WebAppMain$3.run(WebAppMain.java:233)
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(PKIXValidator.java:387)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
    at sun.security.validator.Validator.validate(Validator.java:260)
    at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
    at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
    at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
    at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
    ... 23 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: 
unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382)
    ... 29 more

正如我所说的,我正在逐字逐句地遵循他们的指示,他们很简单,但它不会起作用。您可以提供的任何帮助将非常感谢。感谢。

1 个答案:

答案 0 :(得分:1)

这可能取决于您的确切设置和操作系统:例如在Docker设置中看到jenkinsci/docker issue 422,尽管这是Dockerfile works

问题包括:

  

我遇到了同样的问题,我通过删除选项&#39; --preferedClassLoader&#39;来修复它。在环境变量JENKINS_ARGS

话虽这么说,您的本地Jenkins实例可能想要连接到https站点(例如检查插件更新)。
如果是这种情况,则需要import the certificate of the remote site into your JDK keystore