java.io.IOException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We have our Jenkins master running on a NFS 4.1 mount (AWS EFS). When a job completes we see the following in the logs: {noformat} Aug 09, 2016 4:21:09 PM INFO com.cloudbees.jenkins.plugins.amazonecs.ECSService deleteTask Delete ECS Slave task: arn:aws:ecs:us-east-1:XXXXXXXXXXXX:task/80b3bc38-774c-4bbe-9e79-f9db126a2b9b Aug 09, 2016 4:21:09 PM WARNING hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor monitor Failed to monitor jenkins-ecs-d6d51f89f024 for Free Disk Space java.util.concurrent.ExecutionException: hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown at hudson.remoting.Request$1.get(Request.java:282) at hudson.remoting.Request$1.get(Request.java:207) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:96) at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:305) Caused by: hudson.remoting.RequestAbortedException: hudson.remoting.Channel$OrderlyShutdown at hudson.remoting.Request.abort(Request.java:303) at hudson.remoting.Channel.terminate(Channel.java:847) at hudson.remoting.Channel$CloseCommand.execute(Channel.java:1080) at hudson.remoting.Channel$1.handle(Channel.java:501) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:83) Caused by: hudson.remoting.Channel$OrderlyShutdown ... 3 more Caused by: Command close created at at hudson.remoting.Command.<init>(Command.java:62) at hudson.remoting.Command.<init>(Command.java:47) at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:822) at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:822) at hudson.remoting.Channel.close(Channel.java:867) at hudson.remoting.Channel$CloseCommand.execute(Channel.java:825) at hudson.remoting.Channel$ReaderThread.run(Channel.java:1106) Aug 09, 2016 4:21:09 PM WARNING hudson.slaves.SlaveComputer kill Unable to delete agent logs java.io.IOException: Unable to delete '/var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. at hudson.Util.deleteRecursive(Util.java:355) at hudson.slaves.SlaveComputer.kill(SlaveComputer.java:670) at hudson.model.AbstractCIBase.killComputer(AbstractCIBase.java:86) at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:205) at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1338) at jenkins.model.Nodes$4.run(Nodes.java:219) at hudson.model.Queue._withLock(Queue.java:1320) at hudson.model.Queue.withLock(Queue.java:1197) at jenkins.model.Nodes.removeNode(Nodes.java:210) at jenkins.model.Jenkins.removeNode(Jenkins.java:1860) at hudson.slaves.AbstractCloudSlave.terminate(AbstractCloudSlave.java:70) at com.cloudbees.jenkins.plugins.amazonecs.ECSComputer.terminate(ECSComputer.java:62) at com.cloudbees.jenkins.plugins.amazonecs.ECSComputer.taskCompleted(ECSComputer.java:47) at hudson.model.queue.WorkUnitContext.synchronizeEnd(WorkUnitContext.java:140) at hudson.model.Executor.finish1(Executor.java:457) at hudson.model.Executor.run(Executor.java:430) Caused by: java.nio.file.FileSystemException: /var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024/.nfs9e9ba4fd7c349fa200000003: Device or resource busy at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1165) at hudson.Util.tryOnceDeleteFile(Util.java:296) at hudson.Util.tryOnceDeleteRecursive(Util.java:373) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:392) at hudson.Util.tryOnceDeleteRecursive(Util.java:372) at hudson.Util.deleteRecursive(Util.java:350) ... 15 more {noformat} Looking at the Jenkins master I do indeed see the log file still open: {noformat} eborgstrom@devops-jenkins-7d98bfe3:/var/lib/jenkins$ sudo lsof +D /var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 26119 jenkins 486w REG 0,25 22 11428909888000270242 /var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024/.nfs9e9ba4fd7c349fa200000003 eborgstrom@devops-jenkins-7d98bfe3:/var/lib/jenkins$ find /var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024 -ls 414054371676357616 4 drwxr-xr-x 2 jenkins jenkins 4096 Aug 9 23:21 /var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024 11428909888000270242 4 -rw-r--r-- 1 jenkins jenkins 22 Aug 9 23:21 /var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024/.nfs9e9ba4fd7c349fa200000003 {noformat} This means agents remain around and need to be cleaned up manually. The logs should be fully closed before the slave is deleted.
    via by Evan Borgstrom,
  • I was using the Selenium plugin prior to Jenkins 2.0 release without any problems. When I tried to install the Selenium plugin after upgrading to Jenkins 2.0 (now on 2.1) I receive this error: java.io.IOException: Failed to dynamically deploy this plugin at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1750) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1511) at java.util.concurrent.Executors$RunnableAdapter.call(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: C:\Users\tdjenkins\.jenkins\plugins\selenium\WEB-INF\lib\commons-lang3-3.4.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.deleteIfExists(Unknown Source) at java.nio.file.Files.deleteIfExists(Unknown Source) at hudson.Util.deleteFile(Util.java:260) at hudson.Util.deleteRecursive(Util.java:314) at hudson.Util.deleteContentsRecursive(Util.java:226) at hudson.Util.deleteRecursive(Util.java:305) at hudson.Util.deleteContentsRecursive(Util.java:226) at hudson.Util.deleteRecursive(Util.java:305) at hudson.Util.deleteContentsRecursive(Util.java:226) at hudson.Util.deleteRecursive(Util.java:305) at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:602) at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:173) at hudson.PluginManager.dynamicLoad(PluginManager.java:697) at hudson.PluginManager.dynamicLoad(PluginManager.java:663) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1746) It successfully installed in the update center (blue circle) but the plugin wasn't available after restarting. I also tried manually deleting the plugin and reinstalling it no avail. Could you provide any insight on whether this is a bug or on how to get around this error?
    via by Keegan Caradonna,
  • I have issues that svn cannot open file because it is used by another process. This is jenkins process. There is folowing stack trace. Cleaning local Directory . java.io.IOException: Unable to delete 'd:\work\jenkins\Hero android vk\workspace\.'. Tried 3 times (of a maximum of 3) waiting 0,1 секунд between attempts. at hudson.Util.deleteContentsRecursive(Util.java:237) at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:81) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170) at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:183) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:894) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:830) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.nio.file.FileSystemException: d:\work\jenkins\Hero android vk\workspace\.\.svn\svn.fdd9d029-5501-0010-b743-efffc94e5483.tmp: Процесс не может получить доступ к файлу, так как этот файл занят другим процессом. 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.deleteIfExists(Unknown Source) at java.nio.file.Files.deleteIfExists(Unknown Source) at hudson.Util.tryOnceDeleteFile(Util.java:296) at hudson.Util.tryOnceDeleteRecursive(Util.java:373) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:392) at hudson.Util.tryOnceDeleteRecursive(Util.java:372) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:392) at hudson.Util.deleteContentsRecursive(Util.java:232) ... 21 more It seems that svn plugin does not close all file streams/files.
    via by Sergey Solozhentsev,
  • I was using the Selenium plugin prior to Jenkins 2.0 release without any problems. When I tried to install the Selenium plugin after upgrading to Jenkins 2.0 (now on 2.1) I receive this error: java.io.IOException: Failed to dynamically deploy this plugin at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1750) at hudson.model.UpdateCenter$DownloadJob.run(UpdateCenter.java:1511) at java.util.concurrent.Executors$RunnableAdapter.call(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: C:\Users\tdjenkins\.jenkins\plugins\selenium\WEB-INF\lib\commons-lang3-3.4.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.deleteIfExists(Unknown Source) at java.nio.file.Files.deleteIfExists(Unknown Source) at hudson.Util.deleteFile(Util.java:260) at hudson.Util.deleteRecursive(Util.java:314) at hudson.Util.deleteContentsRecursive(Util.java:226) at hudson.Util.deleteRecursive(Util.java:305) at hudson.Util.deleteContentsRecursive(Util.java:226) at hudson.Util.deleteRecursive(Util.java:305) at hudson.Util.deleteContentsRecursive(Util.java:226) at hudson.Util.deleteRecursive(Util.java:305) at hudson.ClassicPluginStrategy.explode(ClassicPluginStrategy.java:602) at hudson.ClassicPluginStrategy.createPluginWrapper(ClassicPluginStrategy.java:173) at hudson.PluginManager.dynamicLoad(PluginManager.java:697) at hudson.PluginManager.dynamicLoad(PluginManager.java:663) at hudson.model.UpdateCenter$InstallationJob._run(UpdateCenter.java:1746) It successfully installed in the update center (blue circle) but the plugin wasn't available after restarting. I also tried manually deleting the plugin and reinstalling it no avail. Could you provide any insight on whether this is a bug or on how to get around this error?
    via by Keegan Caradonna,
  • I have issues that svn cannot open file because it is used by another process. This is jenkins process. There is folowing stack trace. Cleaning local Directory . java.io.IOException: Unable to delete 'd:\work\jenkins\Hero android vk\workspace\.'. Tried 3 times (of a maximum of 3) waiting 0,1 секунд between attempts. at hudson.Util.deleteContentsRecursive(Util.java:237) at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:81) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:170) at hudson.scm.subversion.UpdateUpdater$TaskImpl.perform(UpdateUpdater.java:183) at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162) at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:894) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:830) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1269) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.nio.file.FileSystemException: d:\work\jenkins\Hero android vk\workspace\.\.svn\svn.fdd9d029-5501-0010-b743-efffc94e5483.tmp: Процесс не может получить доступ к файлу, так как этот файл занят другим процессом. 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.deleteIfExists(Unknown Source) at java.nio.file.Files.deleteIfExists(Unknown Source) at hudson.Util.tryOnceDeleteFile(Util.java:296) at hudson.Util.tryOnceDeleteRecursive(Util.java:373) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:392) at hudson.Util.tryOnceDeleteRecursive(Util.java:372) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:392) at hudson.Util.deleteContentsRecursive(Util.java:232) ... 21 more It seems that svn plugin does not close all file streams/files.
    via by Sergey Solozhentsev,
    • java.io.IOException: Unable to delete '/var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. at hudson.Util.deleteRecursive(Util.java:355) at hudson.slaves.SlaveComputer.kill(SlaveComputer.java:670) at hudson.model.AbstractCIBase.killComputer(AbstractCIBase.java:86) at hudson.model.AbstractCIBase.updateComputerList(AbstractCIBase.java:205) at jenkins.model.Jenkins.updateComputerList(Jenkins.java:1338) at jenkins.model.Nodes$4.run(Nodes.java:219) at hudson.model.Queue._withLock(Queue.java:1320) at hudson.model.Queue.withLock(Queue.java:1197) at jenkins.model.Nodes.removeNode(Nodes.java:210) at jenkins.model.Jenkins.removeNode(Jenkins.java:1860) at hudson.slaves.AbstractCloudSlave.terminate(AbstractCloudSlave.java:70) at com.cloudbees.jenkins.plugins.amazonecs.ECSComputer.terminate(ECSComputer.java:62) at com.cloudbees.jenkins.plugins.amazonecs.ECSComputer.taskCompleted(ECSComputer.java:47) at hudson.model.queue.WorkUnitContext.synchronizeEnd(WorkUnitContext.java:140) at hudson.model.Executor.finish1(Executor.java:457) at hudson.model.Executor.run(Executor.java:430) Caused by: java.nio.file.FileSystemException: /var/lib/jenkins/logs/slaves/jenkins-ecs-d6d51f89f024/.nfs9e9ba4fd7c349fa200000003: Device or resource busy at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1165) at hudson.Util.tryOnceDeleteFile(Util.java:296) at hudson.Util.tryOnceDeleteRecursive(Util.java:373) at hudson.Util.tryOnceDeleteContentsRecursive(Util.java:392) at hudson.Util.tryOnceDeleteRecursive(Util.java:372) at hudson.Util.deleteRecursive(Util.java:350) ... 15 more

    Users with the same issue

    Unknown visitor1 times, last one,
    rsprangemeijer
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    4 more bugmates