Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2824

Graceful error message needed for slave CLI version mismatch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • remoting
    • None
    • Platform: PC, OS: Windows XP

      Since updating my master hudson server to 1.272/3, my slave servers seem to be broken after
      restarting them. I tried removing all the files in the remote FS root and then reinstalling the hudson
      slave service. Starting it manually from a web browser works, but when one clicks "install as windows
      service", many bad things happen.

      First, an exception is thrown about not being able to find a file named "remoting.jar"; I was able to
      resolve this by moving all the files back into the remote FS root directory. However, the service still
      does not start, as the URL is being incorrectly rewritten in the hudson-slave.xml file. It generates the
      following configuration in my case:

      <!--
      Windows service definition for Hudson slave

      To uninstall, run "hudson-slave.exe stop" to stop the service, then "hudson-slave.exe uninstall" to
      uninstall the service.
      Both commands don't produce any output if the execution is successful.
      -->
      <service>
      <id>hudsonslave</id>
      <name>Hudson Slave</name>
      <description>This service runs a slave for Hudson continous integration system.</description>
      <!--
      if you'd like to run Hudson with a specific version of Java, specify a full path to java.exe.
      The following value assumes that you have java in your PATH.
      -->
      <executable>C:\Program Files\Java\jre6\bin\java.exe</executable>
      <arguments>-Xrs -jar "%BASE%\slave.jar" -jnlpUrl
      http://our.build.server.com/../computer/slavename/slave-agent.jnlp</arguments>
      <!--
      interactive flag causes the empty black Java window to be displayed.
      I'm still debugging this.
      <interactive />
      -->
      </service>

      The problem here is the "/../" between the hostname and directory, which should not be there.
      Removing these gets me a step further, and at least the service can fetch the slave-agent.jnlp file from
      the master. However, it does not run, as it seems that the command line syntax has been changed
      somewhere and not updated in the other respective component. The following is written to hudson-
      slave.err.log after starting up (with the correct url):

      "-url" is not a valid option
      java -jar jnlp-agent.jar [options...] <host> <hudson URL> <secret key> <slave name>
      -headless : Run in headless mode, without GUI
      -tunnel HOST:PORT : Connect to the specified host and port, instead of connecti
      ng directly to Hudson. Useful when connection to Hudson nee
      ds to be tunneled. Can be also HOST: or :PORT, in which cas
      e the missing portion will be auto-configured like the defa
      ult behavior

            Unassigned Unassigned
            sqook sqook
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: