2

I want to have a Windows Server 2016 slave node with a master Jenkins (version 2.89.2) running on Red Hat Enterprise Linux 7.x. I am trying to install the slave-agent.jnlp file from the Jenkins web UI on the Windows server. I run this command for PowerShell opened as administrator:

javaws -verbose C:\Users\Administrator\Downloads\slave-agent.jnlp

I receive this error:

Error: The field <jnlp><application-desc><argument> has an invalid value:

Launch File

<jnlp codebase="http://FQDNofJenkinsServer:8080/computer/FQDNofWindowsSlave/" spec="1.0+"><information><title>Agent for FQDNofWindowsSlave</title><vendor>Jenkins project</vendor><homepage href="https://jenkins-ci.org/"/></information><security><all-permissions/></security><resources><j2se version="1.8+"/><jar href="http://FQDNofJenkinsServer:8080/jnlpJars/remoting.jar"/></resources><application-desc main-class="hudson.remoting.jnlp.Main"><argument>32ba31ca5f150c2b3491802b0b60e56574d970a9e601cebad656a113fe325a85</argument><argument>FQDNofWindowsSlave</argument><argument>-workDir</argument><argument/><argument>-internalDir</argument><argument/><argument>-url</argument><argument>http://FQDNofJenkinsServer:8080/</argument></application-desc></jnlp>


Exception

BadFieldException[ The field <jnlp><application-desc><argument> has an invalid value: ,]
    at com.sun.javaws.jnl.XMLFormat$10.visitElement(Unknown Source)
    at com.sun.javaws.jnl.XMLUtils.visitElements(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.buildApplicationDesc(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.process(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.Main.launchApp(Unknown Source)
    at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
    at com.sun.javaws.Main.access$000(Unknown Source)
    at com.sun.javaws.Main$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

I expect the command to work. I do not understand the error message. What should I do?

0

You have two arguments that are empty:

<application-desc main-class="hudson.remoting.jnlp.Main">
  <argument>32ba31ca5f150c2b3491802b0b60e56574d970a9e601cebad656a113fe325a85</argument>
  <argument>FQDNofWindowsSlave</argument>
  <argument>-workDir</argument>
  <argument/>
  <argument>-internalDir</argument>
  <argument/>
  <argument>-url</argument>
  <argument>http://FQDNofJenkinsServer:8080/</argument>
</application-desc>

Your error message has a comma in it:

BadFieldException[ The field has an invalid value: ,]

Other bad argument error messages on the internet have comma separated lists of bad arguments:

BadFieldException[ The field codebase has an invalid value: $$codebase,$$codebase]

So I'd guess those two empty arguments are the problem.

0

Jenkins provides agent.jar and a secret required to make a connection from the node to the master. Make sure the node is configured properly (Manage JenkinsManage NodesNode)

Enter image description here

Ensure Java 1.8 is present on the Windows agent. Download the agent.jar file on the Windows machine, and run the command Jenkins provides, using Windows command prompt.

java -jar agent.jar -jnlpUrl http://localhost:8080/computer/example/slave-agent.jnlp -secret e6073ce49423ed54df4a24f918973f50dc760dd440013d3b30403c4a2c7501fd -workDir "c:\jenkins"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.