timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-21465] java.io.IOException: remote file operation failed #10941

Closed timja closed 9 years ago

timja commented 10 years ago

Getting this exception when trying to wipe out a workspace last built on remote slave:

java.io.IOException: remote file operation failed: /Volumes/Store2/Jenkins/workspace/project1 at hudson.remoting.Channel@6a3d610d:macservXCode5
at hudson.FilePath.act(FilePath.java:910)
at hudson.FilePath.act(FilePath.java:887)
at hudson.FilePath.deleteRecursive(FilePath.java:1076)
at hudson.model.AbstractProject.doDoWipeOutWorkspace(AbstractProject.java:2093)
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 org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:64)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:949)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1011)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
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:744)
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
at hudson.Util.isSymlinkJava7(Util.java:360)
at hudson.Util.isSymlink(Util.java:325)
at hudson.Util.deleteRecursive(Util.java:291)
at hudson.Util.deleteContentsRecursive(Util.java:203)
at hudson.Util.deleteRecursive(Util.java:292)
at hudson.Util.deleteContentsRecursive(Util.java:203)
at hudson.Util.deleteRecursive(Util.java:292)
at hudson.Util.deleteContentsRecursive(Util.java:203)
at hudson.Util.deleteRecursive(Util.java:292)
at hudson.Util.deleteContentsRecursive(Util.java:203)
at hudson.Util.deleteRecursive(Util.java:292)
at hudson.Util.deleteContentsRecursive(Util.java:203)
at hudson.Util.deleteRecursive(Util.java:292)
at hudson.FilePath$12.invoke(FilePath.java:1079)
at hudson.FilePath$12.invoke(FilePath.java:1076)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
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 hudson.remoting.Engine$1$1.run(Engine.java:63)
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.Util.isSymlinkJava7(Util.java:355)
... 24 more
Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable chacraters: /Volumes/Store2/Jenkins/workspace/project1/build/Debug-iphoneos/project1.app/Default–Landscape~ipad@2x.png
at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
at sun.nio.fs.UnixPath.(UnixPath.java:71)
at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
at java.io.File.toPath(File.java:2186)
... 28 more


Originally reported by redf, imported from: java.io.IOException: remote file operation failed
  • status: Resolved
  • priority: Major
  • resolution: Not A Defect
  • resolved: 2015-07-14T09:00:47+00:00
  • imported: 2022/01/10
timja commented 10 years ago

redf:

Could anybody check this out?..

timja commented 10 years ago

jonny_cooper:

Are the versions of Java different on the master and the slave?
This can cause issues with cleaning workspaces on slave agents, as discussed in JENKINS-17995.

timja commented 10 years ago

danielbeck:

What is the output of java.nio.charset.Charset.defaultCharset() in Script Console both on master and the affected slave?

timja commented 9 years ago

rtimush:

I have a similar issue, and the default charsets are UTF-8 on master and US-ASCII on slave.

timja commented 9 years ago

danielbeck:

Needs to be UTF-8 everywhere, otherwise Jenkins won't be able to delete file names with chars not in ASCII. Set the Java system property -Dfile.encoding=UTF8 (or launch Java from a UTF-8 LANG on Linux, e.g. export LANG=en_US.UTF-8.

Resolving as 'Not A Defect' as there's little Jenkins can do when Java isn't correctly set up; and that was the only response to my comment in over a year.

timja commented 7 years ago

pooja:

For me, slave launch is fine, but I get the error after the build has run & in post build, its trying to compute junit report or cobertuara report. Is this has to do something with low disk space? 

Note i'm able to run build properly on the slave, it only starts failing when i reach post build steps 

// code placeholder
ERROR: Step ‘Publish Cobertura Coverage Report’ aborted due to exception: 
java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins
    at hudson.ExtensionList.lookup(ExtensionList.java:416)
    at hudson.FilePath.act(FilePath.java:983)
    at hudson.FilePath.act(FilePath.java:975)
    at hudson.FilePath.mkdirs(FilePath.java:1158)
    at hudson.plugins.cobertura.renderers.SourceCodePainter.paintSourceCode(SourceCodePainter.java:62)
    at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:135)
    at hudson.plugins.cobertura.renderers.SourceCodePainter.invoke(SourceCodePainter.java:30)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2739)
    at hudson.remoting.UserRequest.perform(UserRequest.java:153)
    at hudson.remoting.UserRequest.perform(UserRequest.java:50)
    at hudson.remoting.Request$2.run(Request.java:336)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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:748)
    at ......remote call to CI_Machine(Native Method)
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
    at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
    at hudson.remoting.Channel.call(Channel.java:830)
Caused: java.io.IOException: Remote call on CI_Machine failed
    at hudson.remoting.Channel.call(Channel.java:838)
    at hudson.FilePath.act(FilePath.java:986)
Caused: java.io.IOException: remote file operation failed: /opt/jenkins/workspace/CI_UnitTests at hudson.remoting.Channel@6ebc4898:CI_Machine
    at hudson.FilePath.act(FilePath.java:993)
    at hudson.FilePath.act(FilePath.java:975)
    at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:414)
    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:730)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
    at hudson.model.Run.execute(Run.java:1760)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)

ERROR: Step ‘Publish JUnit test result report’ aborted due to exception: 
java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins
    at hudson.util.io.ParserConfigurator.applyConfiguration(ParserConfigurator.java:78)
    at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:121)
    at hudson.tasks.junit.TestResult.parse(TestResult.java:282)
    at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:228)
    at hudson.tasks.junit.TestResult.parse(TestResult.java:163)
    at hudson.tasks.junit.TestResult.parse(TestResult.java:146)
    at hudson.tasks.junit.TestResult.(TestResult.java:122)
    at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:119)
    at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:93)
    at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2739)
    at hudson.remoting.UserRequest.perform(UserRequest.java:153)
    at hudson.remoting.UserRequest.perform(UserRequest.java:50)
    at hudson.remoting.Request$2.run(Request.java:336)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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:748)
    at ......remote call to CI_Machine(Native Method)
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
    at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
    at hudson.remoting.Channel.call(Channel.java:830)
Caused: java.io.IOException: Remote call on CI_Machine failed
    at hudson.remoting.Channel.call(Channel.java:838)
    at hudson.FilePath.act(FilePath.java:986)
Caused: java.io.IOException: remote file operation failed: /opt/jenkins/workspace/CI_UnitTests at hudson.remoting.Channel@6ebc4898:CI_Machine
    at hudson.FilePath.act(FilePath.java:993)
    at hudson.FilePath.act(FilePath.java:975)
    at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:90)
    at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:120)
    at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:137)
    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:730)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
    at hudson.model.Run.execute(Run.java:1760)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:415)

timja commented 7 years ago

pooja:

I suspect, its related to being on edge of disk low. after I cleaned some disk, took node offline & restarted. mad it work again. 

timja commented 2 years ago

[Originally related to: JENKINS-23272]