java.net.ConnectException: Connection timed out: connect

coderanch.com | 7 months 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. 0

    java.net.ConnectException: Connection timed out: connect , but working from browser.

    Coderanch | 1 year ago | sudheer guna
    java.net.ConnectException: Connection timed out: connect
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Handling a Connection timed out: connect java

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

  1. mauritius 12 times, last 2 months ago
  2. marcbouvierdav 1 times, last 6 months ago
  3. bpbhat77 1 times, last 8 months ago
16 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.ConnectException

    Connection timed out: connect

    at java.net.DualStackPlainSocketImpl.connect0()
  2. Java RT
    HttpURLConnection.getResponseCode
    1. java.net.DualStackPlainSocketImpl.connect0(Native Method)[na:1.8.0_45]
    2. java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)[na:1.8.0_45]
    3. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)[na:1.8.0_45]
    4. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)[na:1.8.0_45]
    5. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)[na:1.8.0_45]
    6. java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)[na:1.8.0_45]
    7. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[na:1.8.0_45]
    8. java.net.Socket.connect(Socket.java:589)[na:1.8.0_45]
    9. java.net.Socket.connect(Socket.java:538)[na:1.8.0_45]
    10. sun.net.NetworkClient.doConnect(NetworkClient.java:180)[na:1.8.0_45]
    11. sun.net.www.http.HttpClient.openServer(HttpClient.java:432)[na:1.8.0_45]
    12. sun.net.www.http.HttpClient.openServer(HttpClient.java:527)[na:1.8.0_45]
    13. sun.net.www.http.HttpClient.<init>(HttpClient.java:211)[na:1.8.0_45]
    14. sun.net.www.http.HttpClient.New(HttpClient.java:308)[na:1.8.0_45]
    15. sun.net.www.http.HttpClient.New(HttpClient.java:326)[na:1.8.0_45]
    16. sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)[na:1.8.0_45]
    17. sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)[na:1.8.0_45]
    18. sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)[na:1.8.0_45]
    19. sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)[na:1.8.0_45]
    20. sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)[na:1.8.0_45]
    21. sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)[na:1.8.0_45]
    22. java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)[na:1.8.0_45]
    22 frames
  3. com.capitalone.eng
    DockerController.loadExistingPage
    1. com.capitalone.eng.cape.util.UrlRestContainer.getContainerMetrics(UrlRestContainer.java:517)[UrlRestContainer.class:na]
    2. com.capitalone.eng.cape.services.ContainerService.getContainerMetrics(ContainerService.java:479)[ContainerService.class:na]
    3. com.capitalone.eng.cape.services.ContainerService.getCotainerMetrics(ContainerService.java:930)[ContainerService.class:na]
    4. com.capitalone.eng.cape.controller.DockerController.loadExistingPage(DockerController.java:103)[DockerController.class:na]
    4 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_45]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_45]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_45]
    4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_45]
    4 frames
  5. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    2 frames
  6. Spring MVC
    FrameworkServlet.doGet
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    8. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    8 frames
  7. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:624)[servlet-api.jar:na]
    1 frame
  8. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE]
    1 frame
  9. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:731)[servlet-api.jar:na]
    1 frame
  10. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)[catalina.jar:7.0.63]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.63]
    2 frames
  11. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat7-websocket.jar:7.0.63]
    1 frame
  12. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.63]
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.63]
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)[catalina.jar:7.0.63]
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)[catalina.jar:7.0.63]
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)[catalina.jar:7.0.63]
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)[catalina.jar:7.0.63]
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)[catalina.jar:7.0.63]
    8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)[catalina.jar:7.0.63]
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)[catalina.jar:7.0.63]
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)[catalina.jar:7.0.63]
    10 frames
  13. Grizzly HTTP
    JIoEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)[tomcat-coyote.jar:7.0.63]
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)[tomcat-coyote.jar:7.0.63]
    3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)[tomcat-coyote.jar:7.0.63]
    3 frames
  14. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_45]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_45]
    2 frames
  15. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-coyote.jar:7.0.63]
    1 frame
  16. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_45]
    1 frame