gpt4 book ai didi

java - 容器在 jenkins 中启动失败

转载 作者:搜寻专家 更新时间:2023-10-31 08:10:44 25 4
gpt4 key购买 nike

当我在 Windows 中使用命令提示符运行命令 java -jar jenkins.war 时出现以下错误:

SEVERE: Container startup failedjava.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:497)
at Main._main(Main.java:293)
at Main.main(Main.java:132)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.open(ServerConnector.java:298)
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:431)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at winstone.Launcher.<init>(Launcher.java:152)
... 7 more

最佳答案

错误原因:

Caused by: java.net.BindException: Address already in use: bind

说明:默认情况下,Jenkins 使用端口 8080(就像许多其他 Web 应用程序一样)。显然,您已经有另一个应用程序在监听端口 8080。

所以你应该将 Jenkins 绑定(bind)到另一个端口。参见 Starting and Accessing Jenkins想要查询更多的信息。例如,您可以从

java -jar jenkins.war --httpPort=8081

关于java - 容器在 jenkins 中启动失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45008564/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com