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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • Linux, Hudson 1.350 in Master/Slave, Maven 2.2, JDK1.5.0_15

      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)
      

          [JENKINS-5943] Can't send a remote FilePath to a different remote channel when Maven site goal is invoked

          cutterslade added a comment - - edited

          I noticed the same issue when I upgraded from 1.348 to 1.350. I thought the quickly released 1.351 was going to fix it, but it did not.

          I have a master node running under tomcat on windows server 2003. The master can execute builds without issue. My two salves, running as a service on windows vista get the described error at the end of every build. I also tried creating a new slave on my vista workstation via JNLP, and got the same error.

          I am using jdk1.6.0_13 and Maven 2.0.10, the same error occurs with Hudson 1.350 and 1.351.

          cutterslade added a comment - - edited I noticed the same issue when I upgraded from 1.348 to 1.350. I thought the quickly released 1.351 was going to fix it, but it did not. I have a master node running under tomcat on windows server 2003. The master can execute builds without issue. My two salves, running as a service on windows vista get the described error at the end of every build. I also tried creating a new slave on my vista workstation via JNLP, and got the same error. I am using jdk1.6.0_13 and Maven 2.0.10, the same error occurs with Hudson 1.350 and 1.351.

          Andrew Bayer added a comment -

          @cutterslade - are you seeing this with Maven jobs running the site goal as well?

          Andrew Bayer added a comment - @cutterslade - are you seeing this with Maven jobs running the site goal as well?

          cutterslade added a comment -

          This appears to happen only when the site goal is specified. Most of my builds specify the site goal, so I did not notice this at first. I ran four tests:

          1. small project goals: install site:site
            • failed
          2. small project goals: clean install
            • success
          3. small project goals: clean install javadoc:javadoc
            • success
          4. large, multimodule project goals: clean install assembly:attached
            • success

          cutterslade added a comment - This appears to happen only when the site goal is specified. Most of my builds specify the site goal, so I did not notice this at first. I ran four tests: small project goals: install site:site failed small project goals: clean install success small project goals: clean install javadoc:javadoc success large, multimodule project goals: clean install assembly:attached success

          Andrew Bayer added a comment -

          Looks like this is probably related to the fix that went in for JENKINS-2531 - I'm moving this to the maven2 component and assigning it to mfriedenhagen, since it looks like his change is probably the cause.

          Andrew Bayer added a comment - Looks like this is probably related to the fix that went in for JENKINS-2531 - I'm moving this to the maven2 component and assigning it to mfriedenhagen, since it looks like his change is probably the cause.

          Andrew Bayer added a comment -

          I'm adding a test to reproduce this.

          Andrew Bayer added a comment - I'm adding a test to reproduce this.

          mhaller1979 added a comment -

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

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

          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

          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

          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.

          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.

          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

          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

          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
          

          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

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

              Created:
              Updated:
              Resolved: