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 web13213

  • 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)[na:1.8.0_91] at sun.nio.ch.Net.connect(Net.java:454)[na:1.8.0_91] at sun.nio.ch.Net.connect(Net.java:446)[na:1.8.0_91] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)[na:1.8.0_91] at org.apache.cassandra.net.OutboundTcpConnectionPool.newSocket(OutboundTcpConnectionPool.java:137)[cassandra-all-2.1.13.1218.jar:2.1.13.1218] at org.apache.cassandra.streaming.DefaultConnectionFactory.createConnection(DefaultConnectionFactory.java:52)[cassandra-all-2.1.13.1218.jar:2.1.13.1218] at org.apache.cassandra.streaming.StreamSession.createConnection(StreamSession.java:236)[cassandra-all-2.1.13.1218.jar:2.1.13.1218] at org.apache.cassandra.streaming.ConnectionHandler.initiate(ConnectionHandler.java:79)[cassandra-all-2.1.13.1218.jar:2.1.13.1218] at org.apache.cassandra.streaming.StreamSession.start(StreamSession.java:223)[cassandra-all-2.1.13.1218.jar:2.1.13.1218] at org.apache.cassandra.streaming.StreamCoordinator$StreamSessionConnector.run(StreamCoordinator.java:208)[cassandra-all-2.1.13.1218.jar:2.1.13.1218] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_91] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_91]

    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, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    22 more bugmates