java.net.ConnectException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Firewall might be blocking your connection, or MySQL it's not running on your server machine.


rafael
tip

Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.


rafael
tip

Check if ip adress is correct, if the port is correct, and if the server is up and running and waiting for connections. Also, check if there's no firewall blocking you and if your internet connection is working.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • GitHub comment 163#36892096
    via GitHub by dizzzz
    ,
    • java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method)[na:1.8.0_45] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)[na:1.8.0_45] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)[na:1.8.0_45] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)[na:1.8.0_45] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[na:1.8.0_45] at java.net.Socket.connect(Socket.java:589)[na:1.8.0_45] at java.net.Socket.connect(Socket.java:538)[na:1.8.0_45] at sun.net.NetworkClient.doConnect(NetworkClient.java:180)[na:1.8.0_45] at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)[na:1.8.0_45] at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)[na:1.8.0_45] at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)[na:1.8.0_45] at sun.net.www.http.HttpClient.New(HttpClient.java:308)[na:1.8.0_45] at sun.net.www.http.HttpClient.New(HttpClient.java:326)[na:1.8.0_45] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1168)[na:1.8.0_45] at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1104)[na:1.8.0_45] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:998)[na:1.8.0_45] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:932)[na:1.8.0_45] at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)[na:1.8.0_45] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)[na:1.8.0_45] at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)[na:1.8.0_45] at com.capitalone.eng.cape.util.UrlRestContainer.getContainerMetrics(UrlRestContainer.java:517)[UrlRestContainer.class:na] at com.capitalone.eng.cape.services.ContainerService.getContainerMetrics(ContainerService.java:479)[ContainerService.class:na] at com.capitalone.eng.cape.services.ContainerService.getCotainerMetrics(ContainerService.java:930)[ContainerService.class:na] at com.capitalone.eng.cape.controller.DockerController.loadExistingPage(DockerController.java:103)[DockerController.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_45] at java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_45] at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)[spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:777)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:706)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)[servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)[spring-webmvc-4.1.4.RELEASE.jar:4.1.4.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)[servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)[catalina.jar:7.0.63] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.63] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat7-websocket.jar:7.0.63] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)[catalina.jar:7.0.63] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)[catalina.jar:7.0.63] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)[catalina.jar:7.0.63] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)[catalina.jar:7.0.63] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)[catalina.jar:7.0.63] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)[catalina.jar:7.0.63] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)[catalina.jar:7.0.63] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)[catalina.jar:7.0.63] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)[catalina.jar:7.0.63] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)[catalina.jar:7.0.63] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)[tomcat-coyote.jar:7.0.63] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)[tomcat-coyote.jar:7.0.63] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)[tomcat-coyote.jar:7.0.63] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_45] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-coyote.jar:7.0.63] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_45]

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    714 more bugmates