Answers: <p>You have two arguments that are empty:</p>
  
  <pre><code>&lt;application-desc main-class="hudson.remoting.jnlp.Main"&gt;
    &lt;argument&gt;32ba31ca5f150c2b3491802b0b60e56574d970a9e601cebad656a113fe325a85&lt;/argument&gt;
    &lt;argument&gt;FQDNofWindowsSlave&lt;/argument&gt;
    &lt;argument&gt;-workDir&lt;/argument&gt;
    &lt;argument/&gt;
    &lt;argument&gt;-internalDir&lt;/argument&gt;
    &lt;argument/&gt;
    &lt;argument&gt;-url&lt;/argument&gt;
    &lt;argument&gt;http://FQDNofJenkinsServer:8080/&lt;/argument&gt;
  &lt;/application-desc&gt;
  </code></pre>
  
  <p>Your error message has a comma in it:</p>
  
  <blockquote>
    <p>BadFieldException[ The field  has an
    invalid value: ,]</p>
  </blockquote>
  
  <p>Other bad argument error messages on the internet have comma separated lists of bad arguments: </p>
  
  <blockquote>
    <p>BadFieldException[ The field codebase has an invalid value:
    $$codebase,$$codebase]</p>
  </blockquote>
  
  <p>So I'd guess those two empty arguments are the problem. </p>
  
Answers: CC BY-SA 3.0
Answers: 2018-01-20T16:50:28.277Z
Answers: 2018-01-20T16:50:28.277Z
Answers: Logan
Answers: <p>Jenkins provides <code>agent.jar</code> and a secret required to make a connection from the node to the master. Make sure the node is configured properly (<em>Manage Jenkins</em> → <em>Manage Nodes</em> → <em>Node</em>)</p>
  
  <p><a href="https://i.sstatic.net/lkkp4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/lkkp4.png" alt="Enter image description here"></a></p>
  
  <p>Ensure Java 1.8 is present on the Windows agent. Download the <code>agent.jar</code> file on the Windows machine, and run the command Jenkins provides, using Windows command prompt.</p>
  
  <pre><code>java -jar agent.jar -jnlpUrl http://localhost:8080/computer/example/slave-agent.jnlp -secret e6073ce49423ed54df4a24f918973f50dc760dd440013d3b30403c4a2c7501fd -workDir "c:\jenkins"
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2018-02-25T04:15:59.417Z
Answers: 2018-07-20T18:18:11.470Z
Answers: 2018-07-20T18:18:11.470Z
Answers: casey vega
Body: <p>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:</p>
  
  <pre><code>javaws -verbose C:\Users\Administrator\Downloads\slave-agent.jnlp
  </code></pre>
  
  <p>I receive this error: </p>
  
  <pre><code>Error: The field &lt;jnlp&gt;&lt;application-desc&gt;&lt;argument&gt; has an invalid value:
  
  Launch File
  
  &lt;jnlp codebase="http://FQDNofJenkinsServer:8080/computer/FQDNofWindowsSlave/" spec="1.0+"&gt;&lt;information&gt;&lt;title&gt;Agent for FQDNofWindowsSlave&lt;/title&gt;&lt;vendor&gt;Jenkins project&lt;/vendor&gt;&lt;homepage href="https://jenkins-ci.org/"/&gt;&lt;/information&gt;&lt;security&gt;&lt;all-permissions/&gt;&lt;/security&gt;&lt;resources&gt;&lt;j2se version="1.8+"/&gt;&lt;jar href="http://FQDNofJenkinsServer:8080/jnlpJars/remoting.jar"/&gt;&lt;/resources&gt;&lt;application-desc main-class="hudson.remoting.jnlp.Main"&gt;&lt;argument&gt;32ba31ca5f150c2b3491802b0b60e56574d970a9e601cebad656a113fe325a85&lt;/argument&gt;&lt;argument&gt;FQDNofWindowsSlave&lt;/argument&gt;&lt;argument&gt;-workDir&lt;/argument&gt;&lt;argument/&gt;&lt;argument&gt;-internalDir&lt;/argument&gt;&lt;argument/&gt;&lt;argument&gt;-url&lt;/argument&gt;&lt;argument&gt;http://FQDNofJenkinsServer:8080/&lt;/argument&gt;&lt;/application-desc&gt;&lt;/jnlp&gt;
  
  
  Exception
  
  BadFieldException[ The field &lt;jnlp&gt;&lt;application-desc&gt;&lt;argument&gt; 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)
  </code></pre>
  
  <p>I expect the command to work.  I do not understand the error message.  What should I do?</p>
  
Tags: <jenkins><windows><linux><jenkinsfile><jenkins2>
Title: How can a Windows server be a slave to Jenkins running on Linux when there in an error installing the slave-agent.jnlp file?
UserDisplayName: Jermoe
ThreadText: # How can a Windows server be a slave to Jenkins running on Linux when there in an error installing the slave-agent.jnlp file?
  
  (Asked by: username_0 on 2018-01-15)
  
  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?
  
  **Tags:** jenkins, windows, linux, jenkinsfile, jenkins2
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-01-20. Score: 1
  
  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.
  
  
  ---
  
  ### Answer by username_2 on 2018-02-25. Score: 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 Jenkins* → *Manage Nodes* → *Node*)
  
  [![Enter image description here](https://i.sstatic.net/lkkp4.png)](https://i.sstatic.net/lkkp4.png)
  
  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"
  
  ```
  
  
  ---
  
  