java.net.ConnectException: Connection refused

Apache's JIRA Issue Tracker | Kerem Yazici | 9 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp and poroszd . Or join the community to write better ones.
  1. 0

    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}

    Apache's JIRA Issue Tracker | 9 months ago | Kerem Yazici
    java.net.ConnectException: Connection refused
  2. 0
    samebug tip
    Check if your MongoDB is available.
  3. 0
    samebug tip
    host port isnt set
    via GitHub by rawlingsj
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    start Appium server
  6. 0
    samebug tip
    You should access rundeck using that 'grails.serverURL' from the config file 'rundeck-config.properties'.
    via GitHub by gschueler

  1. osvzs 4 times, last 6 hours ago
  2. poroszd 2 times, last 3 days ago
  3. raytest 3 times, last 2 weeks ago
  4. Dunmer 264 times, last 3 weeks ago
  5. jf-ast 2 times, last 3 weeks ago
62 more registered users
33 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.ConnectException

    Connection refused

    at java.net.PlainSocketImpl.socketConnect()
  2. Java RT
    Socket.connect
    1. java.net.PlainSocketImpl.socketConnect(Native Method)
    2. java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    3. java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    4. java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    5. java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    6. java.net.Socket.connect(Socket.java:589)
    6 frames
  3. Zookeeper
    QuorumCnxManager.toSend
    1. org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:381)
    2. org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:354)
    2 frames