首页 > 其他分享 >hudson.plugins.git.GitException: Failed to delete workspace

hudson.plugins.git.GitException: Failed to delete workspace

时间:2023-11-17 21:57:08浏览次数:45  
标签:git java nio GitException hudson util PathRemover io jenkins

持续集成环境(git + gitlab + jenkins + pipeline + maven + harbor + docker + k8s)之前都是ok的,突然就报错了:

Cloning the remote Git repository
Cloning repository [email protected]:qzcsbj/gift.git
ERROR: Failed to clean the workspace
jenkins.util.io.CompositeIOException: Unable to delete '/home/jenkins/agent/workspace/demo'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. (Discarded 4 additional exceptions)
	at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:87)
	at hudson.Util.deleteContentsRecursive(Util.java:286)
	at hudson.Util.deleteContentsRecursive(Util.java:275)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:788)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/classes: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/generated-sources/annotations: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/generated-sources: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile/default-compile: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-archiver/pom.properties: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Failed to delete workspace
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:791)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)
	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)
	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
	at hudson.remoting.Request$2.run(Request.java:369)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
	at java.lang.Thread.run(Thread.java:748)
	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 192.168.117.161/192.168.117.161:4754
		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
		at hudson.remoting.Channel.call(Channel.java:1000)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:143)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:566)
		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:129)
		at com.sun.proxy.$Proxy103.execute(Unknown Source)
		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1226)
		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: jenkins.util.io.CompositeIOException: Unable to delete '/home/jenkins/agent/workspace/demo'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts. (Discarded 4 additional exceptions)
	at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:87)
	at hudson.Util.deleteContentsRecursive(Util.java:286)
	at hudson.Util.deleteContentsRecursive(Util.java:275)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:788)
	... 11 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/classes: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/generated-sources/annotations: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/generated-sources: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile/default-compile: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin/compile: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status/maven-compiler-plugin: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-status: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more
	Suppressed: java.nio.file.FileSystemException: /home/jenkins/agent/workspace/demo/target/maven-archiver/pom.properties: Operation not permitted
		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.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:238)
		at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:260)
		at java.nio.file.Files.setPosixFilePermissions(Files.java:2045)
		at jenkins.util.io.PathRemover.makeWritable(PathRemover.java:285)
		at jenkins.util.io.PathRemover.makeRemovable(PathRemover.java:258)
		at jenkins.util.io.PathRemover.removeOrMakeRemovableThenRemove(PathRemover.java:238)
		at jenkins.util.io.PathRemover.tryRemoveFile(PathRemover.java:202)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:213)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.tryRemoveRecursive(PathRemover.java:212)
		at jenkins.util.io.PathRemover.tryRemoveDirectoryContents(PathRemover.java:224)
		at jenkins.util.io.PathRemover.forceRemoveDirectoryContents(PathRemover.java:84)
		... 14 more

 

 pipeline的agent配置中:

workspaceVolume hostPathWorkspaceVolume(hostPath: "/opt/workspace", readOnly: false)

 

说明:workspace的内容持久化到宿主机了,宿主机/opt/workspace/和slave的pod中/home/jenkins/agent/下内容是一样的

cd /opt/workspace/workspace/demo,清空target目录

 

标签:git,java,nio,GitException,hudson,util,PathRemover,io,jenkins
From: https://www.cnblogs.com/uncleyong/p/17838934.html

相关文章

  • 冲刺秋招,备战24年春招,GitHub爆火的Android面试指南来袭!
    前言你有面试机会了吗?随着金九银十到来,肯定有很多小伙伴想抓住一年两次的机会,开始疯狂投简历了吧~但是事实是投出去的简历基本上HR都是已读不回收到面试邀请,被告知不用面试了参加了面试,就像走了个过场,成了HR的业绩指标面试通过,但是被放鸽子了...为什么?相信会有人想这样问,......
  • Git合并时一些鲜为人知的坑
    1. 反复解决同一个冲突最常见的原因:  多人团队中开启了rebase,对commit顺序造成破坏,使得merge其他分支时可能找不到原始commitid的关联信息,就需要重新merge conflicts.  2.明明合并完了,又让从头合并当然这和用rebase有关的,关键是已经解决了冲突,为啥还让从头再来......
  • git 切换公钥
     打开CMD1、ssh-keygen-trsa2、cdC:\Users\user5m/.ssh(输入对应的路径)3、ls(查看目录)4、catid_rsa.pub(查看当前公钥) 5、ssh-keygen-trsa-C'[email protected]'(输入git邮箱)6、复制生成的公钥并打开码云(添加SSH公钥) 完成以上操作即可拉取代码提交......
  • Git命令整理
    gitreset和gitrevert是Git版本控制系统中常用的命令,用于撤销提交或修改历史记录。它们的作用不同,下面对它们进行解析:gitreset:gitreset命令用于将当前分支的HEAD指针移动到指定的提交,并可以选择性地更改工作目录和暂存区的状态。它有不同的模式:gitreset--soft<......
  • ERROR: Permission to stevenlong123/test.git denied to smith-bing. fatal: Could n
    第一次练习git提交代码到github时出现的错误。这里就是说github服务器拒接了我们,不支持远程连接。发现是因为我使用的是ssh来提交的,ssh是安全连接需要通信双方各有一对公钥私钥,github服务器不会自动交换公钥,需要手动在github存储库中部署自己电脑的公钥。使用git命令“ls-al~/.s......
  • Git与Gitee的交互及配置忽略文件
    将本地项目提交到Gitee1、创建一个新的仓库:首先,在Gitee上创建一个新的仓库。2、初始化本地项目为Git仓库:这将在项目目录中创建一个名为".git"的隐藏文件夹,用于存储Git的相关配置和版本信息。gitinit3、将项目文件添加到暂存区:执行以下命令将项目文件添加到Git的暂存区:   ......
  • git
    1.gitignore文件不起作用的解决方案:gitrm-r--cached.gitadd.gitcommit-m'update.gitignore'2.拉取线上特定的分支(如:克隆dev分支的代码):gitclone-bdevgit-url//在本地创建分支dev并切换到该分支gitcheckout-bdev(本地分支名称)origin/dev(远程分支名称......
  • 2023最新!Git2
    2023最新!Git2.40.0于win10环境下的安装git官网地址:https://git-scm.com/download/win/导航目录2023最新!Git2.40.0于win10环境下的安装导航一、下载Git二、安装Git三、检验一、下载GitGit官网选择自己所需的版本下载二、安装Git双击安装程序,并选择next推荐更换路径(避免文......
  • 一个Git clone仓库的指定目录命令对比国内外常见AI(二)使用天工AI
    通常情况下,我们会克隆整个Git仓库,但有时候我们只需要其中某一个目录或文件,这时候只克隆子目录会更加方便。这个需求好像不是经常用到,搜索结果也是五花八门,有些完全达不到要求,正好用这个机会测试一下最近大火的AI看看是否足够智能。国内天工AI(推荐使用,替代百度搜索,不用注册,包含参考......
  • windows 下 git status 和 Linux 下 status 结果不一致
    解决该问题运行一下命令即可gitconfigcore.autocrlftrue解释 gitconfigcore.autocrlftrue 这个命令是在任何支持的操作系统上都可以运行的,包括Windows和Linux。这个命令是用来设置Git的全局配置,也就是说,如果你在命令行中运行这个命令并且没有指定任何特定的仓......