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

Deleting project workspace Plugin: Jenkins hudson.Util.deleteFile Error

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • ws-cleanup-plugin
    • None

      Everything went ok in the job, only once deleting the project workspace was getting an error. The files and the directory of C:\CMS\plugins\Login\conf was gone/deleted. So I don't understand this error.

      I don't understand why I getting this error. I used the: Jenkins Workspace Cleanup Plugin

      Deleting project workspace... ERROR: Publisher hudson.plugins.ws_cleanup.WsCleanup aborted due to exception
      java.io.IOException: Unable to delete C:\CMS\plugins\Login - files in dir: [C:\CMS\plugins\Login\conf]
      at hudson.Util.deleteFile(Util.java:236)
      at hudson.Util.deleteRecursive(Util.java:287)
      at hudson.FilePath$11.invoke(FilePath.java:900)
      at hudson.FilePath$11.invoke(FilePath.java:898)
      at hudson.FilePath.act(FilePath.java:832)
      at hudson.FilePath.act(FilePath.java:814)
      at hudson.FilePath.deleteRecursive(FilePath.java:898)
      at hudson.plugins.ws_cleanup.WsCleanup.perform(WsCleanup.java:55)
      at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:27)
      at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:705)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:680)
      at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:658)
      at hudson.model.Build$RunnerImpl.cleanUp(Build.java:171)
      at hudson.model.Run.run(Run.java:1465)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:238)

          [JENKINS-13553] Deleting project workspace Plugin: Jenkins hudson.Util.deleteFile Error

          I also experience the same problem. Jenkins 1.492, WsCleanup 0.10
          Here is the extract fro the log:

          Deleting project workspace... ERROR: Publisher hudson.plugins.ws_cleanup.WsCleanup aborted due to exception
          java.lang.UnsupportedOperationException: Failed to link the library: interface hudson.util.jna.Kernel32
          at hudson.util.jna.InitializationErrorInvocationHandler.invoke(InitializationErrorInvocationHandler.java:28)
          at $Proxy7.GetFileAttributesW(Unknown Source)
          at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:76)
          at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:80)
          at hudson.Util.isSymlink(Util.java:322)
          at hudson.Util.deleteRecursive(Util.java:283)
          at hudson.plugins.ws_cleanup.Cleanup.invoke(Cleanup.java:60)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2309)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:287)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at hudson.remoting.Engine$1$1.run(Engine.java:60)
          at java.lang.Thread.run(Unknown Source)
          Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'kernel32': com.sun.jna.Native.open(Ljava/lang/String;)J
          at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166)
          at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239)
          at com.sun.jna.Library$Handler.<init>(Library.java:140)
          at com.sun.jna.Native.loadLibrary(Native.java:366)
          at com.sun.jna.Native.loadLibrary(Native.java:351)
          at hudson.util.jna.Kernel32Utils.load(Kernel32Utils.java:85)
          at hudson.util.jna.Kernel32.<clinit>(Kernel32.java:37)
          at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:76)
          at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:80)
          at hudson.Util.isSymlink(Util.java:322)
          at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.getFileSize(DiskUsageThread.java:168)
          at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.call(DiskUsageThread.java:162)
          at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.call(DiskUsageThread.java:149)
          ... 10 more

          Alexey Gavrilov added a comment - I also experience the same problem. Jenkins 1.492, WsCleanup 0.10 Here is the extract fro the log: Deleting project workspace... ERROR: Publisher hudson.plugins.ws_cleanup.WsCleanup aborted due to exception java.lang.UnsupportedOperationException: Failed to link the library: interface hudson.util.jna.Kernel32 at hudson.util.jna.InitializationErrorInvocationHandler.invoke(InitializationErrorInvocationHandler.java:28) at $Proxy7.GetFileAttributesW(Unknown Source) at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:76) at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:80) at hudson.Util.isSymlink(Util.java:322) at hudson.Util.deleteRecursive(Util.java:283) at hudson.plugins.ws_cleanup.Cleanup.invoke(Cleanup.java:60) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2309) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:60) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.UnsatisfiedLinkError: Unable to load library 'kernel32': com.sun.jna.Native.open(Ljava/lang/String;)J at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:166) at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:239) at com.sun.jna.Library$Handler.<init>(Library.java:140) at com.sun.jna.Native.loadLibrary(Native.java:366) at com.sun.jna.Native.loadLibrary(Native.java:351) at hudson.util.jna.Kernel32Utils.load(Kernel32Utils.java:85) at hudson.util.jna.Kernel32.<clinit>(Kernel32.java:37) at hudson.util.jna.Kernel32Utils.getWin32FileAttributes(Kernel32Utils.java:76) at hudson.util.jna.Kernel32Utils.isJunctionOrSymlink(Kernel32Utils.java:80) at hudson.Util.isSymlink(Util.java:322) at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.getFileSize(DiskUsageThread.java:168) at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.call(DiskUsageThread.java:162) at hudson.plugins.disk_usage.DiskUsageThread$DiskUsageCallable.call(DiskUsageThread.java:149) ... 10 more

          Another issue here :

          Feb 16, 2017 2:38:22 PM hudson.plugins.ws_cleanup.WsCleanup perform
          SEVERE: null
          java.io.IOException: remote file operation failed: D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT at hudson.remoting.Channel@564de42b:Channel to /10.234.92.90: java.io.IOException: Unable to delete 'D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT\8426-TRUNK\.svn\svn.2dfe2447-5a01-0010-bb42-f3785d0cced7.tmp'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts.
          at hudson.FilePath.act(FilePath.java:992)
          at hudson.FilePath.act(FilePath.java:974)
          at hudson.FilePath.deleteRecursive(FilePath.java:1176)
          at hudson.plugins.ws_cleanup.Wipeout.perform(Wipeout.java:73)
          at hudson.plugins.ws_cleanup.WsCleanup.perform(WsCleanup.java:222)
          at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
          at hudson.model.Build$BuildExecution.cleanUp(Build.java:195)
          at hudson.model.Run.execute(Run.java:1775)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:404)
          Caused by: java.io.IOException: Unable to delete 'D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT\8426-TRUNK\.svn\svn.2dfe2447-5a01-0010-bb42-f3785d0cced7.tmp'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts.
          at hudson.Util.deleteFile(Util.java:248)
          at hudson.FilePath.deleteRecursive(FilePath.java:1209)
          at hudson.FilePath.deleteContentsRecursive(FilePath.java:1218)
          at hudson.FilePath.deleteRecursive(FilePath.java:1200)
          at hudson.FilePath.deleteContentsRecursive(FilePath.java:1218)
          at hudson.FilePath.deleteRecursive(FilePath.java:1200)
          at hudson.FilePath.deleteContentsRecursive(FilePath.java:1218)
          at hudson.FilePath.deleteRecursive(FilePath.java:1200)
          at hudson.FilePath.access$1000(FilePath.java:195)
          at hudson.FilePath$14.invoke(FilePath.java:1179)
          at hudson.FilePath$14.invoke(FilePath.java:1176)
          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
          at hudson.remoting.UserRequest.perform(UserRequest.java:153)
          at hudson.remoting.UserRequest.perform(UserRequest.java:50)
          at hudson.remoting.Request$2.run(Request.java:336)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
          at java.util.concurrent.FutureTask.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at hudson.remoting.Engine$1$1.run(Engine.java:94)
          at java.lang.Thread.run(Unknown Source)
          at ......remote call to Channel to /10.234.92.90(Native Method)
          at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537)
          at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
          at hudson.remoting.Channel.call(Channel.java:822)
          at hudson.FilePath.act(FilePath.java:985)
          ... 13 more
          Caused by: java.nio.file.FileSystemException: D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT\8426-TRUNK\.svn\svn.2dfe2447-5a01-0010-bb42-f3785d0cced7.tmp: The process cannot access the file because it is being used by another process.

          at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)

          Frédéric Meyrou added a comment - Another issue here : Feb 16, 2017 2:38:22 PM hudson.plugins.ws_cleanup.WsCleanup perform SEVERE: null java.io.IOException: remote file operation failed: D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT at hudson.remoting.Channel@564de42b:Channel to /10.234.92.90: java.io.IOException: Unable to delete 'D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT\8426-TRUNK\.svn\svn.2dfe2447-5a01-0010-bb42-f3785d0cced7.tmp'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts. at hudson.FilePath.act(FilePath.java:992) at hudson.FilePath.act(FilePath.java:974) at hudson.FilePath.deleteRecursive(FilePath.java:1176) at hudson.plugins.ws_cleanup.Wipeout.perform(Wipeout.java:73) at hudson.plugins.ws_cleanup.WsCleanup.perform(WsCleanup.java:222) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.model.Build$BuildExecution.cleanUp(Build.java:195) at hudson.model.Run.execute(Run.java:1775) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Caused by: java.io.IOException: Unable to delete 'D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT\8426-TRUNK\.svn\svn.2dfe2447-5a01-0010-bb42-f3785d0cced7.tmp'. Tried 3 times (of a maximum of 3) waiting 0,1 sec between attempts. at hudson.Util.deleteFile(Util.java:248) at hudson.FilePath.deleteRecursive(FilePath.java:1209) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1218) at hudson.FilePath.deleteRecursive(FilePath.java:1200) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1218) at hudson.FilePath.deleteRecursive(FilePath.java:1200) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1218) at hudson.FilePath.deleteRecursive(FilePath.java:1200) at hudson.FilePath.access$1000(FilePath.java:195) at hudson.FilePath$14.invoke(FilePath.java:1179) at hudson.FilePath$14.invoke(FilePath.java:1176) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang.Thread.run(Unknown Source) at ......remote call to Channel to /10.234.92.90(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1537) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:822) at hudson.FilePath.act(FilePath.java:985) ... 13 more Caused by: java.nio.file.FileSystemException: D:\DEV\CI\WS\HIDRG\HIDRG_DEV_8426-TRUNK_coding_SNAPSHOT\8426-TRUNK\.svn\svn.2dfe2447-5a01-0010-bb42-f3785d0cced7.tmp: The process cannot access the file because it is being used by another process. at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)

            Unassigned Unassigned
            gynnad Gynnad Gynnad
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: