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

Folders plugin blocks job creation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Not A Defect
    • Labels:
      None
    • Environment:
      Official docker image or current or older war downloaded from the project page (used in Ubuntu 18.04)
    • Similar Issues:

      Description

      Folders plugin blocks job creation

      User is unable to create a simple job while using a docker image or the war file (and possibly also a standard installation, I did not check that)

       

      This prevents following https://jenkins.io/doc/pipeline/tour/getting-started/ which makes it a higher priority bug since it prevents adoption of Jenkins by new users.

       

      How to simulate:

      1. execute java -jar jenkins.war --httpPort=8080
      2. enter the temporary password on the Jenkins page
      3. use 'Install suggested plugins' option during setup
      4. setup new user
      5. click on 'New item'
      6. Enter name and choose for example 'Multibranch pipeline', click [OK]
      7. The configuration page never loads completely, the 'LOADING' stays displayed

       

      Last 2 lines of the output:

      Dec 22, 2018 1:02:27 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
      INFO: Failed to instantiate optional component com.cloudbees.hudson.plugins.folder.properties.FolderCredentialsProvider$FolderCredentialsProperty$DescriptorImpl; skipping
      

      Request that fails with 500:

      http://localhost:8080/job/job1/configure

       

      Workaround:

      Use the 'Select plugins to install' during the setup and uncheck Folders plugin.

       

       

        Attachments

          Activity

          Hide
          rpoitras Rob Poitras added a comment -

          I just hit this exact issue while going through the Creating your first pipeline tutorial.  First I tried to disable the "Folders" plugin, but that was blocked as the plugin was required.

          This workaround worked for me:

          1. Restart the server.
          2. Delete the problem pipeline.
          3. Create the same pipeline again as per tutorial instructions.

          The second time it created successfully.  No log errors.

           

          Show
          rpoitras Rob Poitras added a comment - I just hit this exact issue while going through the  Creating your first pipeline tutorial.  First I tried to disable the "Folders" plugin, but that was blocked as the plugin was required. This workaround worked for me: Restart the server. Delete the problem pipeline. Create the same pipeline again as per tutorial instructions. The second time it created successfully.  No log errors.  
          Hide
          fcojfernandez Francisco Fernández added a comment -

          Workaround without disabling the plugin:

          1. execute java -jar jenkins.war --httpPort=8080
          2. enter the temporary password on the Jenkins page
          3. use 'Install suggested plugins' option during setup
          4. setup new user
          5. click on 'New item'
          6. Enter name and choose for example 'Multibranch pipeline', click [OK]
          7. The configuration page never loads completely, the 'LOADING' stays displayed

          At this point the issue is reproduced. If I restart the instance (via http://localhost:8080/restart), the issue disappear and I'm able to create any job and I'm even able to edit it (The error 500 has disappear as well)

          Ondrej Pacay and Rob Poitras I would apretiate if you could confirm this workaround is working for you.

          Since there is such an quick and easy workaround I'm changing the priority of the bug and I'll work on this asap.

          Show
          fcojfernandez Francisco Fernández added a comment - Workaround without disabling the plugin: execute java -jar jenkins.war --httpPort=8080 enter the temporary password on the Jenkins page use 'Install suggested plugins' option during setup setup new user click on 'New item' Enter name and choose for example 'Multibranch pipeline', click  [OK] The configuration page never loads completely, the 'LOADING' stays displayed At this point the issue is reproduced. If I restart the instance (via  http://localhost:8080/restart ), the issue disappear and I'm able to create any job and I'm even able to edit it (The error 500 has disappear as well) Ondrej Pacay and Rob Poitras I would apretiate if you could confirm this workaround is working for you. Since there is such an quick and easy workaround I'm changing the priority of the bug and I'll work on this asap.
          Hide
          pao Ondrej Pacay added a comment -

          HI Francisco Fernández,

           

          Yes the workaround is functional.

           

          Thank you, Ondrej

          Show
          pao Ondrej Pacay added a comment - HI Francisco Fernández ,   Yes the workaround is functional.   Thank you, Ondrej
          Hide
          fcojfernandez Francisco Fernández added a comment -

          After some analyse, the plugin is working as expected and it is more an issue with how Jenkins is loading the plugins (that's why the workaround works) and the list of suggested plugins.

          Some context: FolderCredentialsProvider is an optional Extension. It's making use of credentials-plugin features and this plugin is an optional dependency, so it's not installed by default. This behaviour is intended since this extension is not used by cloudbees-folder per se but it exposes it to be used by other plugins. It's responsibility of other plugins to ensure this Extension is loaded via their dependencies. One of the pipeline plugins is using the Extension, so it needs it to be loaded, and they have the dependencies well configured.

          What's happening: In the list of suggested plugins cloudbees-folder is installed before any of the pipeline plugins. As credentials is an optional dependency, the plugin is not installed. When FolderCredentialsProvider is being loaded the class itself is loaded but not the Extension in the Jenkins instance since all the classes from credentials are not present. cloudbees-folder is loaded correctly although Jenkins has not loaded the Extension.
          Then the pipeline plugins are installed. They have dependencies on cloudbees-folder and credentials that are not optional. That installs credentials but not cloudbees-folder, which is already installed and loaded but without the mentioned Extension. That means that:

          • when you want to create the Multibranch Pipeline, this job needs FolderCredentialsProvider, that is not loaded and that's why you receive the message about the failure instantiating the component.
          • if you install all suggested plugins except on cloudbees-folders, when pipeline is going to be installed it will install credentials and cloudbees-folder and the extension FolderCredentialsProvider will be instantiated because the credentials is installed as well.

          Why the workaround works: When you restart the instance, the three plugins are installed, so FolderCredentialsProvider will find the classes from credentials.

          Maybe, if any fix is really needed, it makes more sense to fix the core to mark cloudbees-folder as not suggested (it's loaded by other suggested plugins) here: https://github.com/jenkinsci/jenkins/blob/9c9a8978eeeef918bfb62c335da0a30bcfb6ac20/core/src/main/resources/jenkins/install/platform-plugins.json#L6

          Show
          fcojfernandez Francisco Fernández added a comment - After some analyse, the plugin is working as expected and it is more an issue with how Jenkins is loading the plugins (that's why the workaround works) and the list of suggested plugins. Some context : FolderCredentialsProvider is an optional Extension . It's making use of credentials-plugin features and this plugin is an optional dependency, so it's not installed by default. This behaviour is intended since this extension is not used by cloudbees-folder per se but it exposes it to be used by other plugins. It's responsibility of other plugins to ensure this Extension is loaded via their dependencies. One of the pipeline plugins is using the Extension, so it needs it to be loaded, and they have the dependencies well configured. What's happening : In the list of suggested plugins cloudbees-folder is installed before any of the pipeline plugins. As credentials is an optional dependency, the plugin is not installed. When FolderCredentialsProvider is being loaded the class itself is loaded but not the Extension in the Jenkins instance since all the classes from credentials are not present. cloudbees-folder is loaded correctly although Jenkins has not loaded the Extension. Then the pipeline plugins are installed. They have dependencies on cloudbees-folder and credentials that are not optional. That installs credentials but not cloudbees-folder, which is already installed and loaded but without the mentioned Extension . That means that: when you want to create the Multibranch Pipeline, this job needs FolderCredentialsProvider , that is not loaded and that's why you receive the message about the failure instantiating the component. if you install all suggested plugins except on cloudbees-folders , when pipeline is going to be installed it will install credentials and cloudbees-folder and the extension FolderCredentialsProvider will be instantiated because the credentials is installed as well. Why the workaround works : When you restart the instance, the three plugins are installed, so FolderCredentialsProvider will find the classes from credentials. Maybe, if any fix is really needed, it makes more sense to fix the core to mark cloudbees-folder as not suggested (it's loaded by other suggested plugins) here: https://github.com/jenkinsci/jenkins/blob/9c9a8978eeeef918bfb62c335da0a30bcfb6ac20/core/src/main/resources/jenkins/install/platform-plugins.json#L6

            People

            Assignee:
            fcojfernandez Francisco Fernández
            Reporter:
            pao Ondrej Pacay
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: