java.net.ConnectException

Connection refused

Samebug tips1

First of all, check if your firewall is not blocking your connection. If it's not, you might need to explicitly set advertised.host.name to "advertised.host.name = yourIpAddress", this forces the hosts returned to be the resolvable IP address of your VM.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web13187

  • Connection refused (Connection refused)
  • Connection refused (Connection refused)
  • Connection refused (Connection refused)
  • Stack trace

    • java.net.ConnectException: Connection refused at sun.nio.ch.Net.connect0(Native Method) at sun.nio.ch.Net.connect(Net.java:465) at sun.nio.ch.Net.connect(Net.java:457) at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:670) at org.apache.zookeeper.ClientCnxnSocketNIO.registerAndConnect(ClientCnxnSocketNIO.java:275) at org.apache.zookeeper.ClientCnxnSocketNIO.connect(ClientCnxnSocketNIO.java:285) at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1098) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1133)

    Write tip

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

    Users with the same issue

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    22 more bugmates