rhwood / jenkins-slave-osx

Jenkins JNLP slave service for modern OS X systems
MIT License
191 stars 58 forks source link

Jenkins slave service not using configured JENKINS_MASTER #34

Open treyd opened 10 years ago

treyd commented 10 years ago

I ran through the install script, specifying the URL to my Jenkins master (which is NOT http://jenkins). However, when I try to run the service, the log shows that it is trying to connect to the default jenkins url:

Starting at Wed Feb 19 16:24:42 EST 2014

Getting slave.jar from http://jenkins % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: jenkins

rhwood commented 10 years ago

I think JENKINS_CONF in slave.jnlp.sh is not getting set correctly, but I won't be able to fix and test for a couple of weeks. In the meantime, you can edit slave.jnlp.sh to define JENKINS_CONF correctly (I think replacing JENKINS_CONF=${JENKINS_HOME}/Library/Preferences/org.jenkins-ci.slave.jnlp.conf with JENKINS_CONF=${HOME}/Library/Preferences/org.jenkins-ci.slave.jnlp.conf will correct this issue).

treyd commented 10 years ago

Thanks for the response. Changing ${JENKINS_HOME} to ${HOME} in slave.jnlp.sh at least got the launcher to download the slave.jar file. However, it looks like the node configuration in jenkins is not there:

Starting at Thu Feb 20 14:45:37 EST 2014

Getting slave.jar from http://****/jenkins % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 338k 100 338k 0 0 981k 0 --:--:-- --:--:-- --:--:-- 981k Launching slave process at http:// *_/jenkins/computer/osx-build-machine/slave-agent.jnlp Calling java -jar /var/lib/jenkins/Library/Developer/org.jenkins-ci.slave.jnlp/slave.jar -jnlpUrl http://**__/jenkins/computer/osx-build-machine/slave-agent.jnlp -jnlpCredentials user:_***** Failing to obtain http:// _/jenkins/computer/osx-build-machine/slave-agent.jnlp java.io.IOException: Failed to load http://_/jenkins/computer/osx-build-machine/slave-agent.jnlp: 404 Not Found at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:274) at hudson.remoting.Launcher.run(Launcher.java:218) at hudson.remoting.Launcher.main(Launcher.java:192)

Could this have happened because it couldn't reach the jenkins server during the setup process? Or am I misinterpreting this and do I have to create the node in jenkins manually?

On Thu, Feb 20, 2014 at 12:50 PM, Randall Wood notifications@github.comwrote:

I think JENKINS_CONF in slave.jnlp.sh is not getting set correctly, but I won't be able to fix and test for a couple of weeks. In the meantime, you can edit slave.jnlp.sh to define JENKINS_CONF correctly (I think replacing JENKINS_CONF=${JENKINS_HOME}/Library/Preferences/org.jenkins-ci.slave.jnlp.confwith JENKINS_CONF=${HOME}/Library/Preferences/org.jenkins-ci.slave.jnlp.confwill correct this issue).

Reply to this email directly or view it on GitHubhttps://github.com/rhwood/jenkins-slave-osx/issues/34#issuecomment-35649028 .

rhwood commented 10 years ago

You will need to configure the node in Jenkins prior to configuring these scripts.

MarcoSero commented 10 years ago

I can confirm that changing

JENKINS_CONF=${JENKINS_HOME}/Library/Preferences/org.jenkins-ci.slave.jnlp.conf

to

JENKINS_CONF=${HOME}/Library/Preferences/org.jenkins-ci.slave.jnlp.conf

does the job.

Thanks @rhwood :+1: