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

Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • maven-plugin
    • None
    • CentOS release 5.5 x86_64, linux-vserver, Maven 2.2+, jdk 1.6. I might affect any other linux-vserver

      We ran into a problem with Hudson as detailed here, this is happening in a virtualized environment as the one described above (linux-vserver)

      It's well know that vserver has some restrictions, and that it doesn't play well with the loopback interface as described here and here.

      We tested hudson+vserver (this might happen in other virtualized environment as well) and found out that it's not listening in all interfaces (perhaps due to the vserver restrictions), but also, after some debugging we found out that maven-agent has a hardcoded socket connection to use only the loopback interface as it's shown here.

      Shouldn't it be fixed so it add some means of fallback mechanism that makes hudson first try the loopback interface, then try with the ethernet ones?

      Indeed the virtualization layer should offer a fully functional and non-restrictive environment to the upper laying processes, but unfortunately this is not the case.

      Thx

      UPDATE 04/18/2011

      Same bug was present with maven3 under the same conditions.

          [JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          maven-plugin/pom.xml
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b
          Log:
          [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/pom.xml maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b Log: [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/c748d324752b8744d5085633c1c478aa0b3b774e Log: changelog for JENKINS-6795 Compare: https://github.com/jenkinsci/jenkins/compare/0aba9f9...c748d32

          Olivier Lamy added a comment -

          so you will be able to enable this with

          • starting your jenkins with -Dmaven.remote.useinet=true
          • with a simple groovy script : hudson.maven.AbstractMavenProcessFactory.mavenRemoteUseInet=true

          Olivier Lamy added a comment - so you will be able to enable this with starting your jenkins with -Dmaven.remote.useinet=true with a simple groovy script : hudson.maven.AbstractMavenProcessFactory.mavenRemoteUseInet=true

          dogfood added a comment -

          Integrated in maven-interceptors #7
          FIXED JENKINS-6795
          FIXED JENKINS-6795 for maven3 as well
          [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          Mauricio Alarcon :
          Files :

          • maven-agent/src/main/java/hudson/maven/agent/Main.java

          Mauricio Alarcon :
          Files :

          • maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java

          Olivier Lamy :
          Files :

          • maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java
          • maven-agent/src/main/java/hudson/maven/agent/Main.java

          dogfood added a comment - Integrated in maven-interceptors #7 FIXED JENKINS-6795 FIXED JENKINS-6795 for maven3 as well [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue? Mauricio Alarcon : Files : maven-agent/src/main/java/hudson/maven/agent/Main.java Mauricio Alarcon : Files : maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java Olivier Lamy : Files : maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java maven-agent/src/main/java/hudson/maven/agent/Main.java

          dogfood added a comment -

          Integrated in jenkins_main_trunk #715
          [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?
          changelog for JENKINS-6795

          Olivier Lamy : 2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b
          Files :

          • maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          • maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          • maven-plugin/pom.xml

          Olivier Lamy : c748d324752b8744d5085633c1c478aa0b3b774e
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #715 [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue? changelog for JENKINS-6795 Olivier Lamy : 2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b Files : maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/pom.xml Olivier Lamy : c748d324752b8744d5085633c1c478aa0b3b774e Files : changelog.html

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          maven-plugin/pom.xml
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b
          Log:
          [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/pom.xml maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b Log: [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/c748d324752b8744d5085633c1c478aa0b3b774e
          Log:
          changelog for JENKINS-6795

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/c748d324752b8744d5085633c1c478aa0b3b774e Log: changelog for JENKINS-6795

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          maven-plugin/pom.xml
          maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/jenkins/2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b
          Log:
          [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-plugin/pom.xml maven-plugin/src/main/java/hudson/maven/AbstractMavenProcessFactory.java maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/jenkins/2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b Log: [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/c748d324752b8744d5085633c1c478aa0b3b774e
          Log:
          changelog for JENKINS-6795

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/c748d324752b8744d5085633c1c478aa0b3b774e Log: changelog for JENKINS-6795

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          pom.xml
          src/main/java/hudson/maven/AbstractMavenProcessFactory.java
          src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/maven-plugin/157c14a2859fb2886476afa09674d5c7dd232a71
          Log:
          [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue?

          Originally-Committed-As: 2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: pom.xml src/main/java/hudson/maven/AbstractMavenProcessFactory.java src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/maven-plugin/157c14a2859fb2886476afa09674d5c7dd232a71 Log: [FIXED JENKINS-6795] Maven agent needs a fix for the 'hardcoded' socket connection to localhost, perhaps a fallback mechanism when it fails to connect through the loopback interface can solve this pesky issue? Originally-Committed-As: 2a36ccc7ee1b81bc4d19d5b09e4c1b946e52d92b

            olamy Olivier Lamy
            davidwbb8 davidwbb8
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: