Jenkins在Mac OS X上安装

时间:2012-04-11 10:52:24

标签: xcode macos jenkins

从官方网站下载jenkins-1.459.pkg后我有问题运行它。 当我想用:

执行它时
java -jar jenkins.war

我明白了:

kuba:Jenkins kuba$ java -jar jenkins.war
Running from: /Applications/Jenkins/jenkins.war
webroot: $user.home/.jenkins
2012-04-11 12:40:32 winstone.Logger logInternal
INFO: Beginning extraction from war file
Jenkins home directory: /Users/mobiletest/.jenkins found at: $user.home/.jenkins
2012-04-11 12:40:34 winstone.Logger logInternal
INFO: Winstone shutdown successfully
2012-04-11 12:40:34 winstone.Logger logInternal
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:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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:119)
    at winstone.HttpListener.start(HttpListener.java:72)
    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.PlainSocketImpl.bind(PlainSocketImpl.java:383)
    at java.net.ServerSocket.bind(ServerSocket.java:328)
    at java.net.ServerSocket.<init>(ServerSocket.java:194)
    at java.net.ServerSocket.<init>(ServerSocket.java:150)
    at winstone.HttpListener.getServerSocket(HttpListener.java:114)
    ... 10 more
2012-04-11 12:40:35 jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
2012-04-11 12:40:35 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:849)
    at jenkins.model.Jenkins.<init>(Jenkins.java:761)
    at hudson.model.Hudson.<init>(Hudson.java:81)
    at hudson.model.Hudson.<init>(Hudson.java:77)
    at hudson.WebAppMain$2.run(WebAppMain.java:217)

我试过这个: http://momo.brauchtman.net/2011/11/12/howto-install-jenkins-on-os-x-and-make-it-build-mac-stuff/ 但不幸的是没有用。

2 个答案:

答案 0 :(得分:4)

  1. 确保没有其他Jenkins或Tomcat实例正在运行(sudo ps -ef | grep jenkinssudo ps -ef | grep java

  2. sudo netstat -a | grep LISTEN查看哪些进程正在侦听端口

  3. 使用其他端口java -jar jenkins.jar --httpPort <ANUMBERHERE>

答案 1 :(得分:0)

您可能有另一个软件正在侦听端口8080.尝试关闭其他应用程序或使用Jenkins配置中的另一个端口更改8080。