无法在命令提示符中执行jenkins.war

时间:2018-02-21 06:46:17

标签: jenkins

Remaining log导航到我的.war所在的文件夹并执行'java -jar jenkins.war'。这是我在cmd执行时遇到的错误。

`无法在cmd中运行Jenkins.war,这是整个日志

WARNING: An illegal reflective access operation has occurredWARNING: Illegal reflective access by Main (file:/C:/Self%20Learning/Jenkins/jenkins.war) to field java.util.zip.ZipFile.nameWARNING: Please consider reporting this to the maintainers of MainWARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operationsWARNING: All illegal access operations will be denied in a future releaseRunning from: C:\Self Learning\Jenkins\jenkins.warwebroot: $user.home/.jenkins33mFeb 22, 2018 12:38:13 PM Main deleteWinstoneTempContentsWARNING: Failed to delete the temporary Winstone file C:\Users\bchalla\AppData\Local\Temp\winstone\jenkins.war0mFeb 22, 2018 12:38:13 PM org.eclipse.jetty.util.log.Log initializedINFO: Logging initialized @704ms to org.eclipse.jetty.util.log.JavaUtilLogFeb 22, 2018 12:38:13 PM winstone.Logger logInternalINFO: Beginning extraction from war file33mFeb 22, 2018 12:38:16 PM org.eclipse.jetty.server.handler.ContextHandler setContextPathWARNING: Empty contextPath[0mFeb 22, 2018 12:38:16 PM org.eclipse.jetty.server.Server doStartINFO: jetty-9.4.z-SNAPSHOTFeb 22, 2018 12:38:18 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServletINFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServletFeb 22, 2018 12:38:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStartINFO: DefaultSessionIdManager workerName=node0Feb 22, 2018 12:38:18 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStartINFO: No SessionScavenger set, using defaultsFeb 22, 2018 12:38:18 PM org.eclipse.jetty.server.session.HouseKeeper startScavengingINFO: Scavenging every 660000msJenkins home directory: C:\Users\bchalla\.jenkins found at: $user.home/.jenkinsFeb 22, 2018 12:38:19 PM org.eclipse.jetty.server.handler.ContextHandler doStartINFO: Startedw.@f1a45f8{/,file:///C:/Users/bchalla/.jenkins/war/,AVAILABLE}C:\Users\bchalla\.jenkins\war}Feb 22, 2018 12:38:19 PMorg.eclipse.jetty.server.AbstractConnector doStopINFO: StoppedServerConnector@270b6b5e{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}Feb 22, 2018 12:38:19 PM org.eclipse.jetty.server.session.HouseKeeper stopScavengingINFO: Stopped scavengingfeb 22, 2018 12:38:19 PM hudson.WebAppMain contextDestroyedINFO: Shutting down a Jenkins instance that was still starting ujava.lang.Throwable: reasonat hudson.WebAppMain.contextDestroyed(WebAppMain.java:388)atorg.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:898)at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:545)atorg.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:873)atorg.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:355)atorg.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1507)at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1471 at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:927)
    at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:271)
    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:142)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
    at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
    at org.eclipse.jetty.server.Server.doStop(Server.java:523)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
    at winstone.Launcher.shutdown(Launcher.java:307)
    at winstone.Launcher.<init>(Launcher.java:167)
    at winstone.Launcher.main(Launcher.java:354)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at Main._main(Main.java:294)
    at Main.main(Main.java:132)Exception in thread "Jenkins initialization thread" Feb 22, 2018 12:38:19 PM org.eclipse.jetty.server.handler.ContextHandler doStopINFO: Stopped w.@f1a45f8{/,null,UNAVAILABLE}{C:\Users\bchalla\.jenkins\war}java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:247)Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
    at java.base/java.net.URLClassLoader.findClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:560)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    ... 1 moreFeb 22, 2018 12:38:19 PM winstone.Logger logInternalINFO: Winstone shutdown successfullyjava.io.IOException: Failed to start Jetty
    at winstone.Launcher.<init>(Launcher.java:156)
    at winstone.Launcher.main(Launcher.java:354)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
    at Main._main(Main.java:294)
    at Main.main(Main.java:132)Caused by: java.net.BindException: Address already in use: bind
    at java.base/sun.nio.ch.Net.bind0(Native Method)
    at java.base/sun.nio.ch.Net.bind(Unknown Source)
    at java.base/sun.nio.ch.Net.bind(Unknown Source)
    at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
    at java.base/sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
    at 

1 个答案:

答案 0 :(得分:0)

如果有任何其他Jenkins实例正在运行,请查看进程,如果有,请在管理模式下终止所有命令启动命令提示符,然后再次尝试执行命令。

您还可以检查端口是否被其他进程占用。