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

Jenkins Blue Ocean won't show Agent when creating a Pipeline

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm new to Blue Ocean, and I'm following the tutorial which tells me to run:

      docker run \
      --rm \
      -u root \
      -p 8080:8080 \
      -v jenkins-data:/var/jenkins_home \
      -v /var/run/docker.sock:/var/run/docker.sock \
      -v "$HOME":/home \
      jenkinsci/blueocean

      It fired up the docker instance, I got to the Blue Ocean screen, Clicked on create a new pipeline, set the GitHub token, Etc.

      Update: this also happens when running Jenkins from java directly on my laptop, and installing Ocean Blue plugin:

      java -jar jenkins.war --httpPort=8080

      Now I'm at the part where you select the Agent, but mine has no agent:

      Moreover, if I click the save button and then "save & run" it gets stuck and the docker container output throws:

      WARNING: Error while serving http://localhost:8080/blue/rest/pipeline-metadata/agentMetadata
      java.lang.reflect.InvocationTargetException
      ... <stack trace here> ...
      
      Caused by: java.lang.NoSuchMethodError: org.jenkinsci.plugins.pipeline.modeldefinition.agent.DeclarativeAgentDescriptor.all()Lhudson/ExtensionList;
      

       
      I posted this problem on Stack Overflow but somebody said this might be a new bug. Hope this report helps.

       

        Attachments

        1. screenshot-1.png
          screenshot-1.png
          444 kB
        2. screenshot-2.png
          screenshot-2.png
          287 kB
        3. Screen Shot 2018-04-13 at 7.13.25 PM.png
          Screen Shot 2018-04-13 at 7.13.25 PM.png
          42 kB
        4. Screen Shot 2018-04-13 at 7.13.25 PM.png
          Screen Shot 2018-04-13 at 7.13.25 PM.png
          93 kB
        5. screenshot-3.png
          screenshot-3.png
          622 kB
        6. screenshot-4.png
          screenshot-4.png
          473 kB
        7. screenshot-5.png
          screenshot-5.png
          581 kB
        8. screenshot-6.png
          screenshot-6.png
          634 kB
        9. screenshot-7.png
          screenshot-7.png
          549 kB
        10. screenshot-8.png
          screenshot-8.png
          294 kB

          Issue Links

            Activity

            Hide
            reijis2 Christopher Francisco added a comment -

            1. I was using the repo in the tutorial, I literally just forked it and that was it. (https://github.com/jenkins-docs/creating-a-pipeline-in-blue-ocean)

            2. no Jenkinsfile in it

            3. First time setting up Jenkins on my own, so N/A

            Show
            reijis2 Christopher Francisco added a comment - 1. I was using the repo in the tutorial, I literally just forked it and that was it. ( https://github.com/jenkins-docs/creating-a-pipeline-in-blue-ocean ) 2. no Jenkinsfile in it 3. First time setting up Jenkins on my own, so N/A
            Hide
            kshultz Karl Shultz added a comment - - edited

            Many thanks for following up! We suspect root cause is actually in the pipeline-model-definition plugin. JENKINS-50833 has been opened.

            Show
            kshultz Karl Shultz added a comment - - edited Many thanks for following up! We suspect root cause is actually in the pipeline-model-definition plugin. JENKINS-50833 has been opened.
            Hide
            kshultz Karl Shultz added a comment - - edited

            Christopher Francisco, Elia Zammuto, and Jens Villadsen,

            Andrew Bayer has released a fix for the issue, and I'm pretty sure that once you update the plugin versions, this problem will be resolved. Since at least one of you is new to setting up your own Jenkins, here's how to go about it:

            1. Launch your container and log in if necessary:

            2. In the navigation bar at the left, click "Manage Jenkins." That'll take you to the below screen, where you'll want to pick "Manage Plugins." In the below screenshot, "Manage Plugins" is highlighted, but I haven't clicked it yet:

            3. Once there, you should see the Manage Plugins screen, with the "Updates" tab preselected for you. If your list looks empty or nearly empty, click the "Check Now" button. That should produce a list much like what you see here:

            4. Click "Select All," then click "Download now and install after restart."

            5. You'll see the updates taking place. Click the checkbox at the bottom to restart Jenkins once it's ready.

            6. Once it's back up, if you go back to Manage Plugins and check the "Installed" tab, you should see that your versions of the `pipeline-model-definition` and its related plugins have been updated to 1.2.9. You can spot this easily by looking for the "Downgrade to 1.2.8" buttons at the right.

            7. For historical purposes, here's my install before taking the updated version of pipeline-model-definition. As you can see, the Pipeline editor does not show the Agent settings, which is exactly the bug reported here:

            8. And now, with the upgrades in place, the Agent dropdown is available in the Pipeline Editor:

            I hope that's helpful if we have newcomers to Jenkins looking at this issue.

            Thanks again for reporting the bug! I'm going to go ahead and mark it as Resolved, but feel free to follow up here if you run into any trouble.

            Show
            kshultz Karl Shultz added a comment - - edited Christopher Francisco , Elia Zammuto , and Jens Villadsen , Andrew Bayer has released a fix for the issue, and I'm pretty sure that once you update the plugin versions, this problem will be resolved. Since at least one of you is new to setting up your own Jenkins, here's how to go about it: 1. Launch your container and log in if necessary: 2. In the navigation bar at the left, click "Manage Jenkins." That'll take you to the below screen, where you'll want to pick "Manage Plugins." In the below screenshot, "Manage Plugins" is highlighted, but I haven't clicked it yet: 3. Once there, you should see the Manage Plugins screen, with the "Updates" tab preselected for you. If your list looks empty or nearly empty, click the "Check Now" button. That should produce a list much like what you see here: 4. Click "Select All," then click "Download now and install after restart." 5. You'll see the updates taking place. Click the checkbox at the bottom to restart Jenkins once it's ready. 6. Once it's back up, if you go back to Manage Plugins and check the "Installed" tab, you should see that your versions of the `pipeline-model-definition` and its related plugins have been updated to 1.2.9. You can spot this easily by looking for the "Downgrade to 1.2.8" buttons at the right. 7. For historical purposes, here's my install before taking the updated version of pipeline-model-definition. As you can see, the Pipeline editor does not show the Agent settings, which is exactly the bug reported here: 8. And now, with the upgrades in place, the Agent dropdown is available in the Pipeline Editor: I hope that's helpful if we have newcomers to Jenkins looking at this issue. Thanks again for reporting the bug! I'm going to go ahead and mark it as Resolved, but feel free to follow up here if you run into any trouble.
            Hide
            kshultz Karl Shultz added a comment -

            Fixed via this PR in pipeline-model-definition.

            Show
            kshultz Karl Shultz added a comment - Fixed via this PR in pipeline-model-definition .
            Hide
            theelix Elia Zammuto added a comment -

            Working as Intented, thank you!

            Show
            theelix Elia Zammuto added a comment - Working as Intented, thank you!

              People

              • Assignee:
                Unassigned
                Reporter:
                reijis2 Christopher Francisco
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: