问题
Been struggling for days trying to get this working.
I have a working Jenkins Master running on Marathon & mesos plugin 1 Mesos Master with a cluster of 6 Slaves
When I run my Jobs using the mesos cloud, I can see the framework as registered with outstanding offers but my Jenkins Slaves never come online.
Connect agent to Jenkins one of these ways:
launch agent Launch agent from browser
Run from agent command line:
java -jar slave.jar -jnlpUrl http://x.x.x.x:xxxx/computer/mesos-jenkins-36155646b218421ea06554cc1f93cf43-mesos-slave/slave-agent.jnlp -secret f4c494efcb7a030dd4e70a4adea76bd87493cce7bece3974a58e6750194cc031
I have a jenkins user with JAVA_HOME vars on each my mesos slaves as specified on a number of articles: https://www.cloudbees.com/blog/apache-mesos-and-jenkins-elastic-build-slaves
回答1:
By default Mesos native library, that is used by Jenkins to communicate with Mesos, binds to the first interface that hostname resolves to. Check if Jenkins is registered with proper IP e.g., query Mesos Master /state endpoint.
You can set the IP used by Jenkins by adding following line in /etc/default/jenkins
LIBPROCESS_IP=<JENKINS-IP>
来源:https://stackoverflow.com/questions/43792709/mesos-jenkins-framework-registers-but-jenkins-slaves-offline