Configure Jenkins Mac OS X native package to run in a different port
Jenkins native Mac OS package installs by default in /Users/Shared/Jenkins
and the war in /Applications/Jenkins
. It runs as a daemon and restarts automatically in spite of a kill -9
command.
I added a winstone.properties
in /Applications/Jenkins
with a single prop, httpPort=9999
.
Still app starts on 8080.
I even installed CLI and tried:
java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ shutdown
Failed to authenticate with your SSH keys. Proceeding with anonymous access
Sep 19, 2011 1:11:00 PM hudson.remoting.Channel$ReaderThread run
SEVERE: I/O error in channel CLI connection to http://127.0.0.1:8080/
java.io.IOException: Unexpected termination of the channel
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1093)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2553)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1087)
Exception in thread "main" hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the
channel
at hudson.remoting.Request.call(Request.java:149)
at hudson.remoting.Channel.call(Channel.java:681)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:158)
at $Proxy2.main(Unknown Source)
at hudson.cli.CLI.execute(CLI.java:171)
at hudson.cli.CLI._main(CLI.java:297)
at hudson.cli.CLI.main(CLI.java:216)
Caused by: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.Request.abort(Request.java:273)
at hudson.remoting.Channel.terminate(Channel.java:732)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1117)
Caused by: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1093)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2553)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1296)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
at hudson.remoting.Channel$ReaderThread.run(Channel.java:1087)
In short, I can't force stop/start Jenkins and/or configure (I can via manual procedure, using a war thou开发者_如何学Gogh).
Suggestions? Any idea how to configure the Jenkins
Try:
sudo defaults write /Library/Preferences/org.jenkins-ci httpPort '9999'
To check that it has worked use:
defaults read /Library/Preferences/org.jenkins-ci
Then kill the Jenkins process and let it restart.
You want to use launchctl
to start and stop Jenkins. From the example at luscarpa.com: Start & Stop Jenkins daemon on Mac OS X:
Start Jenkins:
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
Stop Jenkins:
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
For those new to killing processes (like I am):
$ ps -e | grep jenkins
53 ?? 0:02.51 /usr/bin/java -jar /Applications/Jenkins/jenkins.war
392 ttys000 0:00.00 grep jenkins
$ sudo kill 53
精彩评论