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

          mhaller1979 created issue -

          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 made changes -
          Component/s New: maven2 [ 15487 ]
          Component/s Original: master-slave [ 15489 ]
          Component/s Original: ssh-slaves [ 15578 ]
          Assignee New: Mirko Friedenhagen [ mfriedenhagen ]
          Summary Original: Can't send a remote FilePath to a different remote channel New: Can't send a remote FilePath to a different remote channel when Maven site goal is invoked

          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 made changes -
          Assignee Original: Mirko Friedenhagen [ mfriedenhagen ] New: Andrew Bayer [ abayer ]

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

              Created:
              Updated:
              Resolved: