Jenkins启动失败后指向ssl cert和key

时间:2017-11-27 09:43:41

标签: jenkins

  • Jenkins 2.73.3
  • Java(TM)SE运行时环境(版本1.8.0_151-b12) Java HotSpot(TM)64位服务器VM(版本25.151-b12,混合模式)
  • 红帽企业Linux服务器版本7.4(Maipo)

SSL证书和密钥:

[root@l5109p ssl]# ls -lrt /etc/security/ssl/
-rw-r-----. 1 jenkins jenkins  2894 Nov 27 09:17 jenkins_wildcard.sss.se.com.cert.pem
-rw-r-----. 1 jenkins jenkins  1766 Nov 27 09:18 jenkins_wildcard.sss.se.com.key.pem

在/ etc / sysconfig / jenkins中,我添加了以下条目:

JENKINS_ARGS="--httpsPort=8443 --httpsCertificate=/etc/security/ssl/jenkins_wildcard.sss.se.com.cert.pem --httpsPrivateKey=/etc/security/ssl/jenkins_wildcard.sss.se.com.key.pem"

启动jenkins服务时,它失败并出现以下错误:

Running from: /usr/lib/jenkins/jenkins.war
Nov 27, 2017 9:42:17 AM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file /tmp/winstone/jenkins.war
Nov 27, 2017 9:42:17 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @393ms to org.eclipse.jetty.util.log.JavaUtilLog
Nov 27, 2017 9:42:17 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
Nov 27, 2017 9:42:17 AM org.eclipse.jetty.server.handler.ContextHandler setContextPath
WARNING: Empty contextPath
Nov 27, 2017 9:42:17 AM winstone.Logger logInternal
INFO: Winstone shutdown successfully
java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
        at winstone.Launcher.spawnListener(Launcher.java:209)
        at winstone.Launcher.<init>(Launcher.java:150)
        at winstone.Launcher.main(Launcher.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at Main._main(Main.java:294)
        at Main.main(Main.java:132)
Caused by: java.lang.IllegalArgumentException: Not B64 encoded
        at org.eclipse.jetty.util.B64Code.decode(B64Code.java:428)
        at org.eclipse.jetty.util.B64Code.decode(B64Code.java:391)
        at winstone.AbstractSecuredConnectorFactory.readPEMRSAPrivateKey(AbstractSecuredConnectorFactory.java:131)
        at winstone.AbstractSecuredConnectorFactory.configureSsl(AbstractSecuredConnectorFactory.java:75)
        at winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:41)
        at winstone.Launcher.spawnListener(Launcher.java:207)
        ... 8 more
Nov 27, 2017 9:42:17 AM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
        at winstone.Launcher.spawnListener(Launcher.java:209)
        at winstone.Launcher.<init>(Launcher.java:150)
        at winstone.Launcher.main(Launcher.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at Main._main(Main.java:294)
        at Main.main(Main.java:132)
Caused by: java.lang.IllegalArgumentException: Not B64 encoded
        at org.eclipse.jetty.util.B64Code.decode(B64Code.java:428)
        at org.eclipse.jetty.util.B64Code.decode(B64Code.java:391)
        at winstone.AbstractSecuredConnectorFactory.readPEMRSAPrivateKey(AbstractSecuredConnectorFactory.java:131)
        at winstone.AbstractSecuredConnectorFactory.configureSsl(AbstractSecuredConnectorFactory.java:75)
        at winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:41)
        at winstone.Launcher.spawnListener(Launcher.java:207)
        ... 8 more

0 个答案:

没有答案