无法在Windows 10上启动Jenkins Server

时间:2019-01-21 14:58:50

标签: jenkins

我无法在Windows 10上启动Jenkins.war。尝试使用多个端口,但是对于每个端口,都收到“地址已在使用中:绑定”错误

我已经从官方网站下载了詹金斯之战,然后在本地启动服务器。

完整错误跟踪:

INFO: Shutting down a Jenkins instance that was still starting up
java.lang.Throwable: reason
        at hudson.WebAppMain.contextDestroyed(WebAppMain.java:388)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:960)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:571)
        at org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:937)
        at org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:381)
        at org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1503)
        at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1467)
        at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:1004)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:297)
        at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:149)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:170)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
        at org.eclipse.jetty.server.Server.doStop(Server.java:462)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
        at winstone.Launcher.shutdown(Launcher.java:310)
        at winstone.Launcher.<init>(Launcher.java:197)
        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)

Jan 21, 2019 2:37:00 PM jenkins.model.Jenkins cleanUp
INFO: Stopping Jenkins
Exception in thread "Jenkins initialization thread" Jan 21, 2019 2:37:00 PM org.eclipse.jetty.server.handler.ContextHandler doStop
INFO: Stopped w.@86b455{Jenkins v2.160,/,null,UNAVAILABLE}{C:\Users\aakasshi\.jenkins\war}
java.lang.NoClassDefFoundError: jenkins/security/ClassFilterImpl
        at jenkins.model.Jenkins.cleanUp(Jenkins.java:3330)
        at hudson.WebAppMain$3.run(WebAppMain.java:254)
Caused by: java.lang.ClassNotFoundException: jenkins.security.ClassFilterImpl
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:565)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 2 more
Jan 21, 2019 2:37:00 PM winstone.Logger logInternal
INFO: Jetty shutdown successfully
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: java.net.BindException: Address already in use: bind
        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:339)
        at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
        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:395)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at winstone.Launcher.<init>(Launcher.java:184)
        ... 7 more
Jan 21, 2019 2:37:00 PM winstone.Logger logInternal
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: java.net.BindException: Address already in use: bind
        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:339)
        at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
        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:395)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at winstone.Launcher.<init>(Launcher.java:184)
        ... 7 more

尝试以下查询(示例) java -jar jenkins.war -httpPort = 9090

我已经检查过了,上面查询中使用的所有端口都是免费的。使用netstat -na

检查可用端口

1 个答案:

答案 0 :(得分:2)

  

原因:java.net.BindException:已使用的地址:bind

在任务管理器中检查是否有与Jenkins运行相关的Java进程。如果是这种情况,请停止并重新启动Jenkins。