将Jenkins升级到2.121.2版后,尝试启动Jenkins时出现以下错误。
由于“绑定异常”,我也尝试使用其他端口,但这也不能解决问题。此外,将war文件降级(到以前的工作版本)没有任何作用。
您知道如何使Jenkins服务重新运行吗?
D:\Jenkins>java -jar jenkins_2.121.2.war
Running from: D:\Jenkins\jenkins_2.121.2.war
webroot: $user.home/.jenkins
Jul 27, 2018 9:07:46 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized @521ms to org.eclipse.jetty.util.log.JavaUtilLog
Jul 27, 2018 9:07:46 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
←[33mJul 27, 2018 9:07:46 AM org.eclipse.jetty.server.handler.ContextHandler set
ContextPath
WARNING: Empty contextPath
←[0mJul 27, 2018 9:07:46 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT, build timestamp: 2017-11-21T22:27:37+01:00, git hash
: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
Jul 27, 2018 9:07:47 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor vis
itServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Jul 27, 2018 9:07:47 AM org.eclipse.jetty.server.session.DefaultSessionIdManager
doStart
INFO: DefaultSessionIdManager workerName=node0
Jul 27, 2018 9:07:47 AM org.eclipse.jetty.server.session.DefaultSessionIdManager
doStart
INFO: No SessionScavenger set, using defaults
Jul 27, 2018 9:07:47 AM org.eclipse.jetty.server.session.HouseKeeper startScaven
ging
INFO: Scavenging every 600000ms
Jenkins home directory: C:\Users\XXXXX\.jenkins found at: $user.home/.jenkins
Jul 27, 2018 9:07:48 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.@6a8658ff{/,file:///C:/Users/XXXXX/.jenkins/war/,AVAILABLE}{C:\
Users\XXXXX\.jenkins\war}
Jul 27, 2018 9:07:48 AM org.eclipse.jetty.server.AbstractConnector doStop
INFO: Stopped ServerConnector@60f00693{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Jul 27, 2018 9:07:48 AM org.eclipse.jetty.server.session.HouseKeeper stopScaveng
ing
INFO: Stopped scavenging
Jul 27, 2018 9:07:48 AM hudson.WebAppMain contextDestroyed
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:898)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(
ServletContextHandler.java:545)
at org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHa
ndler.java:873)
at org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletCo
ntextHandler.java:355)
at org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:
1521)
at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java
:1485)
at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler
.java:927)
at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContext
Handler.java:271)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeC
ycle.java:89)
at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLif
eCycle.java:144)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerL
ifeCycle.java:162)
at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandl
er.java:124)
at org.eclipse.jetty.server.Server.doStop(Server.java:489)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeC
ycle.java:89)
at winstone.Launcher.shutdown(Launcher.java:307)
at winstone.Launcher.<init>(Launcher.java:167)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:312)
at Main.main(Main.java:136)
Jul 27, 2018 9:07:48 AM org.eclipse.jetty.server.handler.ContextHandler doStop
INFO: Stopped w.@6a8658ff{/,null,UNAVAILABLE}{C:\Users\XXXXX\.jenkins\war}
Jul 27, 2018 9:07:48 AM winstone.Logger logInternal
INFO: Jetty shutdown successfully
java.io.IOException: Failed to start Jetty
at winstone.Launcher.<init>(Launcher.java:156)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:312)
at Main.main(Main.java:136)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConn
ector.java:334)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:30
2)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNet
workConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java
:238)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:397)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:68)
at winstone.Launcher.<init>(Launcher.java:154)
... 7 more
←[31mJul 27, 2018 9:07:48 AM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start Jetty
at winstone.Launcher.<init>(Launcher.java:156)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:312)
at Main.main(Main.java:136)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConn
ector.java:334)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:30
2)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNet
workConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java
:238)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:397)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife
Cycle.java:68)
at winstone.Launcher.<init>(Launcher.java:154)
... 7 more
←[0mException in thread "Jenkins initialization thread" java.lang.NoClassDefFoun
dError: hudson/util/HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:247)
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade
r.java:565)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more