Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    via Stack Overflow by LittlePanda

    To restart the Selenium Webdriver mock browser in a testcase, first use driver.close() and then reinstantiate the driver.

  2. ,
    via GitHub by rawlingsj

    host port isnt set

Solutions on the web

via GitHub by binggebest
, 1 year ago
Connect to 127.0.0.1:8020 [/127.0.0.1] failed: Connection refused: connect
via GitHub by junweihuang
, 2 years ago
Connect to 127.0.0.1:8580 [/127.0.0.1] failed: Connection refused
via GitHub by princes1
, 2 years ago
Connect to 127.0.0.1:8080 [/127.0.0.1] failed: 拒绝连接
via GitHub by nasry
, 1 year ago
Connect to harvester-netarkive-dg00h:8192 [harvester-netarkive-dg00h/10.20.74.8] failed: Connection refused
via GitHub by yujie123jw
, 10 months ago
Connect to localhost:9443 [localhost/127.0.0.1] failed: 拒绝连接 (Connection refused)
via Stack Overflow by user3705478
, 2 years ago
Connect to MyAnotherURL:80 [MyAnotherURL/115.249.106.144] failed: Operation timed out
java.net.ConnectException: Connection refused: connect	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)	at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)	at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)	at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)	at java.net.AbstractPlainSocketImpl.connect(Unknown Source)	at java.net.PlainSocketImpl.connect(Unknown Source)	at java.net.SocksSocketImpl.connect(Unknown Source)	at java.net.Socket.connect(Unknown Source)	at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)	at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125)	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319)	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)	at com.baidu.rigel.biplatform.ac.util.HttpRequest.sendPost(HttpRequest.java:298)	at com.baidu.rigel.biplatform.ac.util.HttpRequest.sendPost(HttpRequest.java:330)	at com.baidu.rigel.biplatform.ac.query.MiniCubeSqlConnection.query(MiniCubeSqlConnection.java:81)	at com.baidu.rigel.biplatform.ma.report.service.impl.ReportModelQueryServiceImpl.queryDatasHelper(ReportModelQueryServiceImpl.java:280)	at com.baidu.rigel.biplatform.ma.report.service.impl.ReportModelQueryServiceImpl.queryDatas(ReportModelQueryServiceImpl.java:239)	at com.baidu.rigel.biplatform.ma.resource.QueryDataResource.queryArea(QueryDataResource.java:241)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)	at java.lang.reflect.Method.invoke(Unknown Source)	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776)	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705)	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at com.baidu.rigel.biplatform.ma.resource.filter.UniversalContextSettingFilter.setSessionInfoIntoThread(UniversalContextSettingFilter.java:364)	at com.baidu.rigel.biplatform.ma.resource.filter.UniversalContextSettingFilter.doFilter(UniversalContextSettingFilter.java:136)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)	at java.lang.Thread.run(Unknown Source)