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

Mina ssh plugin 2.8.0-30.vf9df64641cb_d has a cyclic dependency, breaks Jenkins plugin loading

      Jenkins fails to load plugins due to a cyclic dependency in the mina ssh plugins (core and common) 2.8.0-30.vf9df64641cb_d.

      Message that is reported in the log is

      2022-07-18 14:45:47.783+0000 [id=32]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
      2022-07-18 14:45:48.198+0000 [id=34]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Support Core Plugin v1201.v8d1f54a_6ec7c (support-core)
      java.io.IOException: Failed to load: Support Core Plugin (support-core 1201.v8d1f54a_6ec7c)
       - Required plugin is disabled: Credentials Plugin (credentials)
              at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:1018)
              at hudson.PluginManager$2$1$1.run(PluginManager.java:542)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
              at jenkins.model.Jenkins$5.runTask(Jenkins.java:1158)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
              at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)
      2022-07-18 14:45:48.199+0000 [id=29]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline: Input Step v449.v77f0e8b_845c4 (pipeline-input-step)
      java.io.IOException: Failed to load: Pipeline: Input Step (pipeline-input-step 449.v77f0e8b_845c4)
       - Required plugin is disabled: Credentials Plugin (credentials)
              at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:1018)
              at hudson.PluginManager$2$1$1.run(PluginManager.java:542)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
              at jenkins.model.Jenkins$5.runTask(Jenkins.java:1158)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
              at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)
      2022-07-18 14:45:48.200+0000 [id=29]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Pipeline Graph Analysis Plugin v195.v5812d95a_a_2f9 (pipeline-graph-analysis)
      java.io.IOException: Failed to load: Pipeline Graph Analysis Plugin (pipeline-graph-analysis 195.v5812d95a_a_2f9)
       - Failed to load: Pipeline: Input Step (pipeline-input-step 449.v77f0e8b_845c4)
              at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:1018)
              at hudson.PluginManager$2$1$1.run(PluginManager.java:542)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
              at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
              at jenkins.model.Jenkins$5.runTask(Jenkins.java:1158)
              at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
              at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
              at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)
      

      Steps to duplicate the problem

      1. Download the attached plugins.txt
      2. Run the following shell script:
        if [ ! -f ../jenkins-plugin-manager-2.12.8.jar ]; then
          wget https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/2.12.8/jenkins-plugin-manager-2.12.8.jar
          mv jenkins-plugin-manager-2.12.8.jar ..
        fi
        if [ ! -d plugins ]; then
          mkdir plugins
        fi
        java -jar ../jenkins-plugin-manager-2.12.8.jar --jenkins-version 2.346.2 --latest false --plugin-download-directory plugins --plugin-file plugins.txt
        
        if [ ! -f ../jenkins-2.346.2.war ]; then
          wget https://get.jenkins.io/war-stable/2.346.2/jenkins.war
          mv jenkins.war ../jenkins-2.346.2.war
        fi
        JENKINS_HOME=. java -jar ../jenkins-2.346.2.war
        

      Expected results

      Jenkins starts with all plugins enabled.

      Actual results

      Jenkins reports that plugins were not enabled. and is missing functionality from those plugins.

      Workaround

      Use the previous releases of the mina plugins:

      In your plugins.txt file

      mina-sshd-api-common:latest:https://get.jenkins.io/plugins/mina-sshd-api-common/2.8.0-21.v493b_6b_db_22c6/mina-sshd-api-common.hpi
      mina-sshd-api-core:latest:https://get.jenkins.io/plugins/mina-sshd-api-core/2.8.0-21.v493b_6b_db_22c6/mina-sshd-api-core.hpi
      

      From the plugin manager page

      Use the Advanced tab of the plugin manager to upload a plugin from the following URLs:

      Restart Jenkins after uploading both plugins.

          [JENKINS-69034] Mina ssh plugin 2.8.0-30.vf9df64641cb_d has a cyclic dependency, breaks Jenkins plugin loading

          I have the same problem, adding some more infos.

          Jenkins LTS, 2.346.2, installed from docker image. As soon as I update plugins to latest version, jenkins stop working properly.

          The main message from the dashboard says:

          The following plugins are deactivated because of cyclic dependencies, most likely you can resolve the issue by updating these to a newer version

          commons-lang3 v3.x Jenkins Api Plugin v3.12.0.0

          commons-text API Plugin v1.9-9.v39a_53e2e0343

          Configuration as Code Plugin v1466.v2d4119502006

          Credentials Plugin v1139.veb_9579fca_33b_

          Mina SSHD API :: Core v2.8.0-30.vf9df64641cb_d

          SSH Credentials Plugin v291.v8211e4f8efb_c

          SSH server v3.242.va_db_9da_b_26a_c3

          During startup logs complain about the same problem:

          2022-07-18 13:24:18.375+0000 [id=23]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
          2022-07-18 13:24:18.619+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization
          2022-07-18 13:24:20.581+0000 [id=29]    SEVERE  hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> Plugin:commons-text-api -> Plugin:commons-lang3-api -> Plugin:sshd
          2022-07-18 13:24:20.589+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins
          2022-07-18 13:24:20.945+0000 [id=29]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Plain Credentials Plugin v1.8 (plain-credentials)
          java.io.IOException: Failed to load: Plain Credentials Plugin (plain-credentials 1.8)
           - Required plugin is disabled: Credentials Plugin (credentials)
                  at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:1018)
                  at hudson.PluginManager$2$1$1.run(PluginManager.java:542)
                  at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)
                  at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)
                  at jenkins.model.Jenkins$5.runTask(Jenkins.java:1158)
                  at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)
                  at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)
                  at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
                  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
                  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
                  at java.base/java.lang.Thread.run(Thread.java:829)

          Rolling back to previous version solves the problem.

          Giancarlo Rosso added a comment - I have the same problem, adding some more infos. Jenkins LTS, 2.346.2, installed from docker image. As soon as I update plugins to latest version, jenkins stop working properly. The main message from the dashboard says: The following plugins are deactivated because of cyclic dependencies, most likely you can resolve the issue by updating these to a newer version commons-lang3 v3.x Jenkins Api Plugin v3.12.0.0 commons-text API Plugin v1.9-9.v39a_53e2e0343 Configuration as Code Plugin v1466.v2d4119502006 Credentials Plugin v1139.veb_9579fca_33b _ Mina SSHD API :: Core v2.8.0-30.vf9df64641cb_d SSH Credentials Plugin v291.v8211e4f8efb_c SSH server v3.242.va_db_9da_b_26a_c3 During startup logs complain about the same problem: 2022-07-18 13:24:18.375+0000 [id=23]    INFO    winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled 2022-07-18 13:24:18.619+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: Started initialization 2022-07-18 13:24:20.581+0000 [id=29]    SEVERE  hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> Plugin:commons-text-api -> Plugin:commons-lang3-api -> Plugin:sshd 2022-07-18 13:24:20.589+0000 [id=29]    INFO    jenkins.InitReactorRunner$1#onAttained: Listed all plugins 2022-07-18 13:24:20.945+0000 [id=29]    SEVERE  jenkins.InitReactorRunner$1#onTaskFailed: Failed Loading plugin Plain Credentials Plugin v1.8 (plain-credentials) java.io.IOException: Failed to load: Plain Credentials Plugin (plain-credentials 1.8)  - Required plugin is disabled: Credentials Plugin (credentials)         at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:1018)         at hudson.PluginManager$2$1$1.run(PluginManager.java:542)         at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:175)         at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:305)         at jenkins.model.Jenkins$5.runTask(Jenkins.java:1158)         at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:222)         at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:121)         at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)         at java.base/java.lang.Thread.run(Thread.java:829) Rolling back to previous version solves the problem.

          Mark Waite added a comment -

          Thanks for reporting it. The issue appears to be in the https://plugins.jenkins.io/mina-sshd-api-common/ or https://plugins.jenkins.io/mina-sshd-api-core/ plugins (or both).

          I've changed the assigned component.

          Mark Waite added a comment - Thanks for reporting it. The issue appears to be in the https://plugins.jenkins.io/mina-sshd-api-common/ or https://plugins.jenkins.io/mina-sshd-api-core/ plugins (or both). I've changed the assigned component.

          Mark Waite added a comment -

          jamsdeni I failed to read the original (missing) description of this issue. puja123_user reported "its not working" and provided no other information in the issue report. puja123_user also reported "its not working" in JENKINS-68982 a week ago. After no response, I closed it.

          I don't object to using this issue to track the Apache mina plugin dependency issue, but that may not be the issue that puja123_user was originally trying to report. Are you OK if we continue to use this issue to track the Apache mina problem or would you prefer that another issue is opened that starts with the description of the problem and how to duplicate it?

          Mark Waite added a comment - jamsdeni I failed to read the original (missing) description of this issue. puja123_user reported "its not working" and provided no other information in the issue report. puja123_user also reported "its not working" in JENKINS-68982 a week ago. After no response, I closed it. I don't object to using this issue to track the Apache mina plugin dependency issue, but that may not be the issue that puja123_user was originally trying to report. Are you OK if we continue to use this issue to track the Apache mina problem or would you prefer that another issue is opened that starts with the description of the problem and how to duplicate it?

          Henry Borchers added a comment - - edited

          This is broke Jenkins for me too but i'm not getting the option to roll back. 

           

          Edit: I got it to roll back. 

          Henry Borchers added a comment - - edited This is broke Jenkins for me too but i'm not getting the option to roll back.    Edit: I got it to roll back. 

          I can't load the Credentials Plugin after updating.

          Cycle detected: Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> Plugin:commons-text-api -> Plugin:commons-lang3-api -> Plugin:sshd  

          Henry Borchers added a comment - I can't load the Credentials Plugin after updating. Cycle detected: Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:configuration-as-code -> Plugin:commons-text-api -> Plugin:commons-lang3-api -> Plugin:sshd  

          Daniel Beck added a comment - - edited

          The best solution is probably for commons-lang3-api to get a core dependency bump, so it doesn't have the implied dependency on sshd (i.e., depend on 2.289.x or newer).

          (Assuming there's a good reason for the feature introducing the dependency in mina-sshd-api-core.)

          Daniel Beck added a comment - - edited The best solution is probably for commons-lang3-api to get a core dependency bump, so it doesn't have the implied dependency on sshd (i.e., depend on 2.289.x or newer). (Assuming there's a good reason for the feature introducing the dependency in mina-sshd-api-core .)

          Jesse Glick added a comment -

          Could probably be solved more readily in, say, commons-lang3-api.

          Jesse Glick added a comment - Could probably be solved more readily in, say, commons-lang3-api .

          Jesse Glick added a comment -

          JENKINS-64105 is the proximate cause, but the fault does not really lie in this plugin—that just happened to reveal an existing potential problem.

          Jesse Glick added a comment - JENKINS-64105 is the proximate cause, but the fault does not really lie in this plugin—that just happened to reveal an existing potential problem.

          Jesse Glick added a comment -

          Finally managed to reproduce by running 2.346.2 and installing a bunch of plugins incl. configuration-as-code and then restarting.

          Jesse Glick added a comment - Finally managed to reproduce by running 2.346.2 and installing a bunch of plugins incl. configuration-as-code and then restarting.

          Jesse Glick added a comment -

          Jesse Glick added a comment - Filed as https://github.com/jenkinsci/commons-lang3-api-plugin/issues/18

          Daniel Beck added a comment -

          configuration-as-code could also just not depend on commons-text-api, which depends on commons-lang3-api (there are no other dependent plugins for either).

          Daniel Beck added a comment - configuration-as-code could also just not depend on commons-text-api, which depends on commons-lang3-api (there are no other dependent plugins for either).

          Ian Boudreaux added a comment - - edited

          henryborchers how did you get it to rollback? I am getting the same issue and also unable to roll the mina plugins back through the Jenkins plugin menu.

          UPDATE: For anyone else that comes along this post, I fixed it by downgrading the mina-ssh plugins manually through the jenkins server command line: https://techies-world.com/how-to-downgrade-jenkins-plugins-through-commandline/

          Ian Boudreaux added a comment - - edited henryborchers how did you get it to rollback? I am getting the same issue and also unable to roll the mina plugins back through the Jenkins plugin menu. UPDATE: For anyone else that comes along this post, I fixed it by downgrading the mina-ssh plugins manually through the jenkins server command line: https://techies-world.com/how-to-downgrade-jenkins-plugins-through-commandline/

          Michael Miner added a comment -

          I am having the same issue as Ian above. Any updates would be greatly appreciated. 

          Michael Miner added a comment - I am having the same issue as Ian above. Any updates would be greatly appreciated. 

          Mark Waite added a comment -

          michaelbminer if the plugin manager is available, you can use the Advanced tab of the plugin manager to upload a plugin from the following URLs:

          I believe that you'll want to upload both of them before you restart Jenkins.

          Mark Waite added a comment - michaelbminer if the plugin manager is available, you can use the Advanced tab of the plugin manager to upload a plugin from the following URLs: https://get.jenkins.io/plugins/mina-sshd-api-common/2.8.0-21.v493b_6b_db_22c6/mina-sshd-api-common.hpi https://get.jenkins.io/plugins/mina-sshd-api-core/2.8.0-21.v493b_6b_db_22c6/mina-sshd-api-core.hpi I believe that you'll want to upload both of them before you restart Jenkins.

          Jesse Glick added a comment -

          For anyone who missed it: update configuration-as-code for a hotfix.

          Jesse Glick added a comment - For anyone who missed it: update configuration-as-code for a hotfix.

          Assaf Katz added a comment -

          jglick I upgraded to latest version of configuration-as-code (1512.vb_79d418d5fc8) and it still not working with the same issue.

          Assaf Katz added a comment - jglick I upgraded to latest version of configuration-as-code (1512.vb_79d418d5fc8) and it still not working with the same issue.

          Mark Waite added a comment -

          assafkatz3b then there is something different you're doing than everyone else is doing. You'll need to describe your situation much more precisely for others to help you identify what you're doing differently than others are doing.

          Some examples of things that you might be doing differently than others:

          • Did you restart Jenkins after updating the plugin?
          • What version of the Jenkins controller are you running?
          • What other plugins (and their versions) are you running?
          • What is the exact error message that is being reported?
          • What operating system is running the Jenkins controller?
          • Are there configuration settings in your controller that might make your controller different from other controllers?

          Mark Waite added a comment - assafkatz3b  then there is something different you're doing than everyone else is doing. You'll need to describe your situation much more precisely for others to help you identify what you're doing differently than others are doing. Some examples of things that you might be doing differently than others: Did you restart Jenkins after updating the plugin? What version of the Jenkins controller are you running? What other plugins (and their versions) are you running? What is the exact error message that is being reported? What operating system is running the Jenkins controller? Are there configuration settings in your controller that might make your controller different from other controllers?

          Jesse Glick added a comment -

          assafkatz3b possibly you are seeing a distinct problem. Best to open a separate issue linked to this one with error messages and complete, minimal steps to reproduce from scratch.

          Jesse Glick added a comment - assafkatz3b possibly you are seeing a distinct problem. Best to open a separate issue linked to this one with error messages and complete, minimal steps to reproduce from scratch.

          Assaf Katz added a comment -

          jglick and markewaite I got exactly the same problem as described above:

          2022-08-01 13:20:56.572+0000 [id=28]    SEVERE  hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:sshd
          2022-08-01 13:20:56.574+0000 [id=28]    SEVERE  hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:trilead-api -> Plugin:sshd

          Dockerfileis attached, it should answer other questions, if I missed something, please tell me.

          Thanks

           

          Assaf Katz added a comment - jglick and markewaite I got exactly the same problem as described above: 2022-08-01 13:20:56.572+0000 [id=28]    SEVERE  hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:sshd 2022-08-01 13:20:56.574+0000 [id=28]    SEVERE  hudson.PluginManager$1$3$2$1#reactOnCycle: found cycle in plugin dependencies: (root=Plugin:sshd, deactivating all involved) Plugin:sshd -> Plugin:mina-sshd-api-core -> Plugin:ssh-credentials -> Plugin:credentials -> Plugin:trilead-api -> Plugin:sshd Dockerfile is attached, it should answer other questions, if I missed something, please tell me. Thanks  

          Mark Waite added a comment - - edited

          assafkatz3b you are running Jenkins 2.306 in that Dockerfile. There are multiple security advisories published for Jenkins 2.306. If you intend to remain with Jenkins weekly, then you should update to the most recent Jenkins weekly release, 2.361. If you update less frequently, then you should update to the most recent Jenkins LTS 2.346.2.

          Mark Waite added a comment - - edited assafkatz3b you are running Jenkins 2.306 in that Dockerfile. There are multiple security advisories published for Jenkins 2.306. If you intend to remain with Jenkins weekly, then you should update to the most recent Jenkins weekly release, 2.361. If you update less frequently, then you should update to the most recent Jenkins LTS 2.346.2.

          Assaf Katz added a comment -

          markewaite I upgraded the docker file to 2.346.2, this didn't help. Then I let Jenkins decide which plugins' versions to use and now it is working. So the problem is still the same issue but with probably some default plugin

          Thanks

          Assaf Katz added a comment - markewaite I upgraded the docker file to 2.346.2, this didn't help. Then I let Jenkins decide which plugins' versions to use and now it is working. So the problem is still the same issue but with probably some default plugin Thanks

          Daniel Beck added a comment -

          assafkatz3b 's problem appears to be an outdated version of credentials plugin (2.6.2 or older, obsolete since Dec 2021).

          Daniel Beck added a comment - assafkatz3b 's problem appears to be an outdated version of credentials plugin (2.6.2 or older, obsolete since Dec 2021).

            jglick Jesse Glick
            puja123_user Puja Dube
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: