java.io.IOException: remote file operation failed: C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc at hudson.remoting.Channel@11a5ec7:AES-KLBUILD

Jenkins JIRA | Mathieu POUSSE | 3 years ago
  1. 0

    If I execute my job on a slave that runs on Unix, when the master node that runs on Windows XP tries to copy the file sloccount.sc from the slave to the master jobs directory I get the following exception (it results to a build failure). {noformat} java.io.IOException: remote file operation failed: C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc at hudson.remoting.Channel@11a5ec7:AES-KLBUILD at hudson.FilePath.act(FilePath.java:910) at hudson.FilePath.act(FilePath.java:887) at hudson.FilePath.copyTo(FilePath.java:1809) at hudson.plugins.sloccount.SloccountPublisher.copyFilesToBuildDirectory(SloccountPublisher.java:139) at hudson.plugins.sloccount.SloccountPublisher.perform(SloccountPublisher.java:92) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:756) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:705) at hudson.model.Run.execute(Run.java:1695) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: java.io.FileNotFoundException: C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:138) at hudson.FilePath$37.invoke(FilePath.java:1814) at hudson.FilePath$37.invoke(FilePath.java:1809) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:724) Build step 'Publish SLOCCount analysis results' marked build as failure}} {noformat} As you can see, the master starts to get crazy because in copyFilesToBuildDirectory, it uses the sourceFile.getAbsolutePath(). This method tries to resolve the sourceFile against the current JVM FileSystem that is different from the slave. BTW, I am wondering why the code uses the getAbsolutePath() method instead of the getPath() that returns the actual file path.

    Jenkins JIRA | 3 years ago | Mathieu POUSSE
    java.io.IOException: remote file operation failed: C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc at hudson.remoting.Channel@11a5ec7:AES-KLBUILD
  2. 0

    If I execute my job on a slave that runs on Unix, when the master node that runs on Windows XP tries to copy the file sloccount.sc from the slave to the master jobs directory I get the following exception (it results to a build failure). {noformat} java.io.IOException: remote file operation failed: C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc at hudson.remoting.Channel@11a5ec7:AES-KLBUILD at hudson.FilePath.act(FilePath.java:910) at hudson.FilePath.act(FilePath.java:887) at hudson.FilePath.copyTo(FilePath.java:1809) at hudson.plugins.sloccount.SloccountPublisher.copyFilesToBuildDirectory(SloccountPublisher.java:139) at hudson.plugins.sloccount.SloccountPublisher.perform(SloccountPublisher.java:92) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:784) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:756) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:705) at hudson.model.Run.execute(Run.java:1695) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Caused by: java.io.FileNotFoundException: C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:138) at hudson.FilePath$37.invoke(FilePath.java:1814) at hudson.FilePath$37.invoke(FilePath.java:1809) 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$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) 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:724) Build step 'Publish SLOCCount analysis results' marked build as failure}} {noformat} As you can see, the master starts to get crazy because in copyFilesToBuildDirectory, it uses the sourceFile.getAbsolutePath(). This method tries to resolve the sourceFile against the current JVM FileSystem that is different from the slave. BTW, I am wondering why the code uses the getAbsolutePath() method instead of the getPath() that returns the actual file path.

    Jenkins JIRA | 3 years ago | Mathieu POUSSE
    java.io.IOException: remote file operation failed: C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc at hudson.remoting.Channel@11a5ec7:AES-KLBUILD
  3. 0

    GitHub comment 59#50169464

    GitHub | 2 years ago | jcfrancisco
    java.io.IOException: Failed to copy /home/builduser/workspace/homepage/homepage/script=integration-group3/test/log/testium/proxy.log to /home/builduser/workspace/homepage/homepage/test/log/testium/proxy.log
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When following the link to the source code I get an error equal to this (taken from https://groups.google.com/forum/#!topic/jenkinsci-users/ml_3pMHdYAg): {noformat} 01 Copying the source file '/ac_realinfo_srvd/ac_realinfo_srvd/ac_realinfo_data_proc.c' from the workspace to the build folder 'C:\.jenkins\jobs\wacap1.8_inspection\builds\2014-05-05_20-44-43\workspace-files\ef148ebb.tmp' on the Jenkins master failed. 02 Is the file '/ac_realinfo_srvd/ac_realinfo_srvd/ac_realinfo_data_proc.c' a valid filename? 03 If you are building on a slave: please check if the file is accessible under '$JENKINS_HOME/[job-name]//ac_realinfo_srvd/ac_realinfo_srvd/ac_realinfo_data_proc.c' 04 If you are building on the master: please check if the file is accessible under '$JENKINS_HOME/[job-name]/workspace//ac_realinfo_srvd/ac_realinfo_srvd/ac_realinfo_data_proc.c' 05 java.io.IOException: remote file operation failed: /ac_realinfo_srvd/ac_realinfo_srvd/ac_realinfo_data_proc.c at hudson.remoting.Channel@f9f7bc:compiler_1.75 06 at hudson.FilePath.act(FilePath.java:916) 07 at hudson.FilePath.act(FilePath.java:893) 08 at hudson.FilePath.copyTo(FilePath.java:1821) 09 at hudson.plugins.analysis.core.HealthAwareRecorder.copyFilesWithAnnotationsToBuildFolder(HealthAwareRecorder.java:398) 10 at hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:165) 11 at hudson.plugins.analysis.core.HealthAwareRecorder.perform(HealthAwareRecorder.java:333) 12 at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) 13 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:745) 14 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:709) 15 at hudson.model.Build$BuildExecution.post2(Build.java:182) 16 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:658) 17 at hudson.model.Run.execute(Run.java:1734) 18 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 19 at hudson.model.ResourceController.execute(ResourceController.java:88) 20 at hudson.model.Executor.run(Executor.java:231) 21 Caused by: java.io.FileNotFoundException: /ac_realinfo_srvd/ac_realinfo_srvd/ac_realinfo_data_proc.c (没有那个文件或目录) 22 at java.io.FileInputStream.open(Native Method) 23 at java.io.FileInputStream.<init>(FileInputStream.java:138) 24 at hudson.FilePath$37.invoke(FilePath.java:1826) 25 at hudson.FilePath$37.invoke(FilePath.java:1821) 26 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2474) 27 at hudson.remoting.UserRequest.perform(UserRequest.java:118) 28 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 29 at hudson.remoting.Request$2.run(Request.java:328) 30 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 31 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 32 at java.util.concurrent.FutureTask.run(FutureTask.java:166) 33 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 34 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 35 at java.lang.Thread.run(Thread.java:722) {noformat} What seems to be the problem is the two forward slashes in the file path.

    Jenkins JIRA | 2 years ago | Rasmus Pedersen
    java.io.IOException: remote file operation failed: /ac_realinfo_srvd/ac_realinfo_srvd/ac_realinfo_data_proc.c at hudson.remoting.Channel@f9f7bc:compiler_1.75
  6. 0

    STDERR: java.io.IOException: Failed to copy git to /var/lib/jenkins/plugins/git.jpi

    Stack Overflow | 2 years ago | WolvesfCrib
    java.io.IOException: Failed to copy git to /var/lib/jenkins/plugins/git.jpi

  1. michallos 1 times, last 5 hours ago
  2. gamebusterz 1 times, last 12 hours ago
  3. tyson925 4 times, last 1 day ago
  4. jf-ast 12 times, last 5 days ago
  5. jokester 2 times, last 6 days ago
56 more registered users
39 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.io.FileNotFoundException

    C:\var\jenkins\workspace\sloccount-fasttrack\sloccount.sc (No such file or directory)

    at java.io.FileInputStream.open()
  2. Java RT
    FileInputStream.<init>
    1. java.io.FileInputStream.open(Native Method)
    2. java.io.FileInputStream.<init>(FileInputStream.java:138)
    2 frames
  3. Hudson
    FilePath$FileCallableWrapper.call
    1. hudson.FilePath$37.invoke(FilePath.java:1814)
    2. hudson.FilePath$37.invoke(FilePath.java:1809)
    3. hudson.FilePath$FileCallableWrapper.call(FilePath.java:2461)
    3 frames
  4. Hudson :: Remoting Layer
    InterceptingExecutorService$1.call
    1. hudson.remoting.UserRequest.perform(UserRequest.java:118)
    2. hudson.remoting.UserRequest.perform(UserRequest.java:48)
    3. hudson.remoting.Request$2.run(Request.java:328)
    4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
    4 frames
  5. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:166)
    3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    5. java.lang.Thread.run(Thread.java:724)
    5 frames