java - 无法启动 Jenkins war 文件

标签 java ubuntu jenkins

我正在尝试运行 jenkins war 文件,但收到此错误:

: Container startup failed
java.io.IOException: Failed to start Jetty

这是我正在运行的命令:

java -jar jenkins.war

这是完整的错误:

Mar 25, 2018 1:55:50 AM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start Jetty
    at winstone.Launcher.<init>(Launcher.java:154)
    at winstone.Launcher.main(Launcher.java:352)
    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:246)
    at Main.main(Main.java:91)
Caused by: java.net.BindException: Address already in use
    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.open(ServerConnector.java:321)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at org.eclipse.jetty.server.Server.doStart(Server.java:366)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
    at winstone.Launcher.<init>(Launcher.java:152)
    ... 7 more

Mar 25, 2018 1:55:51 AM hudson.util.BootFailure publish
SEVERE: Failed to initialize Jenkins
hudson.util.HudsonFailedToLoad: java.lang.InterruptedException
    at hudson.WebAppMain$3.run(WebAppMain.java:244)
Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:502)
    at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:267)
    at jenkins.InitReactorRunner.run(InitReactorRunner.java:45)
    at jenkins.model.Jenkins.executeReactor(Jenkins.java:1009)
    at jenkins.model.Jenkins.<init>(Jenkins.java:877)
    at hudson.model.Hudson.<init>(Hudson.java:85)
    at hudson.model.Hudson.<init>(Hudson.java:81)
    at hudson.WebAppMain$3.run(WebAppMain.java:227)

我已经检查了端口 8081,上面没有任何运行。 如何解决?

最佳答案

使用命令尝试其他端口

java -jar jenkins.war --httpPort=8089

了解更多信息checkout this answer

关于java - 无法启动 Jenkins war 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49471816/

相关文章:

java - 让我的 java swing 动画在 Linux 中更流畅

ubuntu - 在 SCSS 文件中保存更改后更新您的 CSS 文件(像 ScoutApp 一样工作)

jenkins - 从 BUILD_LOG_REGEX 提取的行中删除 "[string]"

java - 使用keytool获取证书的MD5签名

java - 检查管理员登录( HashMap )

Java 空检查性能

jenkins - 说明 Setter 插件 - 添加超链接到网络文件夹

java - 在 Eclipse 中使用 ctrl-shift-t 代替 ctrl-shift-r 有什么优点?

ubuntu - 如何在 Ubuntu 的本地主机上安装 SSL?

linux - Upstart 如果正在运行则停止