org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 10000 ms

Sonatype JIRA | Peter Lynch | 6 years ago
  1. 0

    Hosting my own local Nexus instance 1.7.0, I proxy rso sontaype-grid, Maven central and other repos on repository.sonatype.org. At some point the repos became auto-blocked, which is fine. However when the urls can be reached again ( via cmd line or browser or any method outside the running jvm hosting nexus), no amount of rechecking by Nexus can unblock them. Although the socket connection timesout, the timeout is plenty long enought to make this connection. Some events which MAY have contributed to this state are. - network connection was lost to router from computer hosting nexus - router lost connection to provider The only way to unblock the proxy was to restart the jvm hosting Nexus. Simply restarting the running webapp ( which was the war dist running inside tomcat) did not work. {noformat} 2010-07-29 09:17:19 WARN [ol-10-thread-13] - o.s.n.p.m.m.M2Repos~ - Remote peer of proxy repository "sonatype-grid-private" (id=sonatype-grid-private) throwed an org.sonatype.nexus.proxy.StorageException exception. Connection/transport problems occured while connecting to remote peer of the repository. Auto-blocking this repository to prevent further connection-leaks and known-to-fail outbound connections until administrator fixes the problems, or Nexus detects remote repository as healthy. - Cause(s): Transport error while executing GET method [repositoryId="sonatype-grid-private", requestPath="/", remoteUrl="https://repository.sonatype.org/content/groups/sonatype-grid/"] > The host did not accept the connection within timeout of 30000 ms > connect timed out 2010-07-29 09:36:49 ERROR [TP-Processor32 ] - o.s.n.p.r.MavenRepo~ - The host did not accept the connection within timeout of 10000 ms org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 10000 ms at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:155) at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.CustomMultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(CustomMultiThreadedHttpConnectionManager.java:1399) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) at org.sonatype.nexus.plugins.rrb.MavenRepositoryReader.doCall(MavenRepositoryReader.java:251) at org.sonatype.nexus.plugins.rrb.MavenRepositoryReader.getContent(MavenRepositoryReader.java:215) at org.sonatype.nexus.plugins.rrb.MavenRepositoryReader.extract(MavenRepositoryReader.java:54) at org.sonatype.nexus.plugins.rrb.RemoteBrowserResource.get(RemoteBrowserResource.java:108) at org.sonatype.plexus.rest.resource.RestletResource.represent(RestletResource.java:276) at org.sonatype.nexus.rest.NexusRestletResource.represent(NexusRestletResource.java:34) at org.restlet.resource.Resource.getRepresentation(Resource.java:302) at org.restlet.resource.Resource.handleGet(Resource.java:464) at org.restlet.Finder.handle(Finder.java:353) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.sonatype.plexus.rest.RetargetableRestlet.doHandle(RetargetableRestlet.java:39) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112) at org.restlet.Application.handle(Application.java:341) at org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at org.restlet.Router.handle(Router.java:504) at org.restlet.Filter.doHandle(Filter.java:150) at org.restlet.Filter.handle(Filter.java:195) at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124) at org.restlet.Component.handle(Component.java:673) at org.restlet.Server.handle(Server.java:331) at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68) at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147) at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:52) at org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105) at org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57) at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382) at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:613) Caused by: java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:433) at java.net.Socket.connect(Socket.java:529) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:545) at sun.reflect.GeneratedMethodAccessor235.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140) ... 79 more {noformat}

    Sonatype JIRA | 6 years ago | Peter Lynch
    org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 10000 ms
  2. 0

    my app works fine from my windows server, but when i run it from a linux server, i get the following:

    Google Groups | 7 years ago | aerostern
    org.jets3t.service.S3ServiceException: S3 GET connection failed for '/'
  3. 0

    When we try to make a web service call get following exception?

    Oracle Community | 5 years ago | 866506
    org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 30000 ms
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    SocketTimeoutException with Http.param and Http.params

    GitHub | 5 years ago | ssanj
    java.net.SocketTimeoutException: connect timed out

  1. Aria Pahlavan 1 times, last 1 week ago
  2. Nikolay Rybak 1 times, last 2 weeks ago
  3. aldrinleal 1 times, last 2 weeks ago
  4. tvrmsmith 2 times, last 3 weeks ago
  5. VeryRedChris 1 times, last 3 weeks ago
13 more registered users
31 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.SocketTimeoutException

    connect timed out

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.connect
    1. java.net.PlainSocketImpl.socketConnect(Native Method)
    2. java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    3. java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    4. java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:433)
    6. java.net.Socket.connect(Socket.java:529)
    6 frames
  3. Java JSSE
    SSLSocketImpl.connect
    1. com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:545)
    1 frame
  4. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor235.invoke(Unknown Source)
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    3. java.lang.reflect.Method.invoke(Method.java:592)
    3 frames
  5. HttpClient
    HttpClient.executeMethod
    1. org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
    2. org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
    3. org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    4. org.apache.commons.httpclient.CustomMultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(CustomMultiThreadedHttpConnectionManager.java:1399)
    5. org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    6. org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    7. org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    8. org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    8 frames
  6. org.sonatype.nexus
    RemoteBrowserResource.get
    1. org.sonatype.nexus.plugins.rrb.MavenRepositoryReader.doCall(MavenRepositoryReader.java:251)
    2. org.sonatype.nexus.plugins.rrb.MavenRepositoryReader.getContent(MavenRepositoryReader.java:215)
    3. org.sonatype.nexus.plugins.rrb.MavenRepositoryReader.extract(MavenRepositoryReader.java:54)
    4. org.sonatype.nexus.plugins.rrb.RemoteBrowserResource.get(RemoteBrowserResource.java:108)
    4 frames
  7. ${project.groupId}:${project.artifactId}
    RestletResource.represent
    1. org.sonatype.plexus.rest.resource.RestletResource.represent(RestletResource.java:276)
    1 frame
  8. Nexus Core
    NexusRestletResource.represent
    1. org.sonatype.nexus.rest.NexusRestletResource.represent(NexusRestletResource.java:34)
    1 frame
  9. org.restlet.resource
    Resource.handleGet
    1. org.restlet.resource.Resource.getRepresentation(Resource.java:302)
    2. org.restlet.resource.Resource.handleGet(Resource.java:464)
    2 frames
  10. org.restlet
    Filter.doHandle
    1. org.restlet.Finder.handle(Finder.java:353)
    2. org.restlet.Filter.doHandle(Filter.java:150)
    3. org.restlet.Filter.handle(Filter.java:195)
    4. org.restlet.Router.handle(Router.java:504)
    5. org.restlet.Filter.doHandle(Filter.java:150)
    6. org.restlet.Filter.handle(Filter.java:195)
    7. org.restlet.Router.handle(Router.java:504)
    8. org.restlet.Filter.doHandle(Filter.java:150)
    9. org.restlet.Filter.handle(Filter.java:195)
    10. org.restlet.Filter.doHandle(Filter.java:150)
    10 frames
  11. ${project.groupId}:${project.artifactId}
    RetargetableRestlet.doHandle
    1. org.sonatype.plexus.rest.RetargetableRestlet.doHandle(RetargetableRestlet.java:39)
    1 frame
  12. org.restlet
    Filter.doHandle
    1. org.restlet.Filter.handle(Filter.java:195)
    2. org.restlet.Filter.doHandle(Filter.java:150)
    3. org.restlet.Filter.handle(Filter.java:195)
    4. org.restlet.Filter.doHandle(Filter.java:150)
    5. org.restlet.Filter.handle(Filter.java:195)
    6. org.restlet.Filter.doHandle(Filter.java:150)
    6 frames
  13. com.noelios.restlet
    StatusFilter.doHandle
    1. com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
    1 frame
  14. org.restlet
    Filter.handle
    1. org.restlet.Filter.handle(Filter.java:195)
    2. org.restlet.Filter.doHandle(Filter.java:150)
    3. org.restlet.Filter.handle(Filter.java:195)
    3 frames
  15. com.noelios.restlet
    ApplicationHelper.handle
    1. com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
    2. com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
    2 frames
  16. org.restlet
    Application.handle
    1. org.restlet.Application.handle(Application.java:341)
    1 frame
  17. org.restlet.ext
    WadlApplication.handle
    1. org.restlet.ext.wadl.WadlApplication.handle(WadlApplication.java:705)
    1 frame
  18. org.restlet
    Filter.handle
    1. org.restlet.Filter.doHandle(Filter.java:150)
    2. org.restlet.Filter.handle(Filter.java:195)
    3. org.restlet.Router.handle(Router.java:504)
    4. org.restlet.Filter.doHandle(Filter.java:150)
    5. org.restlet.Filter.handle(Filter.java:195)
    6. org.restlet.Router.handle(Router.java:504)
    7. org.restlet.Filter.doHandle(Filter.java:150)
    8. org.restlet.Filter.handle(Filter.java:195)
    8 frames
  19. com.noelios.restlet
    ChainHelper.handle
    1. com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
    1 frame
  20. org.restlet
    Server.handle
    1. org.restlet.Component.handle(Component.java:673)
    2. org.restlet.Server.handle(Server.java:331)
    2 frames
  21. com.noelios.restlet
    ServerServlet.service
    1. com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
    2. com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
    3. com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
    3 frames
  22. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    1 frame
  23. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    2 frames
  24. org.jsecurity.web
    OncePerRequestFilter.doFilter
    1. org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:52)
    2. org.jsecurity.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:105)
    3. org.jsecurity.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:135)
    4. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    5. org.jsecurity.web.servlet.FilterChainWrapper.doFilter(FilterChainWrapper.java:57)
    6. org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
    7. org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
    7 frames
  25. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    8 frames
  26. Embedded GlassFish Web
    ChannelSocket$SocketConnection.runIt
    1. org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
    2. org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
    3. org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
    4. org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
    5. org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
    5 frames
  27. Tomcat Util
    ThreadPool$ControlRunnable.run
    1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
    1 frame
  28. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:613)
    1 frame