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

Swarm client not working anymore with Jenkins 2.220

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: swarm-plugin
    • Labels:
    • Environment:
      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
    • Similar Issues:
    • Released As:
      3.18

      Description

      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)").

       

        Attachments

          Issue Links

            Activity

            Hide
            jglick 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 Crow perhaps?)

            No, Jenkins core does not use semantic versioning.

            Show
            jglick 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 Crow perhaps?) No, Jenkins core does not use semantic versioning.
            Hide
            basil 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.

            Show
            basil 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.
            Hide
            basil Basil Crow added a comment -

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

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

            Released in Swarm 3.18.

            Show
            basil Basil Crow added a comment - Released in Swarm 3.18.
            Hide
            gadelat Gabriel Ostrolucký added a comment -

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

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

              People

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

                Dates

                Created:
                Updated:
                Resolved: