java.nio.file.DirectoryNotEmptyException

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.

  • Hello, On the latest version 1.546 for a maven build I get this error: {noformat} Started by user anonymous ln builds/lastSuccessfulBuild /home/dev/.jenkins/jobs/MyBuild/lastSuccessful failed java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastSuccessful at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1783) at hudson.model.Run.updateSymlinks(Run.java:1764) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) ln builds/lastStableBuild /home/dev/.jenkins/jobs/MyBuild/lastStable failed java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastStable at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1783) at hudson.model.Run.updateSymlinks(Run.java:1765) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Building in workspace /home/dev/.jenkins/jobs/MyBuild/workspace Updating svn://myweb.com/repos/Events/trunk at revision '2014-01-10T15:06:09.745 +0000' At revision 1974 WARNING: clock of the subversion server appears to be out of sync. This can result in inconsistent check out behavior. no change for svn://myweb.com/repos/Events/trunk since the previous build Parsing POMs {noformat} It does not seem to get the latest update from the svn. Switching back to 1.544 fixed the issue. Cheers Greg
    via by Greg Huber,
  • Hello, On the latest version 1.546 for a maven build I get this error: {noformat} Started by user anonymous ln builds/lastSuccessfulBuild /home/dev/.jenkins/jobs/MyBuild/lastSuccessful failed java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastSuccessful at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1783) at hudson.model.Run.updateSymlinks(Run.java:1764) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) ln builds/lastStableBuild /home/dev/.jenkins/jobs/MyBuild/lastStable failed java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastStable at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1783) at hudson.model.Run.updateSymlinks(Run.java:1765) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Building in workspace /home/dev/.jenkins/jobs/MyBuild/workspace Updating svn://myweb.com/repos/Events/trunk at revision '2014-01-10T15:06:09.745 +0000' At revision 1974 WARNING: clock of the subversion server appears to be out of sync. This can result in inconsistent check out behavior. no change for svn://myweb.com/repos/Events/trunk since the previous build Parsing POMs {noformat} It does not seem to get the latest update from the svn. Switching back to 1.544 fixed the issue. Cheers Greg
    via by Greg Huber,
  • Originally reported in https://issues.jenkins-ci.org/browse/JENKINS-20630, then moved here. Linards L added a comment - 03/Dec/13 11:33 AM - edited Still not fully functional. Reverted to v1.529. After first upgrade from v1.529 - it booted. After I updated more than 10 plugins and restarted ( second time, no jobs were finished / launched ) jenkins with v1.542, it again died with Jetty issues / spam in logs. My updated plugins: Artifactory Plugin This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager. 2.2.1 (2.1.7) Credentials Plugin This plugin allows you to store credentials in Jenkins. 1.9.3 1.6 CVS Plugin This bundled plugin integrates Jenkins with CVS version control system. 2.11 2.9 Disk Usage Plugin This plugin records disk usage. 0.23 0.20 HTML Publisher Plugin 1.3 1.2 JIRA Plugin This plugin integrates Atlassian JIRA to Jenkins. Brīdinājums: Šis spraudnis ir paredzēts Jenkins 1.533 un jaunākai versijai. Tas var gan strādāt, gan nestrādāt ar Jūsu Jenkins instalāciju. 1.39 (1.36) JobConfigHistory Plugin Saves copies of all job and system configurations. 2.5 2.4 Maven Project Plugin Jenkins plugin for building Maven 2/3 jobs via a special project type. Brīdinājums: Šis spraudnis ir paredzēts Jenkins 1.532 un jaunākai versijai. Tas var gan strādāt, gan nestrādāt ar Jūsu Jenkins instalāciju. 2.0 1.529 Monitoring external jobs Adds the ability to monitor the result of externally executed jobs. 1.2 1.1 Nested View Plugin View type to allow grouping job views into multiple levels instead of one big list of tabs. 1.14 1.10 Parameterized Trigger Plugin This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build. 2.21 2.20 SSH Credentials Plugin This plugin allows you to store SSH credentials in Jenkins. Brīdinājums: Jaunā versija nav savietojama ar esošo uzstādīto spraudņa versiju. Jobs, kuri izmanto šo spraudni, var būt par iemeslu šo Jobu pārkonfigurācijai. 1.6 0.3 SSH Slaves plugin This plugin allows you to manage slaves running on *nix machines over SSH. Brīdinājums: Jaunā versija nav savietojama ar esošo uzstādīto spraudņa versiju. Jobs, kuri izmanto šo spraudni, var būt par iemeslu šo Jobu pārkonfigurācijai. 1.5 0.25 Subversion Plugin This plugin adds the Subversion support (via SVNKit) to Jenkins. 1.54 1.51 Warnings Plugin This plugin generates the trend report for compiler warnings in the console log or in log files. 4.38 4.35 cforce added a comment - 12/Dec/13 12:41 PM @Linards L Please post ur error logs. Did you test with Jenkins 1.543? Linards L added a comment - 13/Dec/13 12:31 PM - edited @cforce, I will do it now, but it will not be valid test anymore because once I reverted to v1.529, I updated plugins. So it might work now, but it does not cover the issue I had earlier - crash after second reboot ( after plugins update ). Test scenarion: 1. Up and running jenkins v1.529 with master and three slaves; All slaves offline; 2. Plugins - all updated ( from my last attempt ( see date of my previous comment here )); 3. Creating a slave ; installing as windows service ; starting it - up and running; 3.1 Updating java to 1.7u45 ; 3.2 Cannot launch slave-agent.jnlp because previously FAILED installation left old jars in slave directory. I had to delete them to make slave-agent.jlpn connectable, so I could install it as service. 4. Performing automatic upgrade with one job running and one in queue ; waiting till it finishes; Resulting in error from console before returning Finished: SUCCESS in console: ln builds\lastStableBuild c:\jenkins_master\jobs\trunk-build\lastStable failed java.nio.file.DirectoryNotEmptyException: c:\jenkins_master\jobs\trunk-ExportDlls\lastStable 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 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.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1070) at hudson.model.AbstractBuild.createSymlink(AbstractBuild.java:494) at hudson.model.AbstractBuild.access$700(AbstractBuild.java:105) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:729) at hudson.model.Run.execute(Run.java:1628) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:247) 5. Rebooting jenkins; 6. Updating plugins, if available. Plugins to be updated: Credentials Plugin This plugin allows you to store credentials in Jenkins. 1.9.4 1.9.3 LDAP Plugin Security realm based on LDAP authentication. 1.7 1.6 Mailer This plugin allows you to configure email notifications. This is a break-out of the original core based email component. 1.6 1.5 Throttle Concurrent Builds Plugin This plugin allows for throttling the number of concurrent builds of a project running per node or globally. 1.8.1 1.8 7. Checking result... [!] Error hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.NullPointerException at hudson.WebAppMain$3.run(WebAppMain.java:234) Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.NullPointerException at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269) at jenkins.InitReactorRunner.run(InitReactorRunner.java:44) at jenkins.model.Jenkins.executeReactor(Jenkins.java:908) at jenkins.model.Jenkins.<init>(Jenkins.java:807) at hudson.model.Hudson.<init>(Hudson.java:82) at hudson.model.Hudson.<init>(Hudson.java:78) at hudson.WebAppMain$3.run(WebAppMain.java:222) Caused by: java.lang.NullPointerException at java.io.Reader.<init>(Unknown Source) at java.io.InputStreamReader.<init>(Unknown Source) at org.codehaus.groovy.runtime.DefaultGroovyMethods.getText(DefaultGroovyMethods.java:16092) at groovy.lang.GroovyShell$7.run(GroovyShell.java:714) at groovy.lang.GroovyShell$7.run(GroovyShell.java:711) at java.security.AccessController.doPrivileged(Native Method) at groovy.lang.GroovyShell.parse(GroovyShell.java:711) at groovy.lang.GroovyShell.parse(GroovyShell.java:790) at hudson.util.spring.BeanBuilder.parse(BeanBuilder.java:133) at hudson.security.SecurityRealm.createFilter(SecurityRealm.java:426) at hudson.security.HudsonFilter.reset(HudsonFilter.java:140) at jenkins.model.Jenkins.setSecurityRealm(Jenkins.java:2048) at jenkins.model.Jenkins$20.run(Jenkins.java:2631) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:897) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) jenkins.err: http://pastie.org/8550005 I general, in each stage there was some small issues. This is definelty NOT fixed. Linards L added a comment - 15/Dec/13 6:47 PM - edited Repeated update process. Now only updatable plugin was: Parameterized Trigger Plugin This plugin lets you trigger new builds when your build has completed, with various ways of specifying parameters for the new build. 2.22 2.21 Result is the same. First reboot is ok. Second - after updating plugin - total crash. Again back to v1.529.
    via by Linards L,
  • Dec 11, 2014 10:01:21 AM INFO hudson.model.Run execute Project #84 main build action completed: FAILURE Dec 11, 2014 10:01:21 AM WARNING jenkins.model.PeepholePermalink updateCache Failed to update hudson.maven.MavenModuleSet@f8fa970[Project] lastFailedBuild permalink for Project #84 java.nio.file.DirectoryNotEmptyException: /jenkins/jobs/builds/lastFailedBuild at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:254) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:115) at java.nio.file.Files.delete(Files.java:1088) at sun.reflect.GeneratedMethodAccessor850.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:619) at hudson.Util.deleteFile(Util.java:247) at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:113) at jenkins.model.PeepholePermalink.writeSymlink(PeepholePermalink.java:200) at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:150) at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:237) at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:199) at hudson.model.Run.execute(Run.java:1810) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Dec 11, 2014 10:01:21 AM WARNING jenkins.model.PeepholePermalink updateCache Failed to update hudson.maven.MavenModuleSet@f8fa970[Project] lastUnsuccessfulBuild permalink for Project #84 java.nio.file.DirectoryNotEmptyException: /jenkins/jobs/Project/builds/lastUnsuccessfulBuild at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:254) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:115) at java.nio.file.Files.delete(Files.java:1088) at sun.reflect.GeneratedMethodAccessor850.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:619) at hudson.Util.deleteFile(Util.java:247) at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:113) at jenkins.model.PeepholePermalink.writeSymlink(PeepholePermalink.java:200) at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:150) at jenkins.model.PeepholePermalink$RunListenerImpl.onCompleted(PeepholePermalink.java:237) at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:199) at hudson.model.Run.execute(Run.java:1810) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240)
    via by Amgad Hanafy,
  • I moved our Jenkins instance to new server by copying all files with correct permissions and ownerships, and now we get such error in log for every job, which makes log useless. This bug is similar to JENKINS-17594. Not sure which recovery steps should I take to get rid of it. Contents of directory /var/lib/jenkins/jobs/Admin/jobs/Prepare_Jenkins_Repo_All_Slaves/builds/lastSuccessfulBuild: drwxr-xr-x 2 jenkins jenkins 4096 Aug 12 14:28 . drwxr-xr-x 8 jenkins jenkins 4096 Aug 20 07:35 .. -rw-r--r-- 1 jenkins jenkins 3802 Aug 12 14:28 build.xml -rw-r--r-- 1 jenkins jenkins 6 Aug 12 14:28 changelog.xml -rw-r--r-- 1 jenkins jenkins 1658 Aug 12 14:28 injectedEnvVars.txt -rw-r--r-- 1 jenkins jenkins 5992 Aug 12 14:28 log Aug 19, 2015 8:29:29 AM jenkins.model.PeepholePermalink updateCache WARNING: Failed to update hudson.model.FreeStyleProject@e9551b4[Admin/Prepare_Jenkins_Repo_All_Slaves] lastSuccessfulBuild permalink for Admin/Prepare_Jenkins_Repo_All_Slaves #4 java.nio.file.DirectoryNotEmptyException: /var/lib/jenkins/jobs/Admin/jobs/Prepare_Jenkins_Repo_All_Slaves/builds/lastSuccessfulBuild at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1126) at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at hudson.Util.deleteFile(Util.java:247) at hudson.util.AtomicFileWriter.commit(AtomicFileWriter.java:113) at jenkins.model.PeepholePermalink.writeSymlink(PeepholePermalink.java:200) at jenkins.model.PeepholePermalink.updateCache(PeepholePermalink.java:150) at jenkins.model.PeepholePermalink.resolve(PeepholePermalink.java:122) at hudson.model.Job.getLastSuccessfulBuild(Job.java:891) at jenkins.tasks.SimpleBuildStep$LastBuildActionFactory.createFor(SimpleBuildStep.java:111) at jenkins.tasks.SimpleBuildStep$LastBuildActionFactory.createFor(SimpleBuildStep.java:101) at hudson.model.Actionable.createFor(Actionable.java:107) at hudson.model.Actionable.getAllActions(Actionable.java:98) at hudson.model.Actionable.getActions(Actionable.java:119) at org.jenkinsci.plugins.testresultsanalyzer.TestResultsAnalyzerExtension.createFor(TestResultsAnalyzerExtension.java:19) at hudson.model.AbstractProject.createTransientActions(AbstractProject.java:769) at hudson.model.Project.createTransientActions(Project.java:241) at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:758) at hudson.model.AbstractProject.onLoad(AbstractProject.java:342) at hudson.model.Project.onLoad(Project.java:98) at hudson.model.Items.load(Items.java:327) at hudson.model.ItemGroupMixIn.loadChildren(ItemGroupMixIn.java:109) at com.cloudbees.hudson.plugins.folder.Folder.onLoad(Folder.java:239) at hudson.model.Items.load(Items.java:327) at jenkins.model.Jenkins$17.run(Jenkins.java:2666) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282) at jenkins.model.Jenkins$7.runTask(Jenkins.java:905) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
    via by Jakub Gladykowski,
  • observed in the following script {noformat} node() { withCredentials([[$class: 'ZipFileBinding', credentialsId: 'zip-credentials', variable: 'ZIP_LOC']]) { echo '1' withCredentials([[$class: 'FileBinding', credentialsId: 'ssh-key', variable: 'MY_SSH_KEY']]) { echo '2' sh 'echo Hello World - ${ZIP_LOC} --- ${MY_SSH_KEY}' } } } {noformat} there was an issue with the second withCredentials step but the workflow logs list the following {noformat} Running: Bind credentials to variables : Start Running: Bind credentials to variables : Body : Start Running: Print Message 1 Running: Bind credentials to variables : Start Running: Bind credentials to variables : End Running: Bind credentials to variables : Body : End Running: Bind credentials to variables : End Running: Change Directory : Body : End Running: Change Directory : End Running: Allocate node : Body : End Running: Allocate node : End Running: End of Workflow java.io.IOException: remote file operation failed: /scratch/jenkins/secretFiles/8ae515c7-76d4-4021-aff3-233263e97a71 at hudson.remoting.Channel@76710f3e:400b174c: java.nio.file.DirectoryNotEmptyException: /scratch/jenkins/secretFiles/8ae515c7-76d4-4021-aff3-233263e97a71/credentials.zip at hudson.FilePath.act(FilePath.java:985) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.deleteRecursive(FilePath.java:1169) at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding$UnbinderImpl.unbind(FileBinding.java:76) at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Callback.cleanup(BindingStep.java:176) at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Callback.onFailure(BindingStep.java:189) at org.jenkinsci.plugins.workflow.cps.CpsBodyExecution$FailureAdapter.receive(CpsBodyExecution.java:294) at com.cloudbees.groovy.cps.impl.ContinuationGroup.throwException(ContinuationGroup.java:203) at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:75) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:106) at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:79) at sun.reflect.GeneratedMethodAccessor664.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:40) at com.cloudbees.groovy.cps.Next.step(Next.java:58) at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:33) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:30) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:106) at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:30) at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:271) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:71) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:180) at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:178) at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112) at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.nio.file.DirectoryNotEmptyException: /scratch/jenkins/secretFiles/8ae515c7-76d4-4021-aff3-233263e97a71/credentials.zip at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1079) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.Util.deleteFile(Util.java:247) at hudson.FilePath.deleteRecursive(FilePath.java:1202) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.access$1000(FilePath.java:191) at hudson.FilePath$14.invoke(FilePath.java:1172) at hudson.FilePath$14.invoke(FilePath.java:1169) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2688) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to 400b174c(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:753) at hudson.FilePath.act(FilePath.java:978) ... 36 more Finished: FAILURE {noformat} Note that "2" is not printed, nor is the shell run - as the second credentials file failed - but there are no logs as to why. If the order of the 2 withCredentials steps is reveresed you see the true cause of the failure: {noformat} java.io.IOException: remote file operation failed: /scratch/jenkins/secretFiles/35effc3c-7cfe-4d39-ad01-720f9f0c0913 at hudson.remoting.Channel@18993415:13ca24de: java.io.FileNotFoundException: /scratch/jenkins/secretFiles/35effc3c-7cfe-4d39-ad01-720f9f0c0913 (Is a directory) at hudson.FilePath.act(FilePath.java:985) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.write(FilePath.java:1881) at hudson.FilePath.copyFrom(FilePath.java:882) at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.copy(FileBinding.java:89) at org.jenkinsci.plugins.credentialsbinding.impl.FileBinding.bindSingle(FileBinding.java:60) at org.jenkinsci.plugins.credentialsbinding.Binding.bind(Binding.java:126) {noformat}
    via by James Nord,
  • Hello, We have an issue where our Maven builds run for a little while, then at some point a new build will kick off and will not be able to clean the workspace because jacoco.exec is locked and can not be deleted. Our build user "BuildProp" is an administrator on this server and cannot remove the file. If I log in as myself, also and Admin, I can delete the file. However, once I navigate away from the folder and back, jacoco.exec will once again appear. This started about a week ago, I suspect is has something to do with us running builds on a slave node. Started by an SCM change Building on master in workspace d:\jwsp\GIT.build1-maven3-develop Wiping out workspace first. java.nio.file.DirectoryNotEmptyException: d:\jwsp\GIT.build1-maven3-develop\abc\Apps\applications\Reconfirm\target 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.FilePath.deleteRecursive(FilePath.java:1202) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.access$1100(FilePath.java:191) at hudson.FilePath$15.invoke(FilePath.java:1185) at hudson.FilePath$15.invoke(FilePath.java:1182) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.deleteContents(FilePath.java:1182) at hudson.plugins.git.extensions.impl.WipeWorkspace.beforeCheckout(WipeWorkspace.java:28) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1013) at hudson.scm.SCM.checkout(SCM.java:484) at hudson.model.AbstractProject.checkout(AbstractProject.java:1270) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531) at hudson.model.Run.execute(Run.java:1741) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Archiving artifacts Skipping sonar analysis due to bad build status FAILURE Notified Stash for commit with id e3f3c786a74c4be6eec44e5771650a8a0d1737cd Email was triggered for: Failure - Any Sending email for trigger: Failure - Any
    via by Mike Craig,
    • java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastStable at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1783) at hudson.model.Run.updateSymlinks(Run.java:1765) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231)

    Users with the same issue

    davidvanlaatum
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    1 more bugmates