HiveBrain v1.2.0
Get Started
← Back to all entries
debugMinor

How can a Windows server be a slave to Jenkins running on Linux when there in an error installing the slave-agent.jnlp file?

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
canerrorthefilejenkinsslaveagentjnlprunninginstalling

Problem

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  has an invalid value:

Launch File

Agent for FQDNofWindowsSlaveJenkins project32ba31ca5f150c2b3491802b0b60e56574d970a9e601cebad656a113fe325a85FQDNofWindowsSlave-workDir-internalDir-urlhttp://FQDNofJenkinsServer:8080/

Exception

BadFieldException[ The field  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?

Solution

You have two arguments that are empty:


  32ba31ca5f150c2b3491802b0b60e56574d970a9e601cebad656a113fe325a85
  FQDNofWindowsSlave
  -workDir
  
  -internalDir
  
  -url
  http://FQDNofJenkinsServer:8080/


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.

Code Snippets

<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>

Context

StackExchange DevOps Q#3081, answer score: 1

Revisions (0)

No revisions yet.