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

Maven build aborted before execution due to SocketTimeoutException

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • Platform: All, OS: Linux

      Hi

      I have a build server that sometime abort the scheduled build with just error
      aborted - else no error messages, see example build log below.

      I have configured a logger for the fine level (logger: hudson, log level: fine)
      see catelina log below - no useful errors

      I have just start calling maven with -X for debug output - if maven was the
      course - but have not yet capture the error (if maven is to blame - don't think so)

      Any suggestions - please see logs are version data below

      Best regards

      Peter Andersen

      ------------

      Versions:
      Hudson: 1.289
      Tomcat: 6.0.18
      java version "1.6.0_0"
      OpenJDK Runtime Environment (build 1.6.0_0-b11)
      OpenJDK 64-Bit Server VM (build 1.6.0_0-b11, mixed mode)
      Maven: 2.0.9
      OS Debian 5, uname -a:
      Linux hudson 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009 x86_64 GNU/Linux

      Example aborted build:
      started
      Updating svn://svn.lenio.dk/xxxx/trunk
      U ...
      A build.xml
      At revision 11963
      Parsing POMs
      [trunk] $ /usr/lib/jvm/java-6-openjdk/bin/java -Xmx768m -XX:MaxPermSize=256m -cp
      /home/sysadm/apache-tomcat-6.0.18/webapps/hudson/WEB-INF/lib/maven-agent-1.289.jar:/usr/share/maven2/boot/classworlds.jar
      hudson.maven.agent.Main /usr/share/maven2
      /home/sysadm/apache-tomcat-6.0.18/webapps/hudson/WEB-INF/lib/remoting-1.289.jar
      /home/sysadm/apache-tomcat-6.0.18/webapps/hudson/WEB-INF/lib/maven-interceptor-1.289.jar
      38194
      ERROR: Aborted
      No emails were triggered.
      finished: ABORTED

      Catalina log snippet
      Mar 11, 2009 1:33:35 AM hudson.model.Queue maintain
      FINE: Queue maintenance started hudson.model.Queue@338f7701
      Mar 11, 2009 1:33:40 AM hudson.model.Queue maintain
      FINE: Queue maintenance started hudson.model.Queue@338f7701
      Mar 11, 2009 1:33:45 AM hudson.model.Queue maintain
      FINE: Queue maintenance started hudson.model.Queue@338f7701
      Mar 11, 2009 1:33:48 AM hudson.model.Run setResult
      FINE: diop-site-build #12 : result is set to ABORTED by
      hudson.model.Run.run(Run.java:896)
      Mar 11, 2009 1:33:48 AM hudson.model.Run run
      INFO: diop-site-build #12 main build action completed: ABORTED

          [JENKINS-3273] Maven build aborted before execution due to SocketTimeoutException

          Ricket added a comment -

          gonzalad: What system are you running Hudson on? How much RAM does it have? Is it possible that you could stop some other service and see if it works more reliably?

          As you probably read above, I was getting timeouts almost every time, and now after stopping the Artifactory service, I haven't tested it a whole lot but it worked every time I tested. Artifactory was using hundreds of MBs of RAM and swap space and some CPU time, but now that I cut it out, Maven is able to start fast enough to connect to Hudson.

          Ricket added a comment - gonzalad: What system are you running Hudson on? How much RAM does it have? Is it possible that you could stop some other service and see if it works more reliably? As you probably read above, I was getting timeouts almost every time, and now after stopping the Artifactory service, I haven't tested it a whole lot but it worked every time I tested. Artifactory was using hundreds of MBs of RAM and swap space and some CPU time, but now that I cut it out, Maven is able to start fast enough to connect to Hudson.

          persyval added a comment -

          We have the same issue regarding the timeout.
          Our buildserver which runs Hudson resides on a virtual machine on a server that has multiple virtual instances.
          The first three or four build runs on a day have this timeout error.

          After that it seems the virtual machine has allocated enough memory or cpu for itself that the problem goes away.
          so it definitely seems to be associated with poor machine resources.
          Would be nice to have an optional parameter to enter the timeout value though.

          persyval added a comment - We have the same issue regarding the timeout. Our buildserver which runs Hudson resides on a virtual machine on a server that has multiple virtual instances. The first three or four build runs on a day have this timeout error. After that it seems the virtual machine has allocated enough memory or cpu for itself that the problem goes away. so it definitely seems to be associated with poor machine resources. Would be nice to have an optional parameter to enter the timeout value though.

          gonzalad added a comment -

          Sorry Ricket for the late answer,
          My server is running on Windows XP SP3 with MacAfee (Mcshield.exe).
          2.33 GHz, 2Go RAM Core 2Duo E6550.
          1.17 Go Used (without Hudson, I needed to stop Hudson today for another pb ;( ).
          Running Hudson, Trac (with apache), Sonar (this one doing nothing) and MySql (for Sonar).
          I cannot use Hudson for one week on this workstation. I'll monitor better next week. Sorry.

          gonzalad added a comment - Sorry Ricket for the late answer, My server is running on Windows XP SP3 with MacAfee (Mcshield.exe). 2.33 GHz, 2Go RAM Core 2Duo E6550. 1.17 Go Used (without Hudson, I needed to stop Hudson today for another pb ;( ). Running Hudson, Trac (with apache), Sonar (this one doing nothing) and MySql (for Sonar). I cannot use Hudson for one week on this workstation. I'll monitor better next week. Sorry.

          Code changed in hudson
          User: : ashlux
          Path:
          trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java
          http://jenkins-ci.org/commit/30733
          Log:
          [FIXED JENKINS-3273] Increase timeout to 30 seconds since 10 seconds isn't enough for machines with poor resources.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : ashlux Path: trunk/hudson/main/maven-plugin/src/main/java/hudson/maven/MavenProcessFactory.java http://jenkins-ci.org/commit/30733 Log: [FIXED JENKINS-3273] Increase timeout to 30 seconds since 10 seconds isn't enough for machines with poor resources.

          Thank you very much for the fix, I can confirm since I upgraded to 1.357 the error is gone.

          Florian Rosenauer added a comment - Thank you very much for the fix, I can confirm since I upgraded to 1.357 the error is gone.

          lh added a comment -

          The problem still exist in version 1.443 running on RHEL 5.7 32 bits.
          Here is the stacktrace :
          [workspace] $ /usr/java/java6/bin/java -Duser.language=en -Xmx512m -Xms24m -XX:MaxPermSize=512m -cp /data/hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.2.jar:/opt/maven/apache-maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /opt/maven/apache-maven-2.2.1 /usr/share/tomcat5/webapps/jenkins/WEB-INF/lib/remoting-2.11.jar /data/hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.2.jar 51622 /data/hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar
          ERROR: Aborted Maven execution for InterruptedIOException
          java.net.SocketTimeoutException: Accept timed out
          at java.net.PlainSocketImpl.socketAccept(Native Method)
          at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
          at java.net.ServerSocket.implAccept(ServerSocket.java:453)
          at java.net.ServerSocket.accept(ServerSocket.java:421)
          at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:171)
          at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:227)
          at hudson.maven.ProcessCache.get(ProcessCache.java:231)
          at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:716)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:462)
          at hudson.model.Run.run(Run.java:1404)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:238)
          Finished: ABORTED

          lh added a comment - The problem still exist in version 1.443 running on RHEL 5.7 32 bits. Here is the stacktrace : [workspace] $ /usr/java/java6/bin/java -Duser.language=en -Xmx512m -Xms24m -XX:MaxPermSize=512m -cp /data/hudson/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.2.jar:/opt/maven/apache-maven-2.2.1/boot/classworlds-1.1.jar hudson.maven.agent.Main /opt/maven/apache-maven-2.2.1 /usr/share/tomcat5/webapps/jenkins/WEB-INF/lib/remoting-2.11.jar /data/hudson/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.2.jar 51622 /data/hudson/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar ERROR: Aborted Maven execution for InterruptedIOException java.net.SocketTimeoutException: Accept timed out at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:171) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:227) at hudson.maven.ProcessCache.get(ProcessCache.java:231) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:716) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:462) at hudson.model.Run.run(Run.java:1404) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: ABORTED

          David Drake added a comment -

          I'm also still seeing this issue intermittently in v1.432.

          [branch] $ /usr/java/java7/bin/java -Xms128M -Xmx768M -XX:+CMSClassUnloadingEnabled -XX:PermSize=128M -XX:MaxPermSize=384M -cp /opt/hudson/maven3-agent.jar:/opt/maven3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven3 /opt/jenkins/slave.jar /opt/hudson/maven3-interceptor.jar 59277
          ERROR: Aborted Maven execution for InterruptedIOException
          java.net.SocketTimeoutException: Accept timed out
          at java.net.PlainSocketImpl.socketAccept(Native Method)
          at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
          at java.net.ServerSocket.implAccept(ServerSocket.java:462)
          at java.net.ServerSocket.accept(ServerSocket.java:430)
          at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:167)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255)
          at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
          at hudson.remoting.UserRequest.perform(UserRequest.java:118)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:287)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
          Finished: ABORTED

          David Drake added a comment - I'm also still seeing this issue intermittently in v1.432. [branch] $ /usr/java/java7/bin/java -Xms128M -Xmx768M -XX:+CMSClassUnloadingEnabled -XX:PermSize=128M -XX:MaxPermSize=384M -cp /opt/hudson/maven3-agent.jar:/opt/maven3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /opt/maven3 /opt/jenkins/slave.jar /opt/hudson/maven3-interceptor.jar 59277 ERROR: Aborted Maven execution for InterruptedIOException java.net.SocketTimeoutException: Accept timed out at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408) at java.net.ServerSocket.implAccept(ServerSocket.java:462) at java.net.ServerSocket.accept(ServerSocket.java:430) at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:274) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:255) at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Finished: ABORTED

          David Dossot added a comment -

          Same problem here with Jenkins 1.449:

          Started by an SCM change
          Building in workspace /home/jenkins/jobs/rsb-public/workspace
          Checkout:workspace / /home/jenkins/jobs/rsb-public/workspace - hudson.remoting.LocalChannel@36b4fec5
          Using strategy: Default
          Checkout:workspace / /home/jenkins/jobs/rsb-public/workspace - hudson.remoting.LocalChannel@36b4fec5
          Fetching changes from 1 remote Git repository
          Fetching upstream changes from *****
          Seen branch in repository origin/HEAD
          Seen branch in repository origin/master
          Commencing build of Revision a3e51b8864cba056876bcd2e9144b17232e24885 (origin/HEAD, origin/master)
          Checking out Revision a3e51b8864cba056876bcd2e9144b17232e24885 (origin/HEAD, origin/master)
          No change to record in branch origin/HEAD
          No change to record in branch origin/master
          Parsing POMs
          [workspace] $ /home/jenkins/tools/JDK_1.6/bin/java -cp /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/jenkins/tools/Maven_3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/tools/Maven_3 /var/lib/tomcat6/webapps/jenkins/WEB-INF/lib/remoting-2.12.jar /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 56845
          ERROR: Aborted Maven execution for InterruptedIOException
          java.net.SocketTimeoutException: Accept timed out
          	at java.net.PlainSocketImpl.socketAccept(Native Method)
          	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:375)
          	at java.net.ServerSocket.implAccept(ServerSocket.java:470)
          	at java.net.ServerSocket.accept(ServerSocket.java:438)
          	at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:171)
          	at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:227)
          	at hudson.maven.ProcessCache.get(ProcessCache.java:231)
          	at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:708)
          	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470)
          	at hudson.model.Run.run(Run.java:1404)
          	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
          	at hudson.model.ResourceController.execute(ResourceController.java:88)
          	at hudson.model.Executor.run(Executor.java:238)
          Finished: ABORTED
          

          David Dossot added a comment - Same problem here with Jenkins 1.449: Started by an SCM change Building in workspace /home/jenkins/jobs/rsb- public /workspace Checkout:workspace / /home/jenkins/jobs/rsb- public /workspace - hudson.remoting.LocalChannel@36b4fec5 Using strategy: Default Checkout:workspace / /home/jenkins/jobs/rsb- public /workspace - hudson.remoting.LocalChannel@36b4fec5 Fetching changes from 1 remote Git repository Fetching upstream changes from ***** Seen branch in repository origin/HEAD Seen branch in repository origin/master Commencing build of Revision a3e51b8864cba056876bcd2e9144b17232e24885 (origin/HEAD, origin/master) Checking out Revision a3e51b8864cba056876bcd2e9144b17232e24885 (origin/HEAD, origin/master) No change to record in branch origin/HEAD No change to record in branch origin/master Parsing POMs [workspace] $ /home/jenkins/tools/JDK_1.6/bin/java -cp /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-agent-1.2.jar:/home/jenkins/tools/Maven_3/boot/plexus-classworlds-2.4.jar org.jvnet.hudson.maven3.agent.Maven3Main /home/jenkins/tools/Maven_3 / var /lib/tomcat6/webapps/jenkins/WEB-INF/lib/remoting-2.12.jar /home/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-1.2.jar 56845 ERROR: Aborted Maven execution for InterruptedIOException java.net.SocketTimeoutException: Accept timed out at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:375) at java.net.ServerSocket.implAccept(ServerSocket.java:470) at java.net.ServerSocket.accept(ServerSocket.java:438) at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:171) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:227) at hudson.maven.ProcessCache.get(ProcessCache.java:231) at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:708) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:470) at hudson.model.Run.run(Run.java:1404) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:238) Finished: ABORTED

          I had the same issue and figured I had an IPV6 related issue.

          I only have dangerous half knowledge, but noticed that Jenkins opens pors on the IPV6 interface only. My firewall was not configured to allow IPV6 traffic.

          The issue resolved once I accepted IPV6 traffic in my iptables.

          Alexander Luetjen added a comment - I had the same issue and figured I had an IPV6 related issue. I only have dangerous half knowledge, but noticed that Jenkins opens pors on the IPV6 interface only. My firewall was not configured to allow IPV6 traffic. The issue resolved once I accepted IPV6 traffic in my iptables.

          Mohamed El Habib added a comment - - edited

          Same error into Jenkins ver. 1.566

          ERROR: Aborted Maven execution for InterruptedIOException
          java.net.SocketTimeoutException: Accept timed out
          at java.net.PlainSocketImpl.socketAccept(Native Method)
          at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
          at java.net.ServerSocket.implAccept(ServerSocket.java:530)
          at java.net.ServerSocket.accept(ServerSocket.java:498)
          at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:211)
          at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:270)
          at hudson.maven.ProcessCache.get(ProcessCache.java:235)
          at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:759)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:518)
          at hudson.model.Run.execute(Run.java:1710)
          at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:231)
          Finished: ABORTED

          Mohamed El Habib added a comment - - edited Same error into Jenkins ver. 1.566 ERROR: Aborted Maven execution for InterruptedIOException java.net.SocketTimeoutException: Accept timed out at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398) at java.net.ServerSocket.implAccept(ServerSocket.java:530) at java.net.ServerSocket.accept(ServerSocket.java:498) at hudson.maven.AbstractMavenProcessFactory$SocketHandler$AcceptorImpl.accept(AbstractMavenProcessFactory.java:211) at hudson.maven.AbstractMavenProcessFactory.newProcess(AbstractMavenProcessFactory.java:270) at hudson.maven.ProcessCache.get(ProcessCache.java:235) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:759) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:518) at hudson.model.Run.execute(Run.java:1710) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Finished: ABORTED

            ashlux ashlux
            peterandersen peterandersen
            Votes:
            23 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated: