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

Upgrading swarm-plugin to 3.24 break master host discovery in docker environment

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • swarm-plugin
    • None

      Before upgrading swarm-plugin to 3.24, we are able to bring up swarm-nodes by specifying the jenkins master docker's service name in -master. An example docker-compose template is follows and it works for 3.23 and earlier versions.

       
      services:
          jenkins_master:
              image: jenkins_image
              ...
          ...
        
          swarm_node:
              image: image that contains swarm-client.jar

              command: java -jar swarm-client.jar -master http://jenkins_master:8080 -executors 1
       
      When starting up the docker-compose.
       
      3.23 successfully connected to the master jenkins:
      INFO: Client invoked with: -executors 1 -master http://jenkins_master:8080 -password ***** -username *****
      Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
      INFO: Connecting to Jenkins master
      Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
      INFO: Attempting to connect to http://jenkins_master:8080/
      Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main createEngine
      INFO: Setting up agent: ***
      Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
      INFO: Jenkins agent is running in headless mode.
      Apr 21, 2021 5:10:50 PM hudson.remoting.Engine startEngine
      INFO: Using Remoting version: 4.5
       
      But 3.24 complained target host is not specified:
      Client invoked with: -executors 1 -master http://jenkins_master:8080

      hudson.plugins.swarm.Client runINFO: Connecting to Jenkins masterApr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client runINFO: Attempting to connect to http://jenkins_master:8080/Apr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
      SEVERE: An error occurredshaded.org.apache.hc.client5.http.ClientProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:181) at shaded.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) at hudson.plugins.swarm.SwarmClient.getJenkinsVersion(SwarmClient.java:590) at hudson.plugins.swarm.SwarmClient.createSwarmAgent(SwarmClient.java:379) at hudson.plugins.swarm.Client.run(Client.java:170) at hudson.plugins.swarm.Client.main(Client.java:53)Caused by: shaded.org.apache.hc.core5.http.ProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.routing.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:65) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.determineRoute(InternalHttpClient.java:125) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:169) ... 5 more
      Apr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
       

          [JENKINS-65428] Upgrading swarm-plugin to 3.24 break master host discovery in docker environment

          William created issue -
          William made changes -
          Description Original: Before upgrading swarm-plugin to 3.24, we are able to bring up swarm-nodes by specifying the jenkins master docker's service name in -master. An example docker-compose template is follows and it works for 3.23 and earlier versions.

           
          services:
              jenkins_master:
                  image: jenkins_image
                  ...
              ...
            
              swarm_node:
                  image: image that contains swarm-client.jar

                  command: java -jar swarm-client.jar -master http://jenkins_master:8080 -executors 1
           
          When starting up the docker-compose.
           
          3.23 successfully connected to the master jenkins:
          INFO: Client invoked with: -executors 1 -labels [foo] -master http://jenkins_master:8080 -name tool_vm -password ***** -username *****
          Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
          INFO: Connecting to Jenkins master
          Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
          INFO: Attempting to connect to http://jenkins_master:8080/
          Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main createEngine
          INFO: Setting up agent: ***
          Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
          INFO: Jenkins agent is running in headless mode.
          Apr 21, 2021 5:10:50 PM hudson.remoting.Engine startEngine
          INFO: Using Remoting version: 4.5
           
          But 3.24 complained target host is not specified:
          Client invoked with: -executors 1 -labels [foo] -master http://jenkins_master:8080 hudson.plugins.swarm.Client runINFO: Connecting to Jenkins masterApr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client runINFO: Attempting to connect to http://jenkins_master:8080/Apr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
          SEVERE: An error occurredshaded.org.apache.hc.client5.http.ClientProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:181) at shaded.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) at hudson.plugins.swarm.SwarmClient.getJenkinsVersion(SwarmClient.java:590) at hudson.plugins.swarm.SwarmClient.createSwarmAgent(SwarmClient.java:379) at hudson.plugins.swarm.Client.run(Client.java:170) at hudson.plugins.swarm.Client.main(Client.java:53)Caused by: shaded.org.apache.hc.core5.http.ProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.routing.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:65) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.determineRoute(InternalHttpClient.java:125) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:169) ... 5 more
          Apr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
           
          New: Before upgrading swarm-plugin to 3.24, we are able to bring up swarm-nodes by specifying the jenkins master docker's service name in -master. An example docker-compose template is follows and it works for 3.23 and earlier versions.

           
           services:
               jenkins_master:
                   image: jenkins_image
                   ...
               ...
             
               swarm_node:
                   image: image that contains swarm-client.jar

                  command: java -jar swarm-client.jar -master [http://jenkins_master:8080|http://jenkins_master:8080/] -executors 1
            
           When starting up the docker-compose.
            
           3.23 successfully connected to the master jenkins:
           INFO: Client invoked with: -executors 1 -labels [foo] -master [http://jenkins_master:8080|http://jenkins_master:8080/] -password ***** -username *****
           Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
           INFO: Connecting to Jenkins master
           Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
           INFO: Attempting to connect to [http://jenkins_master:8080/]
           Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main createEngine
           INFO: Setting up agent: ***
           Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
           INFO: Jenkins agent is running in headless mode.
           Apr 21, 2021 5:10:50 PM hudson.remoting.Engine startEngine
           INFO: Using Remoting version: 4.5
            
           But 3.24 complained target host is not specified:
           Client invoked with: -executors 1 -labels [foo] -master [http://jenkins_master:8080|http://jenkins_master:8080/] hudson.plugins.swarm.Client runINFO: Connecting to Jenkins masterApr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client runINFO: Attempting to connect to [http://jenkins_master:8080/Apr] 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
           SEVERE: An error occurredshaded.org.apache.hc.client5.http.ClientProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:181) at shaded.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) at hudson.plugins.swarm.SwarmClient.getJenkinsVersion(SwarmClient.java:590) at hudson.plugins.swarm.SwarmClient.createSwarmAgent(SwarmClient.java:379) at hudson.plugins.swarm.Client.run(Client.java:170) at hudson.plugins.swarm.Client.main(Client.java:53)Caused by: shaded.org.apache.hc.core5.http.ProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.routing.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:65) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.determineRoute(InternalHttpClient.java:125) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:169) ... 5 more
           Apr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
            
          William made changes -
          Summary Original: Upgrading swarm-plugin to 3.24 or 3.25 seem to break jenkins_master discovery in docker environment New: Upgrading swarm-plugin to 3.24 break host discovery in docker environment
          William made changes -
          Summary Original: Upgrading swarm-plugin to 3.24 break host discovery in docker environment New: Upgrading swarm-plugin to 3.24 break master host discovery in docker environment
          William made changes -
          Description Original: Before upgrading swarm-plugin to 3.24, we are able to bring up swarm-nodes by specifying the jenkins master docker's service name in -master. An example docker-compose template is follows and it works for 3.23 and earlier versions.

           
           services:
               jenkins_master:
                   image: jenkins_image
                   ...
               ...
             
               swarm_node:
                   image: image that contains swarm-client.jar

                  command: java -jar swarm-client.jar -master [http://jenkins_master:8080|http://jenkins_master:8080/] -executors 1
            
           When starting up the docker-compose.
            
           3.23 successfully connected to the master jenkins:
           INFO: Client invoked with: -executors 1 -labels [foo] -master [http://jenkins_master:8080|http://jenkins_master:8080/] -password ***** -username *****
           Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
           INFO: Connecting to Jenkins master
           Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
           INFO: Attempting to connect to [http://jenkins_master:8080/]
           Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main createEngine
           INFO: Setting up agent: ***
           Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
           INFO: Jenkins agent is running in headless mode.
           Apr 21, 2021 5:10:50 PM hudson.remoting.Engine startEngine
           INFO: Using Remoting version: 4.5
            
           But 3.24 complained target host is not specified:
           Client invoked with: -executors 1 -labels [foo] -master [http://jenkins_master:8080|http://jenkins_master:8080/] hudson.plugins.swarm.Client runINFO: Connecting to Jenkins masterApr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client runINFO: Attempting to connect to [http://jenkins_master:8080/Apr] 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
           SEVERE: An error occurredshaded.org.apache.hc.client5.http.ClientProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:181) at shaded.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) at hudson.plugins.swarm.SwarmClient.getJenkinsVersion(SwarmClient.java:590) at hudson.plugins.swarm.SwarmClient.createSwarmAgent(SwarmClient.java:379) at hudson.plugins.swarm.Client.run(Client.java:170) at hudson.plugins.swarm.Client.main(Client.java:53)Caused by: shaded.org.apache.hc.core5.http.ProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.routing.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:65) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.determineRoute(InternalHttpClient.java:125) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:169) ... 5 more
           Apr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
            
          New: Before upgrading swarm-plugin to 3.24, we are able to bring up swarm-nodes by specifying the jenkins master docker's service name in -master. An example docker-compose template is follows and it works for 3.23 and earlier versions.

           
           services:
               jenkins_master:
                   image: jenkins_image
                   ...
               ...
             
               swarm_node:
                   image: image that contains swarm-client.jar

                  command: java -jar swarm-client.jar -master [http://jenkins_master:8080|http://jenkins_master:8080/] -executors 1
            
           When starting up the docker-compose.
            
           *3.23 successfully connected to the master jenkins:*
           INFO: Client invoked with: -executors 1 -master [http://jenkins_master:8080|http://jenkins_master:8080/] -password ***** -username *****
           Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
           INFO: Connecting to Jenkins master
           Apr 21, 2021 5:10:50 PM hudson.plugins.swarm.Client run
           INFO: Attempting to connect to [http://jenkins_master:8080/]
           Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main createEngine
           INFO: Setting up agent: ***
           Apr 21, 2021 5:10:50 PM hudson.remoting.jnlp.Main$CuiListener <init>
           INFO: Jenkins agent is running in headless mode.
           Apr 21, 2021 5:10:50 PM hudson.remoting.Engine startEngine
           INFO: Using Remoting version: 4.5
            
           *But 3.24 complained target host is not specified:*
           Client invoked with: -executors 1 -master [http://jenkins_master:8080|http://jenkins_master:8080/]

          hudson.plugins.swarm.Client runINFO: Connecting to Jenkins masterApr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client runINFO: Attempting to connect to [http://jenkins_master:8080/Apr] 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
           SEVERE: An error occurredshaded.org.apache.hc.client5.http.ClientProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:181) at shaded.org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:75) at hudson.plugins.swarm.SwarmClient.getJenkinsVersion(SwarmClient.java:590) at hudson.plugins.swarm.SwarmClient.createSwarmAgent(SwarmClient.java:379) at hudson.plugins.swarm.Client.run(Client.java:170) at hudson.plugins.swarm.Client.main(Client.java:53)Caused by: shaded.org.apache.hc.core5.http.ProtocolException: Target host is not specified at shaded.org.apache.hc.client5.http.impl.routing.DefaultRoutePlanner.determineRoute(DefaultRoutePlanner.java:65) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.determineRoute(InternalHttpClient.java:125) at shaded.org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:169) ... 5 more
           Apr 21, 2021 5:18:25 PM hudson.plugins.swarm.Client run
            

            Unassigned Unassigned
            juventusland William
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: