java.net.ConnectException

tip

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

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

spring-data-redis requires redis 2.6+ to work properly.

tip

Check if your MongoDB is available.


rp
tip

host port isnt set

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.

  • Java try-catch not catching exception
    via Stack Overflow by DaniChan
    ,
  • Selenium Grid issue
    via by ARK Satyanarayana Raju,
  • GitHub comment 52#73544765
    via GitHub by csaezl
    ,
    • java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:120) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:179) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:328) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:612) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:447) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:884) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:476) at groovyx.net.http.HTTPBuilder.doRequest(HTTPBuilder.java:441) at groovyx.net.http.HTTPBuilder.request(HTTPBuilder.java:373) at com.xetra11.toolbox.components.executor.RestHandlerTest.ExecuteToolTest(RestHandlerTest.groovy:26)

    Users with the same issue

    musketyr
    2 times, last one,
    Andreas Häber
    2 times, last one,
    Unknown User
    2 times, last one,
    SteVio1989
    6 times, last one,
    Unknown visitor1 times, last one,
    381 more bugmates