当前位置: 动力学知识库 > 问答 > 编程问答 >

jenkins - Connected via JNLP agent message and unable to launch jnlp

问题描述:

I am following the steps here and configured a node with the option launch slave agents via web start. When I save on the master it asks me to launch the agent from browser or a slave as expected.

https://wiki.jenkins-ci.org/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines

Now, when I go to the slave and use the URL to launch the agent from the browser, it shows the message "Connected via JNLP agent" and doesn't show the option to launch jnlp agent.

Tried multiple browsers but no luck.

Any help here?

网友答案:

Windows 2008 & 2012 are a nightmare when you want to configure a JNLP slave.

The old solution (click on JNLP link and install as a service) doesn't work anymore...

I found a nice workaround here: https://wiki.jenkins-ci.org/display/JENKINS/Launch+Java+Web+Start+slave+agent+via+Windows+Scheduler

In a few words, the idea is to:

  • Create a JNLP slave with Jenkins
  • Copy the JNLP URL (java -jar slave.jar -jnlpUrl ...)
  • Create a C:\Jenkins folder (on your Windows slave)
  • Download the slave.jar file in this folder (http://YOUR_JENKINS_URL/jnlpJars/slave.jar)
  • Create a task (with the Windows Task Scheduler) to call this URL (following the procedure and my first link)

I did a quick test on a Windows 2012 server and it works :)

If you are getting a certificate error, you can add this option:

java -jar slave.jar -noCertificateCheck -jnlpUrl ...
分享给朋友:
您可能感兴趣的文章:
随机阅读: