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

Swarm client not working anymore with Jenkins 2.220

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • swarm-plugin
    • Jenkins 2.220 on Debian 10.3 x64 (jenkins.io Debian repo with Debian default JRE) with Swarm plug-in modules 3.17
      swarm-client 3.17 on Windows 10, AdoptOpenJDK 8, specified master explicitly
    • 3.18

      Slave

      Exec:

      java.exe -Xrs -jar "%BASE%\swarm-client-3.17.jar" -mode exclusive -name *** -labels *** -executors 1 -master [http://***] -username *** -password *** -fsroot "%BASE%" -deleteExistingClients -labelsFile "%BASE%\labels"

      Log:

      Feb 10, 2020 10:25:50 AM hudson.plugins.swarm.SwarmClient discoverFromMasterUrl
      SEVERE: Failed to fetch slave info from Jenkins, HTTP response code: 500
      Feb 10, 2020 10:25:50 AM hudson.plugins.swarm.Client run
      SEVERE: RetryException occurred
      hudson.plugins.swarm.RetryException: Failed to fetch slave info from Jenkins, HTTP response code: 500
      	at hudson.plugins.swarm.SwarmClient.discoverFromMasterUrl(SwarmClient.java:248)
      	at hudson.plugins.swarm.Client.run(Client.java:130)
      	at hudson.plugins.swarm.Client.main(Client.java:104)Feb 10, 2020 10:25:50 AM hudson.plugins.swarm.Client run
      INFO: Retrying in 10 seconds 

      Master

      Log:

      2020-02-10 09:50:32.698+0000 [id=276]   WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://***/plugin/swarm/slaveInfo
      java.lang.NoClassDefFoundError: hudson/UDPBroadcastFragment
              at hudson.plugins.swarm.PluginImpl.getSwarmSecret(PluginImpl.java:262)
              at hudson.plugins.swarm.PluginImpl.doSlaveInfo(PluginImpl.java:272)
              at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:710)
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
      Caused: java.lang.reflect.InvocationTargetException
              at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:400)
              at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
              at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
              at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
              at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
              at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:280)
              at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
              at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:747)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:878)
              at org.kohsuke.stapler.Stapler.invoke(Stapler.java:676)
              at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:755)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
      [...] 

      The master is unable to load a class: UDPBroadcastFragment is now missing with jenkins 2.220, which got removed in jenkins core with f10d9f95fc ("JENKINS-60913 Remove network discovery services (#4460)").

       

          [JENKINS-61029] Swarm client not working anymore with Jenkins 2.220

          I've created a PR with a commit that re-adds hudson.UDPBroadcastFragment: https://github.com/jenkinsci/jenkins/pull/4486

          Florian Schmaus added a comment - I've created a PR with a commit that re-adds hudson.UDPBroadcastFragment: https://github.com/jenkinsci/jenkins/pull/4486

          Jesse Glick added a comment -

          CC jthompson. This removal was deliberate. The fix should be in swarm-plugin.

          Jesse Glick added a comment - CC jthompson . This removal was deliberate. The fix should be in swarm-plugin .

          Philipp Baer added a comment -

          I'd also recommend to adjust swarm-plugin and disable auto detection if that's not supported anymore.

          Philipp Baer added a comment - I'd also recommend to adjust swarm-plugin and disable auto detection if that's not supported anymore.

          Jenkins doesn't use semantic versioning? Bump to 3.x if you need to do API changes.

          Gabriel Ostrolucký added a comment - Jenkins doesn't use semantic versioning? Bump to 3.x if you need to do API changes.

          Jesse Glick added a comment -

          swarm-plugin could either remove support for automatic detection, or simply inline the UDP broadcast functionality if it is still useful in some contexts. I have no idea which is appropriate; a topic for the plugin maintainer. (basil perhaps?)

          No, Jenkins core does not use semantic versioning.

          Jesse Glick added a comment - swarm-plugin could either remove support for automatic detection, or simply inline the UDP broadcast functionality if it is still useful in some contexts. I have no idea which is appropriate; a topic for the plugin maintainer. ( basil perhaps?) No, Jenkins core does not use semantic versioning.

          Basil Crow added a comment -

          I am not aware of anyone who is still using the support for automatic detection. Since it exposes us to security vulnerabilities, it seems better to remove support for automatic detection rather than to inline the UDP broadcast functionality.

          Basil Crow added a comment - I am not aware of anyone who is still using the support for automatic detection. Since it exposes us to security vulnerabilities, it seems better to remove support for automatic detection rather than to inline the UDP broadcast functionality.

          Basil Crow added a comment -

          Fixed by removing the auto-discovery feature in jenkinsci/swarm-plugin#179 and jenkinsci/swarm-plugin#182.

          Basil Crow added a comment - Fixed by removing the auto-discovery feature in jenkinsci/swarm-plugin#179 and jenkinsci/swarm-plugin#182 .

          Basil Crow added a comment -

          Released in Swarm 3.18.

          Basil Crow added a comment - Released in Swarm 3.18.

          PSA: Don't forget to also update swarm jenkins plugin, not just docker-swarm binary on slaves.

          Gabriel Ostrolucký added a comment - PSA: Don't forget to also update swarm jenkins plugin, not just docker-swarm binary on slaves.

            basil Basil Crow
            phbaer Philipp Baer
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: