java.net.ConnectException

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.

  • Previously we were using common-net-2.2 version and at sometimes we used to get FTPconnectionclosedexception. This was resolved by upgrading to commons-net-3.0.1 version using control keep-alive timeout feature. Now we are facing another issue in a random time interval in our production environment. Most of the times it works fine but at time during ftpclient.listfiles /ftpclient.connect call we are getting the connection timed out exception. Please see the exception stacktrace. java.net.ConnectException: Connection timed out 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:366) at java.net.Socket.connect(Socket.java:529) at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:726) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2990) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2965) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2685) ================================================================ java.net.ConnectException: Connection timed out 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:366) at java.net.Socket.connect(Socket.java:529) at org.apache.commons.net.SocketClient.connect(SocketClient.java:168) at org.apache.commons.net.SocketClient.connect(SocketClient.java:189) Neven seen / faced this kind of exception when using 2.2 version. This is been occurring after the upgradation.
    via by vijayan,
  • GitHub comment 30#282548067
    via GitHub by amauryleclerc
    ,
    • java.net.ConnectException: Connection timed out 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:366) at java.net.Socket.connect(Socket.java:529) at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:726) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2990) at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:2965) at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2685)

    Users with the same issue

    Unknown visitor1 times, last one,
    filipebatista
    2 times, last one,
    Vikram
    1 times, last one,
    Aria Pahlavan
    2 times, last one,
    serious2monkeys
    3 times, last one,
    478 more bugmates