com.datastax.driver.core.TransportException: [/172.16.12.204:9042] Cannot connect

DataStax JIRA | Benedict Adamson | 2 years ago
  1. 0

    If a data-store node is down when the connection pool code tries to connect to it, naturally an exception is thrown by the networking code. The connection pool code however logs this exception as an ERROR with a stack-trace. This is questionable behaviour: * Stack-traces should be logged for exceptions that indicate program logic errors, and only logic errors, as they are useful to only programmers, and not useful to computer operators. * C* is designed to cope with data-store nodes that go down. A Data-store node being down is not an error condition, but is a warning condition; C* may still (with suitable replication and consistency-level settings) satisfy queries despite the node being down. Here is an example log message: {noformat} ERROR 2015-05-27 15:29:01,585 Error creating pool to /172.16.12.204:9042 com.datastax.driver.core.TransportException: [/172.16.12.204:9042] Cannot connect at com.datastax.driver.core.Connection.<init>(Connection.java:109) ~[cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32) ~[cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.Connection$Factory.open(Connection.java:586) ~[cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.SingleConnectionPool.<init>(SingleConnectionPool.java:76) ~[cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.HostConnectionPool.newInstance(HostConnectionPool.java:35) ~[cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.SessionManager.replacePool(SessionManager.java:271) ~[cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.SessionManager.access$400(SessionManager.java:40) ~[cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:308) [cassandra-driver-core-2.1.5.jar:na] at com.datastax.driver.core.SessionManager$3.call(SessionManager.java:300) [cassandra-driver-core-2.1.5.jar:na] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75] Caused by: java.net.ConnectException: Connection refused: /172.16.12.204:9042 at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_75] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_75] at org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42) ~[netty-3.9.0.Final.jar:na] ... 3 common frames omitted {noformat}

    DataStax JIRA | 2 years ago | Benedict Adamson
    com.datastax.driver.core.TransportException: [/172.16.12.204:9042] Cannot connect
  2. 0

    Cassandra connection issue during compaction

    Stack Overflow | 1 year ago | lakshmanas
    com.datastax.driver.core.TransportException: [/172.31.22.125:9042] Cannot connect
  3. 0

    Cassandra NoHostAvailableException Java-CQLDriver

    Stack Overflow | 2 years ago | learner
    com.datastax.driver.core.TransportException: [/xx.xx.xxx.xx:9042] Cannot connect
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    RC4 Driver throws exception when node is joining ring

    GitHub | 2 years ago | yadid
    com.datastax.driver.core.TransportException: [/198.18.102.141:9042] Cannot connect
  6. 0

    GitHub comment 62#144899449

    GitHub | 1 year ago | ziploc1010
    com.datastax.driver.core.TransportException: [/52.23.252.148:9042] Cannot connect

  1. rp 1 times, last 1 month ago
  2. bpbhat77 55 times, last 4 months ago
  3. RoiOtero 525 times, last 1 week ago
  4. nasimk 1595 times, last 11 hours ago
  5. gehel 8 times, last 1 month ago
10 more registered users
83 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: /172.16.12.204:9042

    at sun.nio.ch.SocketChannelImpl.checkConnect()
  2. Java RT
    SocketChannelImpl.finishConnect
    1. sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)[na:1.7.0_75]
    2. sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)[na:1.7.0_75]
    2 frames
  3. Netty
    NioClientBoss.run
    1. org.jboss.netty.channel.socket.nio.NioClientBoss.connect(NioClientBoss.java:150)[netty-3.9.0.Final.jar:na]
    2. org.jboss.netty.channel.socket.nio.NioClientBoss.processSelectedKeys(NioClientBoss.java:105)[netty-3.9.0.Final.jar:na]
    3. org.jboss.netty.channel.socket.nio.NioClientBoss.process(NioClientBoss.java:79)[netty-3.9.0.Final.jar:na]
    4. org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)[netty-3.9.0.Final.jar:na]
    5. org.jboss.netty.channel.socket.nio.NioClientBoss.run(NioClientBoss.java:42)[netty-3.9.0.Final.jar:na]
    5 frames
  4. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_75]
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_75]
    3. java.lang.Thread.run(Thread.java:745)[na:1.7.0_75]
    3 frames