在Ubuntu上配置Jenkins以使用HTTPS

时间:2018-10-18 14:54:22

标签: jenkins

我正在尝试将Jenkins配置为在端口443下工作。我在/ etc / default / jenkins中具有以下配置:

JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT --httpsPort=$HTTP_PORT --httpsKeyStore=/var/lib/jenkins/jenkins.localhost.jks --httpsKeyStorePassword=XXXXXXXXXXX"

我已经按照Jenkins的指示进行了设置,如何设置iptables here以转发端口80-> 443,并在--httpPort和--httpsPort上尝试了多个$ HTTP_PORT值。但我不断收到异常(在/var/log/jenkins/jenkins.log上):

SEVERE: Container startup failed
java.io.IOException: Failed to start Jetty
        at winstone.Launcher.<init>(Launcher.java:186)
        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:344)
        at Main.main(Main.java:160)
Caused by: MultiException[java.net.SocketException: Permission denied, java.net.SocketException: Permission denied]
        at org.eclipse.jetty.util.MultiException.ifExceptionThrow(MultiException.java:124)
        at org.eclipse.jetty.server.Server.doStart(Server.java:409)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at winstone.Launcher.<init>(Launcher.java:184)
        ... 7 more
        Suppressed: java.net.SocketException: Permission denied
                at sun.nio.ch.Net.bind0(Native Method)
                at sun.nio.ch.Net.bind(Net.java:433)
                at sun.nio.ch.Net.bind(Net.java:425)
                at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
                at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
                at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:331)
                at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:299)
                at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
                at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
                at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
                at org.eclipse.jetty.server.Server.doStart(Server.java:398)
                ... 9 more
        Suppressed: java.net.SocketException: Permission denied
                at sun.nio.ch.Net.bind0(Native Method)
                at sun.nio.ch.Net.bind(Net.java:433)
                at sun.nio.ch.Net.bind(Net.java:425)
                at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
                at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
                at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:331)
                at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:299)
                at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
                at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
                at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
                at org.eclipse.jetty.server.Server.doStart(Server.java:398)
                ... 9 more
        [CIRCULAR REFERENCE:java.net.SocketException: Permission denied]

是否有可能完全在ubuntu(16.0.4+)下设置Jenkins以使用证书并在端口443上不使用Apache? 我在做什么错的任何线索吗?

0 个答案:

没有答案