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?

          davidwbb8 created issue -
          davidwbb8 made changes -
          Summary Original: 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 New: 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?
          Olivier Lamy made changes -
          Assignee New: Olivier Lamy [ olamy ]
          davidwbb8 made changes -
          Description Original: We ran into a problem with Hudson as detailed [here|http://hudson.361315.n4.nabble.com/Maven-jobs-can-t-connect-java-net-ConnectException-Connection-refused-td2259346.html#a2259346], 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|http://linux-vserver.org/Talk:Problematic_Programs#127.0.0.1_issues] and [here|http://linux-vserver.org/Frequently_Asked_Questions_scratch#G._Problematic_Programs].

          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|http://fisheye.jenkins-ci.org/browse/Hudson/tags/hudson-1_362/maven-agent/src/main/java/hudson/maven/agent/Main.java?r=31903#l119].

          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
          New: We ran into a problem with Hudson as detailed [here|http://hudson.361315.n4.nabble.com/Maven-jobs-can-t-connect-java-net-ConnectException-Connection-refused-td2259346.html#a2259346], 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|http://linux-vserver.org/Talk:Problematic_Programs#127.0.0.1_issues] and [here|http://linux-vserver.org/Frequently_Asked_Questions_scratch#G._Problematic_Programs].

          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|http://fisheye.jenkins-ci.org/browse/Hudson/tags/hudson-1_362/maven-agent/src/main/java/hudson/maven/agent/Main.java?r=31903#l119].

          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.

          Code changed in jenkins
          User: Mauricio Alarcon
          Path:
          maven-agent/src/main/java/hudson/maven/agent/Main.java
          http://jenkins-ci.org/commit/maven-interceptors/78a9ccdc79afba7b9c0b3ea3d08fd333f38c2a75
          Log:
          FIXED JENKINS-6795

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mauricio Alarcon Path: maven-agent/src/main/java/hudson/maven/agent/Main.java http://jenkins-ci.org/commit/maven-interceptors/78a9ccdc79afba7b9c0b3ea3d08fd333f38c2a75 Log: FIXED JENKINS-6795

          Code changed in jenkins
          User: David Webb
          Path:
          maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java
          http://jenkins-ci.org/commit/maven-interceptors/4a9e2b005976a677e29c59914eb7176c9bee12bd
          Log:
          FIXED JENKINS-6795 for maven3 as well

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: David Webb Path: maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java http://jenkins-ci.org/commit/maven-interceptors/4a9e2b005976a677e29c59914eb7176c9bee12bd Log: FIXED JENKINS-6795 for maven3 as well

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          maven-agent/src/main/java/hudson/maven/agent/Main.java
          maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java
          http://jenkins-ci.org/commit/maven-interceptors/8c660dfde54ed8e4ab8596947971902374253b03
          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?
          merge from https://github.com/mauricioalarcon/maven-interceptors.git updated

          Compare: https://github.com/jenkinsci/maven-interceptors/compare/7b84a19...8c660df

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: maven-agent/src/main/java/hudson/maven/agent/Main.java maven3-agent/src/main/java/org/jvnet/hudson/maven3/agent/Maven3Main.java http://jenkins-ci.org/commit/maven-interceptors/8c660dfde54ed8e4ab8596947971902374253b03 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? merge from https://github.com/mauricioalarcon/maven-interceptors.git updated Compare: https://github.com/jenkinsci/maven-interceptors/compare/7b84a19...8c660df
          SCM/JIRA link daemon made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          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

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

              Created:
              Updated:
              Resolved: