java.net.ConnectException: Connection refused

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

Check if your MongoDB is available.


rp
tip

host port isnt set

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

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
tip

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

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

  • GitHub comment 6#23870434
    via GitHub by oza
    ,
  • JBOSS Datasource connection through java
    via Stack Overflow by user1500694
    ,
  • eclipse and tomcat debugging
    via Stack Overflow by Paul
    ,
  • sending/ receiving email in Java
    via by Unknown author,
  • Cpanel Java Email Client Program
    via Stack Overflow by Veeresh Devireddy
    ,
    • java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at org.fluentd.logger.sender.RawSocketSender.connect(RawSocketSender.java:89) at org.fluentd.logger.sender.RawSocketSender.open(RawSocketSender.java:77) at org.fluentd.logger.sender.RawSocketSender.<init>(RawSocketSender.java:72) at org.fluentd.logger.sender.RawSocketSender.<init>(RawSocketSender.java:60) at org.fluentd.logger.sender.RawSocketSender.<init>(RawSocketSender.java:56) at org.fluentd.logger.sender.TestRawSocketSender.testNormal03(TestRawSocketSender.java:134)

    Users with the same issue

    batwalrus76
    batwalrus764 times, last one,
    musketyr
    musketyr2 times, last one,
    Eric Henderson
    Eric Henderson16 times, last one,
    raytest
    raytest2 times, last one,
    bernardpaulus
    bernardpaulus2 times, last one,
    478 more bugmates