安装Jenkins后 启动时失败的问题解决

命令行执行,java -jar jenkins.war,报错

-------------------------------
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(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at Main._main(Main.java:273)
        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: 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:117)
        ... 10 more
←[0m←[31mMar 14, 2013 2:05:24 AM hudson.WebAppMain$2 run
SEVERE: Failed to initialize Jenkins
java.lang.InterruptedException
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Object.java:485)
        at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:244)
        at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
        at jenkins.model.Jenkins.executeReactor(Jenkins.java:894)
        at jenkins.model.Jenkins.<init>(Jenkins.java:796)
        at hudson.model.Hudson.<init>(Hudson.java:81)
        at hudson.model.Hudson.<init>(Hudson.java:77)
        at hudson.WebAppMain$2.run(WebAppMain.java:214)
←[0mException in thread "pool-2-thread-1" java.lang.NullPointerException
        at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:185)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Exception in thread "pool-2-thread-2" java.lang.NullPointerException
        at org.jvnet.hudson.reactor.Reactor$1.run(Reactor.java:153)
        at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
------------------------------
此错误是由于8080端口被占用,
 
改变端口再次执行,
java -jar jenkins.war --httpPort=$HTTP_PORT, 例如java -jar jenkins.war --httpPort=1080
启动成功;
后打开 浏览器,输入http:/localhost:1080,即可看到jenkins的页面

转载于:https://www.cnblogs.com/playboysnow/p/5408207.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值