java.net.ConnectException: Connection timed out: connect

GitHub | magixyu | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

    Handling a Connection timed out: connect java

    Stack Overflow | 2 years ago | Ben Johnson
    java.net.ConnectException: Connection timed out: connect
  3. 0

    GitHub comment 163#36892096

    GitHub | 3 years ago | dizzzz
    java.net.ConnectException: Connection timed out: connect
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.ConnectException

    Connection timed out: connect

    at java.net.DualStackPlainSocketImpl.connect0()
  2. Java RT
    HttpURLConnection.getResponseCode
    1. java.net.DualStackPlainSocketImpl.connect0(Native Method)
    2. java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    3. java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    4. java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    5. java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    6. java.net.PlainSocketImpl.connect(Unknown Source)
    7. java.net.SocksSocketImpl.connect(Unknown Source)
    8. java.net.Socket.connect(Unknown Source)
    9. sun.net.NetworkClient.doConnect(Unknown Source)
    10. sun.net.www.http.HttpClient.openServer(Unknown Source)
    11. sun.net.www.http.HttpClient.openServer(Unknown Source)
    12. sun.net.www.http.HttpClient.<init>(Unknown Source)
    13. sun.net.www.http.HttpClient.New(Unknown Source)
    14. sun.net.www.http.HttpClient.New(Unknown Source)
    15. sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
    16. sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    17. sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
    18. sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    19. java.net.HttpURLConnection.getResponseCode(Unknown Source)
    19 frames
  3. jersey-core-client
    JerseyInvocation$1.call
    1. org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:321)
    2. org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:227)
    3. org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:224)
    4. org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:656)
    5. org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:653)
    5 frames
  4. Jersey Core
    RequestScope.runInScope
    1. org.glassfish.jersey.internal.Errors.process(Errors.java:315)
    2. org.glassfish.jersey.internal.Errors.process(Errors.java:297)
    3. org.glassfish.jersey.internal.Errors.process(Errors.java:228)
    4. org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
    4 frames
  5. jersey-core-client
    JerseyInvocation$Builder.method
    1. org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:653)
    2. org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:388)
    2 frames
  6. OpenStack4j Jersey2 Connector
    HttpExecutorServiceImpl.execute
    1. org.openstack4j.connectors.jersey2.HttpCommand.execute(HttpCommand.java:86)
    2. org.openstack4j.connectors.jersey2.HttpExecutorServiceImpl.invokeRequest(HttpExecutorServiceImpl.java:65)
    3. org.openstack4j.connectors.jersey2.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:56)
    4. org.openstack4j.connectors.jersey2.HttpExecutorServiceImpl.execute(HttpExecutorServiceImpl.java:33)
    4 frames
  7. OpenStack4j
    BlockStorageService$getLimits.call
    1. org.openstack4j.core.transport.internal.HttpExecutor.execute(HttpExecutor.java:51)
    2. org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:159)
    3. org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:154)
    4. org.openstack4j.openstack.storage.block.internal.BlockStorageServiceImpl.getLimits(BlockStorageServiceImpl.java:38)
    5. org.openstack4j.api.storage.BlockStorageService$getLimits.call(Unknown Source)
    5 frames
  8. Groovy
    AbstractCallSite.call
    1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
    2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    3. org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
    3 frames
  9. ems.yao.restful
    LimitsController.limits
    1. ems.yao.restful.compute.LimitsController.limits(LimitsController.groovy:25)
    1 frame
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  11. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    2 frames
  12. Spring MVC
    FrameworkServlet.doGet
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
    8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
    8 frames
  13. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    1 frame
  14. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
    1 frame
  15. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    1 frame
  16. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    2 frames
  17. Spring
    OncePerRequestFilter.doFilter
    1. org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
    2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    2 frames
  18. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    8. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    9. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    9 frames
  19. Grizzly HTTP
    NioEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695)
    4 frames
  20. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    2 frames
  21. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    1 frame
  22. Java RT
    Thread.run
    1. java.lang.Thread.run(Unknown Source)
    1 frame