Jenkins 无法启动:无法侦听端口 8080 [英] Jenkins won't start: Failed to listen on port 8080

查看:95
本文介绍了Jenkins 无法启动:无法侦听端口 8080的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Jenkins,从昨天起它就停止工作了.我查看了 Windows 服务,它已停止(不知何故).我重新启动它,但它立即停止.

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.

我查看了从 (C:Program FilesJenkins) 运行服务的目录,并在其中打开了名为 jenkins.out.log 的日志文件.是这样写的

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

Running from: C:Program FilesJenkinsjenkins.war
webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
[Winstone 2012/05/17 10:14:42] - Beginning extraction from war file
Jenkins home directory: C:Program FilesJenkins 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.<init>(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.<init>(Unknown Source)
    at java.net.ServerSocket.<init>(Unknown Source)
    at winstone.HttpListener.getServerSocket(HttpListener.java:112)
    ... 10 more

推荐答案

已修复 - 适用于将来可能遇到此问题的任何其他人.我使用了这个 Techrepublic 文章,归结为

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"

找出如何找出哪个进程正在使用端口 8080,然后在任务管理器中将其杀死,然后重新启动 Jenkins,一切正常(到目前为止!).

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!).

这篇关于Jenkins 无法启动:无法侦听端口 8080的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆