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

New node page incorrectly offers "Launch swarm agent" as a launch method

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • swarm-plugin
    • None

      Hi, 

      I'm new to Jenkins. I could not find a solution in internet.

      I have install a fresh Jenkins installation(Jenkins 2.398) and tried to create a SWARM agent.

      In agent creation page,

      • select "Launch Swarm agent"
      • fill other information
      • click on save. 

      The moment I hit the save button I'm getting

      Oops!

      A problem occurred while processing the request.

      Logging ID=dd362c85-7713-4b52-b327-ca64f493fcf6

       

      What could be the things I'm missing. Please help.

          [JENKINS-71030] New node page incorrectly offers "Launch swarm agent" as a launch method

          Mark Waite added a comment - - edited

          Thanks for the report. I'm able to duplicate the issue with the following steps:

          1. Define the plugins to be downloaded and installed in a plugins.txt file
          2. Create a script to download plugins and start Jenkins like run-jenkins.sh
          3. Run the script bash ./run-jenkins.sh
          4. Complete the setup wizard using the password shown in the console output, choosing to install no additional plugins
          5. Open the node management page at /computer/ and click the "New node" button
          6. Complete the fields of the form and be sure to select "Launch swarm agent" as the "Launch method"
          7. Save the form and confirm that a stack trace is reported in the console log and an error is displayed on the web page

          I believe the root of the bug is that Jenkins is offering you the option to create a swarm agent but that is not how swarm agents are documented to be started. The swarm agent plugin documentation says:

          1. Install the Swarm plugin from the Update Center.
          2. Ensure your agent is running version 11 or later of the Java Runtime Environment (JRE). The recommendation is to use the same JRE distribution and version as the controller.
          3. Download the Swarm client from ${JENKINS_URL}/swarm/swarm-client.jar on your agent.
          4. Run the Swarm client with java -jar path/to/swarm-client.jar -url ${JENKINS_URL} -username ${USERNAME} and one of the authentication options as described in the Global Security Configuration documentation. There are no other required command-line options; run with the -help option to see the available options.

          It is not intended that the administrator will use the "New node" page to define a swarm agent. Swarm agents are created and destroyed inside Jenkins automatically as the swarm agent processes connect to Jenkins and disconnect from Jenkins. The "Launch swarm agent" selection from the menu on the "New node" page is providing an incorrect hint that it is supported to define Jenkins swarm agents from the controller.

          If you'd like to use swarm agents, you need to follow the "Getting started" instructions from the swarm agent plugin documentation.

          If you'd like more information on managing Jenkins agents, refer to https://www.jenkins.io/doc/book/managing/nodes/ for descriptions and videos.

          Mark Waite added a comment - - edited Thanks for the report. I'm able to duplicate the issue with the following steps: Define the plugins to be downloaded and installed in a plugins.txt file Create a script to download plugins and start Jenkins like run-jenkins.sh Run the script bash ./run-jenkins.sh Complete the setup wizard using the password shown in the console output, choosing to install no additional plugins Open the node management page at /computer/ and click the "New node" button Complete the fields of the form and be sure to select "Launch swarm agent" as the "Launch method" Save the form and confirm that a stack trace is reported in the console log and an error is displayed on the web page I believe the root of the bug is that Jenkins is offering you the option to create a swarm agent but that is not how swarm agents are documented to be started . The swarm agent plugin documentation says: Install the Swarm plugin from the Update Center. Ensure your agent is running version 11 or later of the Java Runtime Environment (JRE). The recommendation is to use the same JRE distribution and version as the controller. Download the Swarm client from ${JENKINS_URL}/swarm/swarm-client.jar on your agent. Run the Swarm client with java -jar path/to/swarm-client.jar -url ${JENKINS_URL} -username ${USERNAME} and one of the authentication options as described in the Global Security Configuration documentation. There are no other required command-line options; run with the -help option to see the available options. It is not intended that the administrator will use the "New node" page to define a swarm agent. Swarm agents are created and destroyed inside Jenkins automatically as the swarm agent processes connect to Jenkins and disconnect from Jenkins. The "Launch swarm agent" selection from the menu on the "New node" page is providing an incorrect hint that it is supported to define Jenkins swarm agents from the controller. If you'd like to use swarm agents, you need to follow the "Getting started" instructions from the swarm agent plugin documentation. If you'd like more information on managing Jenkins agents, refer to https://www.jenkins.io/doc/book/managing/nodes/ for descriptions and videos.

          Pradeep added a comment -

          Hi Mark , 

          Thanks much for your response and valuable time. I'm now able to configure the Jenkins with Swarm agent as instructed in your comment. Appreciate the support given,

          Thanks!
          Pradeep

          Pradeep added a comment - Hi Mark ,  Thanks much for your response and valuable time. I'm now able to configure the Jenkins with Swarm agent as instructed in your comment. Appreciate the support given, Thanks! Pradeep

          Mark Waite added a comment -

          Thanks Pradeep. I think we should leave the issue open because the entry in the "New node" page is misleading for users.

          Mark Waite added a comment - Thanks Pradeep. I think we should leave the issue open because the entry in the "New node" page is misleading for users.

            pkumarage Pradeep
            pkumarage Pradeep
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: