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

Installing plugin (without restarting) is broken with other non-refreshable extension.

      Installing plugins without restart don't work in case if non-refreshable extension is activated. In my case I had https://wiki.jenkins-ci.org/display/JENKINS/Persona+Plugin installed, and received following exception:

      hudson.util.IOException2: Failed to dynamically deploy this plugin
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1137)
      at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:955)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: hudson.util.IOException2: Failed to install build-name-setter-plugin plugin
      at hudson.PluginManager.dynamicLoad(PluginManager.java:365)
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1133)
      ... 7 more
      Caused by: jenkins.ExtensionRefreshException: hudson.plugins.persona.xml.XmlPersonaFinder@1664d71 doesn't support refresh
      at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:1970)
      at hudson.PluginManager.dynamicLoad(PluginManager.java:358)
      ... 8 more

          [JENKINS-12803] Installing plugin (without restarting) is broken with other non-refreshable extension.

          evernat added a comment - - edited

          @Gavriil
          And so this plugin currently says that its extension is not refreshable and you hope that it can be installed without restarting?
          I would say that something like this, saying that it can not be refreshed and so that it can not be installed without restarting is expected.
          In fact, if this plugin and the update-center can not do that, they should certainly say it.

          What do you expect instead?

          evernat added a comment - - edited @Gavriil And so this plugin currently says that its extension is not refreshable and you hope that it can be installed without restarting? I would say that something like this, saying that it can not be refreshed and so that it can not be installed without restarting is expected. In fact, if this plugin and the update-center can not do that, they should certainly say it. What do you expect instead?

          Hi evernat,

          A year has passed, but as I remember the issue – is that I'd try to install other plugin not this. And installation process failed due to non-refreshable extension was activated.

          So I expect that installation of one plugin shouldn't be affected with other extension.

          Gavriil Konovalenko added a comment - Hi evernat, A year has passed, but as I remember the issue – is that I'd try to install other plugin not this. And installation process failed due to non-refreshable extension was activated. So I expect that installation of one plugin shouldn't be affected with other extension.

          evernat added a comment -

          I understand your point of view now. It makes sense.

          But I think that the best solution is that this Persona plugin just upgrades its parent Jenkins dependency.
          And so that a "refresh()" method is added in hudson.plugins.persona.xml.XmlPersonaFinder
          It would make it compatible with installing a plugin without restarting.

          Anyway, this issue is probably valid and needs to be fixed one way or the other.
          (But I am not the author of the persona plugin)

          evernat added a comment - I understand your point of view now. It makes sense. But I think that the best solution is that this Persona plugin just upgrades its parent Jenkins dependency. And so that a "refresh()" method is added in hudson.plugins.persona.xml.XmlPersonaFinder It would make it compatible with installing a plugin without restarting. Anyway, this issue is probably valid and needs to be fixed one way or the other. (But I am not the author of the persona plugin)

          Code changed in jenkins
          User: ssogabe
          Path:
          pom.xml
          src/main/java/hudson/plugins/persona/random/RandomPersonaFinder.java
          src/main/java/hudson/plugins/persona/xml/XmlPersonaFinder.java
          http://jenkins-ci.org/commit/persona-plugin/19321630fe9c0cccbc5a670baac4b7b1415807e4
          Log:
          [FIXED JENKINS-12803] support installing plugin without restarting

          Compare: https://github.com/jenkinsci/persona-plugin/compare/601e38a4c03c...19321630fe9c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: ssogabe Path: pom.xml src/main/java/hudson/plugins/persona/random/RandomPersonaFinder.java src/main/java/hudson/plugins/persona/xml/XmlPersonaFinder.java http://jenkins-ci.org/commit/persona-plugin/19321630fe9c0cccbc5a670baac4b7b1415807e4 Log: [FIXED JENKINS-12803] support installing plugin without restarting Compare: https://github.com/jenkinsci/persona-plugin/compare/601e38a4c03c...19321630fe9c

          Still an issue for me with persona-2.3..

          hudson.util.IOException2: Failed to dynamically deploy this plugin
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317)
          at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104)
          at java.lang.Thread.run(Thread.java:722)
          Caused by: hudson.util.IOException2: Failed to install jeff-plugin plugin
          at hudson.PluginManager.dynamicLoad(PluginManager.java:438)
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313)
          ... 6 more
          Caused by: java.lang.NullPointerException
          at java.util.ArrayList.batchRemove(ArrayList.java:669)
          at java.util.ArrayList.removeAll(ArrayList.java:640)
          at hudson.plugins.persona.xml.XmlPersonaFinder.refresh(XmlPersonaFinder.java:87)
          at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2138)
          at hudson.PluginManager.dynamicLoad(PluginManager.java:431)
          ... 7 more

          Johno Crawford added a comment - Still an issue for me with persona-2.3.. hudson.util.IOException2: Failed to dynamically deploy this plugin at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1317) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1116) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:104) at java.lang.Thread.run(Thread.java:722) Caused by: hudson.util.IOException2: Failed to install jeff-plugin plugin at hudson.PluginManager.dynamicLoad(PluginManager.java:438) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1313) ... 6 more Caused by: java.lang.NullPointerException at java.util.ArrayList.batchRemove(ArrayList.java:669) at java.util.ArrayList.removeAll(ArrayList.java:640) at hudson.plugins.persona.xml.XmlPersonaFinder.refresh(XmlPersonaFinder.java:87) at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2138) at hudson.PluginManager.dynamicLoad(PluginManager.java:431) ... 7 more

          Might be as simple as wrapping the removeAll call with a null check on parsedWrappers but I will wait until Seiji has commented on the issue.

          Johno Crawford added a comment - Might be as simple as wrapping the removeAll call with a null check on parsedWrappers but I will wait until Seiji has commented on the issue.

          Increasing priority as this blocks installing custom hpi plugins.

          Johno Crawford added a comment - Increasing priority as this blocks installing custom hpi plugins.

          sogabe added a comment -

          Thanks, ver 2.4 will fix this.

          sogabe added a comment - Thanks, ver 2.4 will fix this.

          Thanks! I will reopen if necessary.

          Johno Crawford added a comment - Thanks! I will reopen if necessary.

          Jason Jardina added a comment -

          Can this be reopened, possible regression?  I just had this happen to me:

          I'm running Jenkins 2.190.3, following instructions here: https://help.veracode.com/reader/PgbNZUD7j8aY7iG~hQZWxQ/_4G8gT1rhWMgVVtCI1C57A

          I downloaded the Veracode Jenkins Plugin, custom hpi plugin.  When I get to step 5, upload the plugin, it starts to install and I get the following error:

          veracode-jenkins-plugin
          [http://10.0.3.131:8080/static/ed09d5fa/images/24x24/red.png Failure -
          jenkins.ExtensionRefreshException: org.jvnet.hudson.test.TestExtensionLoader@9ac9542<mailto:org.jvnet.hudson.test.TestExtensionLoader@9ac9542> doesn't support refresh
          at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2670)
          at hudson.PluginManager.start(PluginManager.java:951)
          at hudson.PluginManager.dynamicLoad(PluginManager.java:935)
          Caused: java.io.IOException: Failed to install veracode-jenkins-plugin plugin
          at hudson.PluginManager.dynamicLoad(PluginManager.java:942)
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2052)
          Caused: java.io.IOException: Failed to dynamically deploy this plugin
          at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2056)
          at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1740)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:112)
          at java.lang.Thread.run(Thread.java:748)

          Even though the error presented itself and showed failure for install of plugin.  I rebooted the Jenkins server and it showed installed in the plugin section.  I then was able to use the plugin successfully.

          Jason Jardina added a comment - Can this be reopened, possible regression?  I just had this happen to me: I'm running Jenkins 2.190.3, following instructions here: https://help.veracode.com/reader/PgbNZUD7j8aY7iG~hQZWxQ/_4G8gT1rhWMgVVtCI1C57A I downloaded the Veracode Jenkins Plugin, custom hpi plugin.  When I get to step 5, upload the plugin, it starts to install and I get the following error: veracode-jenkins-plugin [http://10.0.3.131:8080/static/ed09d5fa/images/24x24/red.png Failure - jenkins.ExtensionRefreshException: org.jvnet.hudson.test.TestExtensionLoader@9ac9542<mailto:org.jvnet.hudson.test.TestExtensionLoader@9ac9542 > doesn't support refresh at jenkins.model.Jenkins.refreshExtensions(Jenkins.java:2670) at hudson.PluginManager.start(PluginManager.java:951) at hudson.PluginManager.dynamicLoad(PluginManager.java:935) Caused: java.io.IOException: Failed to install veracode-jenkins-plugin plugin at hudson.PluginManager.dynamicLoad(PluginManager.java:942) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2052) Caused: java.io.IOException: Failed to dynamically deploy this plugin at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:2056) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1740) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:112) at java.lang.Thread.run(Thread.java:748) Even though the error presented itself and showed failure for install of plugin.  I rebooted the Jenkins server and it showed installed in the plugin section.  I then was able to use the plugin successfully.

            Unassigned Unassigned
            gkonovalenko Gavriil Konovalenko
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: