我打电话
java -jar /jenkins/jenkins.war -httpPort=8088
并且还将 /etc/sysconfig/jenkins 中的 http 端口设置为 8088
然而我不断得到
SEVERE: Container startup failed
java.io.IOException: Failed to start a listener: winstone.HttpListener
at winstone.Launcher.spawnListener(Launcher.java:229)
at winstone.Launcher.<init>(Launcher.java:181)
at winstone.Launcher.main(Launcher.java:384)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at Main._main(Main.java:288)
at Main.main(Main.java:98)
Caused by: java.io.IOException: Failed to listen on port 8080
at winstone.HttpListener.getServerSocket(HttpListener.java:122)
at winstone.HttpListener.start(HttpListener.java:75)
at winstone.Launcher.spawnListener(Launcher.java:220)
... 8 more
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:376)
at java.net.ServerSocket.bind(ServerSocket.java:376)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at java.net.ServerSocket.<init>(ServerSocket.java:181)
at winstone.HttpListener.getServerSocket(HttpListener.java:117)
... 10 more
我在这里扯头发,不明白为什么它一直在尝试 8080