Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5943

Can't send a remote FilePath to a different remote channel when Maven site goal is invoked

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Environment:
      Linux, Hudson 1.350 in Master/Slave, Maven 2.2, JDK1.5.0_15
    • Similar Issues:

      Description

      After the upgrade to 1.350, we get a lot of build failures due to the following exception. It seems to have a problem with the remoting channel. Hudson uses SSH to log in on remote machines to trigger builds there.

      From the logs and output, it is unclear at what stage of the Maven build process this happens, since the build itself runs through (and also runs successfully on command line without using Hudson). It is unclear if this only affects 1.350, but it just started the day after we upgraded from 1.349

      Command being executed:

      Parsing POMs
      [trunk] $ java -DperformRelease=true -Xmx1400M -XX:MaxPermSize=512m -cp /home/hudson/work/maven-agent.jar:/opt/apache-maven-2.2.0/boot/classworlds-1.1.jar hudson.maven.agent.Main /opt/apache-maven-2.2.0 /home/hudson/work/slave.jar /home/hudson/work/maven-interceptor.jar 57275 /home/hudson/work/maven2.1-interceptor.jar
      <===[HUDSON REMOTING CAPACITY]===>���channel started
      Executing Maven:  -B -f /home/hudson/work/workspace/myproject/trunk/pom.xml --batch-mode --errors --update-snapshots clean deploy site-deploy sonar:sonar+ Error stacktraces are turned on.
      
      ...
      

      The output:

      ...
      [WARNING] Unable to locate Javadoc to link to - DISABLED
      [INFO] Generating "Dependency Overview" report.
      [INFO] MavenOverviewMojo: Created outputFile: /home/hudson/work/workspace/myproject/trunk/target/site/images/overview.png
      [INFO] MavenOverviewMojo: Incrementing graph
      [INFO] MavenOverviewMojo: Graph at: /home/hudson/work/workspace/myproject/trunk/target/site/images/overview.png
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Can't send a remote FilePath to a different remote channel
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.IllegalStateException: Can't send a remote FilePath to a different remote channel
      	at hudson.FilePath.writeObject(FilePath.java:1974)
      	at sun.reflect.GeneratedMethodAccessor508.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:585)
      	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
      	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
      	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
      	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
      	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
      	at hudson.remoting.UserRequest._serialize(UserRequest.java:151)
      	at hudson.remoting.UserRequest.serialize(UserRequest.java:160)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:122)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:270)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
      	at java.lang.Thread.run(Thread.java:595)
      

        Attachments

          Activity

          Hide
          mhaller1979 mhaller1979 added a comment -

          I can confirm: we were also using site-deploy as a goal when this happened on 1.350

          Show
          mhaller1979 mhaller1979 added a comment - I can confirm: we were also using site-deploy as a goal when this happened on 1.350
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/main/test/src/test/java/hudson/maven/MavenProjectTest.java
          http://jenkins-ci.org/commit/28739
          Log:
          JENKINS-5943 Adding test to reproduce this bug

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/test/src/test/java/hudson/maven/MavenProjectTest.java http://jenkins-ci.org/commit/28739 Log: JENKINS-5943 Adding test to reproduce this bug
          Hide
          abayer Andrew Bayer added a comment -

          Ok, reassigned to myself, 'cos I think I fixed it. As I said, that test reproduced the IllegalStateException, and after I changed MavenSiteArchiver to not try to return a FilePath across the remoting link (there really was no need, since all we did with it was call getRemote(), which returns a String), that test no longer broke. This'll be live in 1.352, and is fixed in trunk.

          Show
          abayer Andrew Bayer added a comment - Ok, reassigned to myself, 'cos I think I fixed it. As I said, that test reproduced the IllegalStateException, and after I changed MavenSiteArchiver to not try to return a FilePath across the remoting link (there really was no need, since all we did with it was call getRemote(), which returns a String), that test no longer broke. This'll be live in 1.352, and is fixed in trunk.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : abayer
          Path:
          trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/reporters/MavenSiteArchiver.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/28740
          Log:
          [FIXED JENKINS-5943] Fixed IllegalStateException due to trying to pass a FilePath around

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : abayer Path: trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/reporters/MavenSiteArchiver.java trunk/www/changelog.html http://jenkins-ci.org/commit/28740 Log: [FIXED JENKINS-5943] Fixed IllegalStateException due to trying to pass a FilePath around
          Hide
          cutterslade cutterslade added a comment - - edited

          After upgrading to 1.352, I'm still experiencing this issue. I've wiped out the project workspace and restarted the slaves, it there anything else I need to do to clear this up?

          [HUDSON] Archiving aggregated javadoc
          [INFO] Generating "Cobertura Test Coverage" report.
          [INFO] Cobertura 1.9.2 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
          Cobertura: Loaded information on 17 classes.
          Report time: 502ms
          
          [INFO] Cobertura Report generation was successful.
          [INFO] Generating "CPD Report" report.
          [INFO] Generating "Source Xref" report.
          [INFO] ------------------------------------------------------------------------
          [ERROR] FATAL ERROR
          [INFO] ------------------------------------------------------------------------
          [INFO] Can't send a remote FilePath to a different remote channel
          [INFO] ------------------------------------------------------------------------
          [INFO] Trace
          java.lang.IllegalStateException: Can't send a remote FilePath to a different remote channel
          	at hudson.FilePath.writeObject(FilePath.java:1977)
          	at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          	at java.lang.reflect.Method.invoke(Unknown Source)
          	at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
          	at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
          	at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
          	at java.io.ObjectOutputStream.writeObject0(Unknown Source)
          	at java.io.ObjectOutputStream.writeObject(Unknown Source)
          	at hudson.remoting.UserRequest._serialize(UserRequest.java:151)
          	at hudson.remoting.UserRequest.serialize(UserRequest.java:160)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:122)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          	at hudson.remoting.Request$2.run(Request.java:270)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
          	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
          	at java.util.concurrent.FutureTask.run(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          	at java.lang.Thread.run(Unknown Source)
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 1 minute 17 seconds
          [INFO] Finished at: Tue Mar 23 09:43:07 PDT 2010
          [INFO] Final Memory: 57M/140M
          [INFO] ------------------------------------------------------------------------
          channel stopped
          
          Show
          cutterslade cutterslade added a comment - - edited After upgrading to 1.352, I'm still experiencing this issue. I've wiped out the project workspace and restarted the slaves, it there anything else I need to do to clear this up? [HUDSON] Archiving aggregated javadoc [INFO] Generating "Cobertura Test Coverage" report. [INFO] Cobertura 1.9.2 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file Cobertura: Loaded information on 17 classes. Report time: 502ms [INFO] Cobertura Report generation was successful. [INFO] Generating "CPD Report" report. [INFO] Generating "Source Xref" report. [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can't send a remote FilePath to a different remote channel [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.IllegalStateException: Can't send a remote FilePath to a different remote channel at hudson.FilePath.writeObject(FilePath.java:1977) at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) at java.io.ObjectOutputStream.writeSerialData(Unknown Source) at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) at java.io.ObjectOutputStream.writeObject0(Unknown Source) at java.io.ObjectOutputStream.writeObject(Unknown Source) at hudson.remoting.UserRequest._serialize(UserRequest.java:151) at hudson.remoting.UserRequest.serialize(UserRequest.java:160) at hudson.remoting.UserRequest.perform(UserRequest.java:122) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:270) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 minute 17 seconds [INFO] Finished at: Tue Mar 23 09:43:07 PDT 2010 [INFO] Final Memory: 57M/140M [INFO] ------------------------------------------------------------------------ channel stopped

            People

            • Assignee:
              abayer Andrew Bayer
              Reporter:
              mhaller1979 mhaller1979
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: