jenkins不能启用端口_Jenkins无法启动:无法收听端口8080

bd96500e110b49cbb3cd949968f18be7.png

I am using Jenkins and since yesterday it has stopped working. I looked at the Windows Service and it had been stopped (somehow). I restarted it but it stopped immediately after.

I have looked in the directory where the service is running from (C:\Program Files\Jenkins) and opened the log file in there called jenkins.out.log. This is what it says

Running from: C:\Program Files\Jenkins\jenkins.war

webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")

[Winstone 2012/05/17 10:14:42] - Beginning extraction from war file

Jenkins home directory: C:\Program Files\Jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME")

[Winstone 2012/05/17 10:14:44] - Winstone shutdown successfully

[Winstone 2012/05/17 10:14:44] - Container startup failed

java.io.IOException: Failed to start a listener: winstone.HttpListener

at winstone.Launcher.spawnListener(Launcher.java:250)

at winstone.Launcher.(Launcher.java:202)

at winstone.Launcher.main(Launcher.java:398)

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:268)

at Main.main(Main.java:96)

Caused by: java.io.IOException: Failed to listen on port 8080

at winstone.HttpListener.getServerSocket(HttpListener.java:117)

at winstone.HttpListener.start(HttpListener.java:70)

at winstone.Launcher.spawnListener(Launcher.java:241)

... 8 more

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

at java.net.PlainSocketImpl.socketBind(Native Method)

at java.net.PlainSocketImpl.bind(Unknown Source)

at java.net.ServerSocket.bind(Unknown Source)

at java.net.ServerSocket.(Unknown Source)

at java.net.ServerSocket.(Unknown Source)

at winstone.HttpListener.getServerSocket(HttpListener.java:112)

... 10 more

解决方案

Fixed - for anyone else who might have this problem in future. I used this Techrepublic article, which boils down to

netstat -a -n -o | grep "8080"

to find out how to find out which process was using port 8080 and then killed it in Task Manager and then restarted Jenkins and all was well (so far!).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值