Unable to get Jenkins to start on MacOS-X 10.10 Yosemite

3,338 views
Skip to first unread message

Robin Mills

unread,
Oct 19, 2014, 7:09:29 PM10/19/14
to jenkins...@googlegroups.com
Folks

I've had Jenkins running for months on my Mac Mini.  I upgraded today to Yosemite and was very surprised that Jenkins refuses to start (any port, not just 8080, with/without sudo)

I've looked through everything in the System Preferences concerning security, network, users, updated Java.  Nope!  Defeated.  Looks like some new Yosemite policeman needs to be told "it's OK to allow Java to open port 8080!" (or something like that).

Does anybody have any ideas?

Robin

538 rmills@rmillsmm:~ $ ls -alt /Users/Shared/Jenkins/Home/war/WEB-INF/jenkins-cli.jar
-rwxr-xr-x  1 jenkins  jenkins  729317  9 Sep 23:02 /Users/Shared/Jenkins/Home/war/WEB-INF/jenkins-cli.jar
539 rmills@rmillsmm:~ $ java -jar /Users/Shared/Jenkins/Home/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080
Exception in thread "main" java.io.IOException: Failed to connect to http://localhost:8080/
at hudson.cli.CLI.getCliTcpPort(CLI.java:266)
at hudson.cli.CLI.<init>(CLI.java:126)
...
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)

Daniel Beck

unread,
Oct 19, 2014, 9:24:05 PM10/19/14
to jenkins...@googlegroups.com
Are you sure Jenkins is running? I'm asking because JENKINS-23543 indicates it might not even start on OS X Yosemite.

https://issues.jenkins-ci.org/browse/JENKINS-23543
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Robin Mills

unread,
Oct 20, 2014, 4:40:03 AM10/20/14
to jenkins...@googlegroups.com
Daniel

Thanks for contributing to this.  Very much appreciated.

I've made some progress.  I've discovered that Jenkins is running OK on my Mac Book Pro which has been upgraded to Yosemite.

The situation with my MacMini is a little different from JENKINS-23543 in which Daniel Roy has reported trouble getting the "daemon" instance to run from launchctl - however jenkins runs from the command-line.  I can't get it to start from the command-line (nor from launchtl).

I'm going to restore my Mac Mini to 10.9.5 in order to bring the server back on line.  I'll won't upgrade the MacMini to 10.10 for now and keep my eyes and ears open for similar reports.

Thanks again for taking the time to help with this.

Robin

Robin Mills

unread,
Oct 20, 2014, 5:12:45 AM10/20/14
to jenkins...@googlegroups.com
I've got it running with this command:
sudo /usr/bin/java -Dfile.encoding=UTF-8 -XX:PermSize=256m -XX:MaxPermSize=512m -Xms256m -Xmx512m -Djava.io.tmpdir=/Users/Shared/Jenkins/tmp -jar /Applications/Jenkins/jenkins.war

It seems to have lost all server configuration (forgotten its builders, jobs, tasks etc) - however it's running which is much better.

Robin

On Monday, October 20, 2014 12:09:29 AM UTC+1, Robin Mills wrote:

Robin Mills

unread,
Oct 20, 2014, 7:45:11 AM10/20/14
to jenkins...@googlegroups.com
I've now got jenkins running and and the server configuration is available.

I added JENKINS_HOME /Users/Shared/Jenkins/Home to the defaults
$ defaults write /Library/Preferences/org.jenkins-ci JENKINS_HOME /Users/Shared/Jenkins/Home
then started the server from Terminal:
sudo /Library/Application Support/Jenkins/jenkins-runner.sh &

Rather oddly, it doesn't start jenkins from launchctl (and therefore doesn't survive a crash or reboot) - however I'm sure that will have a simple explanation.  At least I have the jenkins server running and available to users.

Robin

On Monday, October 20, 2014 12:09:29 AM UTC+1, Robin Mills wrote:
Message has been deleted

Robin Mills

unread,
Oct 20, 2014, 8:43:52 AM10/20/14
to jenkins...@googlegroups.com
The final bit of the jigsaw was correctly indentified by Roy Willemse in https://issues.jenkins-ci.org/browse/JENKINS-23543
$ sudo chmod 777 /var/log/jenkins/jenkins.log 

Then start jenkins with launchctl:
$ sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist 

Happiness!

Robin

On Monday, October 20, 2014 12:09:29 AM UTC+1, Robin Mills wrote:

90mi...@gmail.com

unread,
Feb 1, 2015, 5:40:43 AM2/1/15
to jenkins...@googlegroups.com
That solved my problem, thanks a lot Robin!!

Miguel Garcia Ibañez

unread,
Feb 23, 2015, 5:24:11 AM2/23/15
to jenkins...@googlegroups.com
It solved my problem as well...
Thanks a lot

Barry Anderson

unread,
Apr 23, 2015, 1:06:32 AM4/23/15
to jenkins...@googlegroups.com
It might be worth trying just the following command:

sudo chown jenkins /var/log/jenkins/jenkins.log


Hope this helps,

Barry

Robin Mills

unread,
Apr 23, 2015, 3:23:08 AM4/23/15
to jenkins...@googlegroups.com
Thanks, Barry.  I did that, and some other things and got it running.  I think I put my solution on the web.  Anyway, it's running well.

Thanks for taking the time to help me.

Robin
Not sent from my iPhone
--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/oSynHdMWEwU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ef016758-2c72-4db7-a186-b7179780da3d%40googlegroups.com.

ZX L

unread,
Dec 25, 2018, 1:46:14 AM12/25/18
to Jenkins Users
Thank you so much, you save my day!
Reply all
Reply to author
Forward
0 new messages