Java exception when copying artifacts

108 views
Skip to first unread message

David Aldrich

unread,
Apr 19, 2018, 11:22:31 AM4/19/18
to jenkins...@googlegroups.com

With Jenkins 2.107.2 LTS I am getting a Java exception when executing a ‘Copy artifacts from another project’ build step.  I know that the destination directory is mounted and that my Jenkins user account has permission to write to the destination directory.  Any suggestions what may cause this please?

 

Best regards

 

David

 

FATAL: Failed to copy /var/lib/jenkins/jobs/SeraDL_Compile_Zodiac_Linux/builds/79/archive/HtmlDoc/Algorithms/html/Algorithms.html to /net/rsdprojects/SeraDL/Zodiac/Linux/HtmlDoc/Algorithms/html/Algorithms.html

Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to hwsim10

                   at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1737)

                   at hudson.remoting.UserResponse.retrieve(UserRequest.java:313)

                   at hudson.remoting.Channel.call(Channel.java:952)

                   at hudson.FilePath.act(FilePath.java:998)

                   at hudson.FilePath.act(FilePath.java:987)

                   at hudson.FilePath.chmod(FilePath.java:1629)

                   at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:89)

                   at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:67)

                   at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:527)

                   at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:461)

                   at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)

                   at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)

                   at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)

                   at hudson.model.Build$BuildExecution.build(Build.java:206)

                   at hudson.model.Build$BuildExecution.doRun(Build.java:163)

                   at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)

                   at hudson.model.Run.execute(Run.java:1727)

                   at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

                   at hudson.model.ResourceController.execute(ResourceController.java:97)

                   at hudson.model.Executor.run(Executor.java:429)

java.nio.file.FileSystemException: /net/rsdprojects/SeraDL/Zodiac/Linux/HtmlDoc/Algorithms/html/Algorithms.html: Operation not permitted

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

          at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)

          at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)

          at sun.nio.fs.UnixFileAttributeViews$Posix.setMode(Unknown Source)

          at sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(Unknown Source)

          at java.nio.file.Files.setPosixFilePermissions(Unknown Source)

          at hudson.FilePath._chmod(FilePath.java:1650)

          at hudson.FilePath.access$1700(FilePath.java:208)

          at hudson.FilePath$28.invoke(FilePath.java:1632)

          at hudson.FilePath$28.invoke(FilePath.java:1629)

          at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2816)

          at hudson.remoting.UserRequest.perform(UserRequest.java:210)

          at hudson.remoting.UserRequest.perform(UserRequest.java:53)

          at hudson.remoting.Request$2.run(Request.java:364)

          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)

          at java.util.concurrent.FutureTask.run(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

          at java.lang.Thread.run(Unknown Source)

Caused: java.io.IOException: remote file operation failed: /net/rsdprojects/SeraDL/Zodiac/Linux/HtmlDoc/Algorithms/html/Algorithms.html at hudson.remoting.Channel@4b6e88b0:hwsim10

          at hudson.FilePath.act(FilePath.java:1005)

          at hudson.FilePath.act(FilePath.java:987)

          at hudson.FilePath.chmod(FilePath.java:1629)

          at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:89)

Caused: hudson.util.IOException2: Failed to copy /var/lib/jenkins/jobs/SeraDL_Compile_Zodiac_Linux/builds/79/archive/HtmlDoc/Algorithms/html/Algorithms.html to /net/rsdprojects/SeraDL/Zodiac/Linux/HtmlDoc/Algorithms/html/Algorithms.html

          at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyOne(FingerprintingCopyMethod.java:118)

          at hudson.plugins.copyartifact.FingerprintingCopyMethod.copyAll(FingerprintingCopyMethod.java:67)

          at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:527)

          at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:461)

          at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)

          at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)

          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)

          at hudson.model.Build$BuildExecution.build(Build.java:206)

          at hudson.model.Build$BuildExecution.doRun(Build.java:163)

          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)

          at hudson.model.Run.execute(Run.java:1727)

          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)

          at hudson.model.ResourceController.execute(ResourceController.java:97)

          at hudson.model.Executor.run(Executor.java:429)

Finished: FAILURE

 

 

Slide

unread,
Apr 19, 2018, 11:29:12 AM4/19/18
to jenkins...@googlegroups.com
Does the user that Jenkins is running as on the agent have access to the destination directory?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a60750f84163448ebe554ce7ff913bad%40EUX13SRV1.EU.NEC.COM.
For more options, visit https://groups.google.com/d/optout.

David Aldrich

unread,
Apr 19, 2018, 11:40:33 AM4/19/18
to jenkins...@googlegroups.com

> Does the user that Jenkins is running as on the agent have access to the destination directory?

 

Yes, I have demonstrated that from the command line.

 


For more options, visit https://groups.google.com/d/optout.

Click here to report this email as spam.

Devin Nusbaum

unread,
Apr 19, 2018, 11:58:47 AM4/19/18
to jenkins...@googlegroups.com
It looks like the failure comes when changing permissions to match the original file after the file has been copied. What are the permissions on /net/rsdprojects/SeraDL/Zodiac/Linux/HtmlDoc/Algorithms/html/Algorithms.html currently?


David Aldrich

unread,
Apr 19, 2018, 12:03:37 PM4/19/18
to jenkins...@googlegroups.com

-rwxrwxrwx. 1 root 101 1077 Apr 19 16:12

Devin Nusbaum

unread,
Apr 19, 2018, 1:28:32 PM4/19/18
to jenkins...@googlegroups.com
Permissions can only be changed by the owner of the file, so my guess would be that the agent isn’t running as root (which is good), but then it’s not clear  to me why the file would be owned by root in the first place.

I guess to take a step back, did you see the error immediately after upgrading to 2.107.2, and had you seen the error on any previous versions?

Baptiste Mathus

unread,
Apr 19, 2018, 2:06:37 PM4/19/18
to jenkins...@googlegroups.com
Also if I didn't miss it: did you specify the version you were upgrading from?

Reply all
Reply to author
Forward
0 new messages