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

Jenkins JIRA | James Nord | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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}

    Jenkins JIRA | 1 year ago | James Nord
    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
  2. 0

    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}

    Jenkins JIRA | 1 year ago | James Nord
    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
  3. 0

    [JIRA] [workflow-plugin] (JENKINS-30848) a failure in an exit of a step hides failures inside the step

    Google Groups | 1 year ago | te...@java.net (JIRA)
    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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.nio.file.DirectoryNotEmptyException when deleting lastSuccessful/lastStable jenkins

    Stack Overflow | 3 years ago | thenaglecode
    java.nio.file.DirectoryNotEmptyException: C:\jenkins\jobs\My Job\lastSuccessful
  6. 0

    [JIRA] [maven-plugin] (JENKINS-21330) java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastSuccessful

    Google Groups | 2 years ago | bba...@gfg-group.com (JIRA)
    java.nio.file.DirectoryNotEmptyException: /Users/jenkins/.jenkins/jobs/Nightly/jobs/Internal_Nightly/lastSuccessful

  1. davidvanlaatum 1 times, last 10 months ago
3 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.nio.file.DirectoryNotEmptyException

    /scratch/jenkins/secretFiles/8ae515c7-76d4-4021-aff3-233263e97a71/credentials.zip

    at sun.nio.fs.UnixFileSystemProvider.implDelete()
  2. Java RT
    Method.invoke
    1. sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242)
    2. sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
    3. java.nio.file.Files.delete(Files.java:1079)
    4. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    5. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    6. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    7. java.lang.reflect.Method.invoke(Method.java:606)
    7 frames
  3. Hudson
    FilePath$FileCallableWrapper.call
    1. hudson.Util.deleteFile(Util.java:247)
    2. hudson.FilePath.deleteRecursive(FilePath.java:1202)
    3. hudson.FilePath.deleteContentsRecursive(FilePath.java:1211)
    4. hudson.FilePath.deleteRecursive(FilePath.java:1193)
    5. hudson.FilePath.access$1000(FilePath.java:191)
    6. hudson.FilePath$14.invoke(FilePath.java:1172)
    7. hudson.FilePath$14.invoke(FilePath.java:1169)
    8. hudson.FilePath$FileCallableWrapper.call(FilePath.java:2688)
    8 frames
  4. Hudson :: Remoting Layer
    InterceptingExecutorService$1.call
    1. hudson.remoting.UserRequest.perform(UserRequest.java:121)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:49)
    3. hudson.remoting.Request$2.run(Request.java:325)
    4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    4 frames
  5. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames