java.net.ConnectException

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.

  • We have 5 node ensemble setup in our tst environment and we are seeing the error below on two of the nodes. We have 3 nodes on the first data centre and 2 nodes on the second data centre and all of them are managed by exhbitor. The problem is that the nodes from the same data centres cannot talk to the leader node on the same data centre but can talk to the other nodes without any issue. If I bounce the leader node to force another node to get elected then the other nodes that are on the same data centre start throwing the below exception. I'm sure the problem is with the dns name resolution but I would like to understand how zookeeper resolves these dns names and what might be the issue here so I can go back to our unix team and get this fixed. {code} 2016-07-19 10:48:54,711 [myid:4] - WARN [WorkerSender[myid=4]:QuorumCnxManager@400] - Cannot open channel to 5 at election address server1.dns.name/192.168.1.3:4882 java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) 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.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381) at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:354) at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(Fast LeaderElection.java:452) at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLead erElection.java:433) at java.lang.Thread.run(Thread.java:745) {code} {code:title=zoo.cfg|borderStyle=solid} #Auto-generated by Exhibitor - Fri Jul 15 11:30:52 BST 2016 #Fri Jul 15 11:30:52 BST 2016 server.2=server2.dns.name\:4881\:4882\:observer autopurge.purgeInterval=4 server.1=server1.dns.name\:4881\:4882 initLimit=50 syncLimit=2 clientPort=4880 tickTime=2001 server.5=server5.dns.name\:4881\:4882 dataDir=/opt/app/datafabric/data/zookeeper server.4=server4.dns.name\:4881\:4882 dataLogDir=/path/to/datalogdir server.3=server3.dns.name\:4881\:4882 ~ {code}
    via by Kerem Yazici,
  • GitHub comment 3189#200407713
    via GitHub by deepu105
    ,
  • Exception and throwable not being caught
    via Stack Overflow by Arya
    ,
  • GitHub comment 62#144899449
    via GitHub by ziploc1010
    ,
  • Can't run cassandra stress tool
    via Stack Overflow by user3726031
    ,
  • Cannot HTTPS IPT instance
    via GitHub by dbaars
    ,
    • java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) 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.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381) at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:354)

    Users with the same issue

    batwalrus76
    4 times, last one,
    raytest
    2 times, last one,
    musketyr
    1 times, last one,
    bernardpaulus
    2 times, last one,
    tvrmsmith
    10 times, last one,
    479 more bugmates