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

pmd plugin and checkstyle plugin fail to install

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • None
    • Windows Server 2012 R2 Standard, Jenkins 1.608

      I've been trying to install pmd plugin and checkstyle plugin on my Jenkins server for a while using different method (automatic, manual) without a success. In both cases I'm getting the same error:
      ava.io.IOException: Failed to dynamically deploy this plugin
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1322)
      at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1121)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
      at java.lang.Thread.run(Unknown Source)
      Caused by: java.nio.file.FileSystemException: D:\Jenkins\plugins\checkstyle\WEB-INF\lib\annotations-2.0.0.jar: The process cannot access the file because it is being used by another process.

      at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
      at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
      at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
      at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
      at java.nio.file.Files.delete(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at hudson.Util.deleteFile(Util.java:247)
      at hudson.Util.deleteRecursive(Util.java:310)
      at hudson.Util.deleteContentsRecursive(Util.java:212)
      at hudson.Util.deleteRecursive(Util.java:301)
      at hudson.Util.deleteContentsRecursive(Util.java:212)
      at hudson.Util.deleteRecursive(Util.java:301)
      at hudson.Util.deleteContentsRecursive(Util.java:212)
      at hudson.Util.deleteRecursive(Util.java:301)
      at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:522)
      at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:166)
      at hudson.PluginManager.dynamicLoad(PluginManager.java:448)
      at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1318)
      ... 6 more

      This was originally tried on Jenkins 1.565.2 and then I upgraded to Jenkins 1.608 hoping this will resolve the issue but it didn't. I also tried to install previous version of checkstyle plugin but no luck with that either.
      I used Process Explorer to see what's blocking annotations-2.0.0.jar but it only shows java. What could be the issue here? The Static Analysis Utilities plugin is installed (1.71).

          [JENKINS-27887] pmd plugin and checkstyle plugin fail to install

          Daniel Beck added a comment -

          This looks like the plugins already existed prior to installation. Shut down Jenkins, delete folders and uploaded hpi files for these two plugins in JENKINS_HOME/plugins, start Jenkins, and try again.

          Daniel Beck added a comment - This looks like the plugins already existed prior to installation. Shut down Jenkins, delete folders and uploaded hpi files for these two plugins in JENKINS_HOME/plugins, start Jenkins, and try again.

          Hi Daniel,
          I've tried that before with Jenkins 1.565.2 and tried it now again with Jenkins 1.608 but no luck. After I did this the plugins still appear as available in Plugin Manager rather than Installed but I can see the folders being created on the server. I also tried stopping jenkis service, deleting the folders and installing the plugins from plugin manager but the same error occurs

          Sylwia Kludacz added a comment - Hi Daniel, I've tried that before with Jenkins 1.565.2 and tried it now again with Jenkins 1.608 but no luck. After I did this the plugins still appear as available in Plugin Manager rather than Installed but I can see the folders being created on the server. I also tried stopping jenkis service, deleting the folders and installing the plugins from plugin manager but the same error occurs

          Ulli Hafner added a comment -

          Did you reboot the machine? Seems that a zombie process still holds a lock to the files. This is no bug in on of the plug-ins...

          Ulli Hafner added a comment - Did you reboot the machine? Seems that a zombie process still holds a lock to the files. This is no bug in on of the plug-ins...

          Hi Ulli,
          I did reboot the server as well but it didn't solve the problem. The strange thing is that I can see the proper folder structure created on the server inside the plugin folder with all the files being created but Jenkins still doesn't recognize the plugin as installed. How Jenkins knows which plugins are installed?

          Sylwia Kludacz added a comment - Hi Ulli, I did reboot the server as well but it didn't solve the problem. The strange thing is that I can see the proper folder structure created on the server inside the plugin folder with all the files being created but Jenkins still doesn't recognize the plugin as installed. How Jenkins knows which plugins are installed?

          Ulli Hafner added a comment -

          Can you delete the folder JENKINS_HOME/plugins/checkstyle before you start Jenkins? Then the plug-in will automatically be extracted again. Do you have a virus scanner that might block the affected file annotations-2.0.0.jar?

          Ulli Hafner added a comment - Can you delete the folder JENKINS_HOME/plugins/checkstyle before you start Jenkins? Then the plug-in will automatically be extracted again. Do you have a virus scanner that might block the affected file annotations-2.0.0.jar?

          Daniel Beck added a comment -

          Also, disable the Windows search indexer service.

          Daniel Beck added a comment - Also, disable the Windows search indexer service.

          I have tried deleting JENKINS_HOME/plugins/checkstyle before Jenkins start or even I rebooted the server after the deletion and I could see the checkstyle folder being correctly created on the server with all correct files and folders. However the plugin is still not recognized by Jenkins as installed and it appears in available list. The virus scan runs daily but it starts later then I have run all my trials.
          Regarding the windows search service- I've checked and this is not installed on the server

          Sylwia Kludacz added a comment - I have tried deleting JENKINS_HOME/plugins/checkstyle before Jenkins start or even I rebooted the server after the deletion and I could see the checkstyle folder being correctly created on the server with all correct files and folders. However the plugin is still not recognized by Jenkins as installed and it appears in available list. The virus scan runs daily but it starts later then I have run all my trials. Regarding the windows search service- I've checked and this is not installed on the server

          Ulli Hafner added a comment -

          I see, i.e. the exception that you have reported is not shown anymore, but the plug-in is still not visible? Then please show the log messages of Jenkins until all plugins are loaded:

          INFORMATION: Started all plugins
          Apr 20, 2015 12:13:46 PM jenkins.InitReactorRunner$1 onAttained
          INFORMATION: Augmented all extensions
          

          Or is the exception still present?

          Ulli Hafner added a comment - I see, i.e. the exception that you have reported is not shown anymore, but the plug-in is still not visible? Then please show the log messages of Jenkins until all plugins are loaded: INFORMATION: Started all plugins Apr 20, 2015 12:13:46 PM jenkins.InitReactorRunner$1 onAttained INFORMATION: Augmented all extensions Or is the exception still present?

          The exception that I have reported is shown when I try to re-install the plugin via browser in Manage Plugins. If I try to re-install the plugin manually on Jenkins server by stopping Jenkins, then deleting the plugin file and folder and starting the Jenkins again then I can see the folder structure created fully but Jenkins still shows the plugin in manage plugins as available rather than installed. Where do I find the log message of Jenkins for loading the plugins?

          Sylwia Kludacz added a comment - The exception that I have reported is shown when I try to re-install the plugin via browser in Manage Plugins. If I try to re-install the plugin manually on Jenkins server by stopping Jenkins, then deleting the plugin file and folder and starting the Jenkins again then I can see the folder structure created fully but Jenkins still shows the plugin in manage plugins as available rather than installed. Where do I find the log message of Jenkins for loading the plugins?

          Ulli Hafner added a comment -

          Is this still a problem? I can't see what I can do here ...

          Ulli Hafner added a comment - Is this still a problem? I can't see what I can do here ...

            drulli Ulli Hafner
            skl Sylwia Kludacz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: