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

            phbaer Philipp Baer created issue -
            phbaer Philipp Baer made changes -
            Field Original Value New Value
            Link This issue is caused by JENKINS-60913 [ JENKINS-60913 ]
            flow Florian Schmaus made changes -
            Description Issue most likely casued by JENKINS-60913
            h3. Slave

            Exec:
            {code:java}
            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"{code}
            Log:
            {code:java}
            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 {code}
            h3. Master

            Log:
            {code:java}
            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)
            [...] {code}
            Even though {{-master}} should disable auto discovery, it seems like something is now missing ({{UDPBroadcastFragment}})
            h3. Slave

            Exec:
            {code:java}
            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"{code}
            Log:
            {code:java}
            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 {code}
            h3. Master

            Log:
            {code:java}
            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)
            [...] {code}
            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)").
            h3.  
            oleg_nenashev Oleg Nenashev made changes -
            Priority Major [ 3 ] Blocker [ 1 ]
            Hide
            flow 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

            Show
            flow 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
            Hide
            jglick Jesse Glick added a comment -

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

            Show
            jglick Jesse Glick added a comment - CC Jeff Thompson . This removal was deliberate. The fix should be in swarm-plugin .
            Hide
            phbaer Philipp Baer added a comment -

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

            Show
            phbaer Philipp Baer added a comment - I'd also recommend to adjust swarm-plugin and disable auto detection if that's not supported anymore.
            Hide
            gadelat Gabriel Ostrolucký added a comment -

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

            Show
            gadelat Gabriel Ostrolucký added a comment - Jenkins doesn't use semantic versioning? Bump to 3.x if you need to do API changes.
            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.
            oleg_nenashev Oleg Nenashev made changes -
            Labels regression
            basil Basil Crow made changes -
            Assignee Basil Crow [ basil ]
            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 .
            basil Basil Crow made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Fixed but Unreleased [ 10203 ]
            Hide
            basil Basil Crow added a comment -

            Released in Swarm 3.18.

            Show
            basil Basil Crow added a comment - Released in Swarm 3.18.
            basil Basil Crow made changes -
            Released As 3.18
            Status Fixed but Unreleased [ 10203 ] Resolved [ 5 ]
            basil Basil Crow made changes -
            Remote Link This issue links to "jenkinsci/swarm-plugin#179 (Web Link)" [ 24423 ]
            basil Basil Crow made changes -
            Remote Link This issue links to "jenkinsci/swarm-plugin#182 (Web Link)" [ 24424 ]
            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: