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 htmlunit by oboguev
, 1 year ago
Connect to www.google-analytics.com:80 [www.google-analytics.com/127.0.0.1] failed: Connection refused: connect
via Stack Overflow by NikhilEkbote
, 2 years ago
Connect to localhost.wwbizsrv.alibaba.com:4012 [localhost.wwbizsrv.alibaba.com/127.0.0.1] failed: Connection refused: connect
via Stack Overflow by user2852305
, 11 months ago
via Stack Overflow by Manasa
, 11 months ago
via Stack Overflow by Aathi
, 1 month ago
Connect to 10.108.26.232:80 [/10.108.26.232] failed: Connection timed out: connect
via GitHub by bitsofinfo
, 1 year ago
Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed: Connection refused
java.net.ConnectException: Connection refused: connect	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)	at java.net.Socket.connect(Socket.java:579)	at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)	at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:177)	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1324)	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1241)	at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1031)	at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:974)	at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:399)	at com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:277)	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.doProcessPostponedActions(JavaScriptEngine.java:1002)	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.access$500(JavaScriptEngine.java:103)	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:949)	at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628)	at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:513)	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:836)	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:812)	at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:800)	at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:910)	at com.gargoylesoftware.htmlunit.html.HtmlScript.executeInlineScriptIfNeeded(HtmlScript.java:354)	at com.gargoylesoftware.htmlunit.html.HtmlScript.executeScriptIfNeeded(HtmlScript.java:415)	at com.gargoylesoftware.htmlunit.html.HtmlScript$3.execute(HtmlScript.java:277)	at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:293)	at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:799)	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)	at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.endElement(HTMLParser.java:756)	at org.cyberneko.html.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1170)	at org.cyberneko.html.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1072)	at org.cyberneko.html.filters.DefaultFilter.endElement(DefaultFilter.java:206)	at org.cyberneko.html.filters.NamespaceBinder.endElement(NamespaceBinder.java:330)	at org.cyberneko.html.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:3126)	at org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:2093)	at org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:920)	at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499)	at org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452)	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)	at com.gargoylesoftware.htmlunit.html.HTMLParser$HtmlUnitDOMBuilder.parse(HTMLParser.java:1039)	at com.gargoylesoftware.htmlunit.html.HTMLParser.parse(HTMLParser.java:252)	at com.gargoylesoftware.htmlunit.html.HTMLParser.parseHtml(HTMLParser.java:198)	at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:271)	at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:159)	at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:478)	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:352)	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:417)	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:402)	at my.LJExport.Test.testHtmlUnit(Test.java:17)	at my.LJExport.Main.main(Main.java:54)