com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out)

DataStax JIRA | Mohammed Guller | 2 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    While running an application that reads data from Cassandra 2.1.0 using Java driver 2.1.2 or 2.1.3, the driver starts throwing the error messages shown below. There is no connectivity issue since the driver is able to connect and read data when the application is launched. These error messages are logged after the application has been running for some time. {noformat} 21:15:59 WARN c.d.d.c.Connection Forcing termination of Connection[hostname/ip:9042-1, inFlight=5, closed=true]. This should not happen and is likely a bug, please report. 21:17:29 ERROR c.d.d.c.Session Error creating pool to hostname/ip:9042 com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out at com.datastax.driver.core.DefaultResultSetFuture.onTimeout(DefaultResultSetFuture.java:140) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:855) ~[cassandra-driver-core-2.1.2.jar:na] at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.9.0.Final.jar:na] Wrapped by: com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out) at com.datastax.driver.core.Connection.initializeTransport(Connection.java:166) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection.<init>(Connection.java:113) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection$Factory.open(Connection.java:521) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.SingleConnectionPool.<init>(SingleConnectionPool.java:76) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.HostConnectionPool.newInstance(HostConnectionPool.java:35) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:199) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:192) [cassandra-driver-core-2.1.2.jar:na] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_03] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_03] at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-16.0.1.jar:na] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) [na:1.7.0_03] at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) [guava-16.0.1.jar:na] at com.datastax.driver.core.SessionManager.forceRenewPool(SessionManager.java:192) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Cluster$Manager.onUp(Cluster.java:1386) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Cluster$Manager.access$1000(Cluster.java:1110) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Cluster$Manager$4.runMayThrow(Cluster.java:1474) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) [cassandra-driver-core-2.1.2.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_03] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_03] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_03] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_03] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_03] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_03] 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:39:30 ERROR c.d.d.c.Session Error creating pool to hostname/ip:9042 com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out at com.datastax.driver.core.Connection$Future.onTimeout(Connection.java:797) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:855) ~[cassandra-driver-core-2.1.2.jar:na] {noformat}

    DataStax JIRA | 2 years ago | Mohammed Guller
    com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out)
  2. 0

    While running an application that reads data from Cassandra 2.1.0 using Java driver 2.1.2 or 2.1.3, the driver starts throwing the error messages shown below. There is no connectivity issue since the driver is able to connect and read data when the application is launched. These error messages are logged after the application has been running for some time. {noformat} 21:15:59 WARN c.d.d.c.Connection Forcing termination of Connection[hostname/ip:9042-1, inFlight=5, closed=true]. This should not happen and is likely a bug, please report. 21:17:29 ERROR c.d.d.c.Session Error creating pool to hostname/ip:9042 com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out at com.datastax.driver.core.DefaultResultSetFuture.onTimeout(DefaultResultSetFuture.java:140) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:855) ~[cassandra-driver-core-2.1.2.jar:na] at org.jboss.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:546) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.util.HashedWheelTimer$Worker.notifyExpiredTimeouts(HashedWheelTimer.java:446) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:395) ~[netty-3.9.0.Final.jar:na] at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[netty-3.9.0.Final.jar:na] Wrapped by: com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out) at com.datastax.driver.core.Connection.initializeTransport(Connection.java:166) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection.<init>(Connection.java:113) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection$Factory.open(Connection.java:521) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.SingleConnectionPool.<init>(SingleConnectionPool.java:76) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.HostConnectionPool.newInstance(HostConnectionPool.java:35) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:199) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:192) [cassandra-driver-core-2.1.2.jar:na] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_03] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_03] at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297) [guava-16.0.1.jar:na] at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) [na:1.7.0_03] at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) [guava-16.0.1.jar:na] at com.datastax.driver.core.SessionManager.forceRenewPool(SessionManager.java:192) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Cluster$Manager.onUp(Cluster.java:1386) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Cluster$Manager.access$1000(Cluster.java:1110) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Cluster$Manager$4.runMayThrow(Cluster.java:1474) [cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) [cassandra-driver-core-2.1.2.jar:na] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_03] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_03] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_03] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0_03] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [na:1.7.0_03] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_03] 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:30:22 WARN c.d.d.c.Connection Timeout while setting keyspace on connection to hostname/ip:9042. This should not happen but is not critical (it will retried) 21:39:30 ERROR c.d.d.c.Session Error creating pool to hostname/ip:9042 com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out at com.datastax.driver.core.Connection$Future.onTimeout(Connection.java:797) ~[cassandra-driver-core-2.1.2.jar:na] at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:855) ~[cassandra-driver-core-2.1.2.jar:na] {noformat}

    DataStax JIRA | 2 years ago | Mohammed Guller
    com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out)

    Root Cause Analysis

    1. com.datastax.driver.core.ConnectionException

      [hostname/ip:9042] Unexpected error during transport initialization (com.datastax.driver.core.ConnectionException: [hostname/ip:9042] Operation timed out)

      at com.datastax.driver.core.Connection.initializeTransport()
    2. DataStax Java Driver for Apache Cassandra - Core
      SessionManager$2.call
      1. com.datastax.driver.core.Connection.initializeTransport(Connection.java:166)[cassandra-driver-core-2.1.2.jar:na]
      2. com.datastax.driver.core.Connection.<init>(Connection.java:113)[cassandra-driver-core-2.1.2.jar:na]
      3. com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:32)[cassandra-driver-core-2.1.2.jar:na]
      4. com.datastax.driver.core.Connection$Factory.open(Connection.java:521)[cassandra-driver-core-2.1.2.jar:na]
      5. com.datastax.driver.core.SingleConnectionPool.<init>(SingleConnectionPool.java:76)[cassandra-driver-core-2.1.2.jar:na]
      6. com.datastax.driver.core.HostConnectionPool.newInstance(HostConnectionPool.java:35)[cassandra-driver-core-2.1.2.jar:na]
      7. com.datastax.driver.core.SessionManager$2.call(SessionManager.java:199)[cassandra-driver-core-2.1.2.jar:na]
      8. com.datastax.driver.core.SessionManager$2.call(SessionManager.java:192)[cassandra-driver-core-2.1.2.jar:na]
      8 frames
    3. Java RT
      FutureTask.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[na:1.7.0_03]
      2. java.util.concurrent.FutureTask.run(FutureTask.java:166)[na:1.7.0_03]
      2 frames
    4. Guava
      MoreExecutors$SameThreadExecutorService.execute
      1. com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)[guava-16.0.1.jar:na]
      1 frame
    5. Java RT
      AbstractExecutorService.submit
      1. java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132)[na:1.7.0_03]
      1 frame
    6. Guava
      AbstractListeningExecutorService.submit
      1. com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58)[guava-16.0.1.jar:na]
      1 frame
    7. DataStax Java Driver for Apache Cassandra - Core
      ExceptionCatchingRunnable.run
      1. com.datastax.driver.core.SessionManager.forceRenewPool(SessionManager.java:192)[cassandra-driver-core-2.1.2.jar:na]
      2. com.datastax.driver.core.Cluster$Manager.onUp(Cluster.java:1386)[cassandra-driver-core-2.1.2.jar:na]
      3. com.datastax.driver.core.Cluster$Manager.access$1000(Cluster.java:1110)[cassandra-driver-core-2.1.2.jar:na]
      4. com.datastax.driver.core.Cluster$Manager$4.runMayThrow(Cluster.java:1474)[cassandra-driver-core-2.1.2.jar:na]
      5. com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32)[cassandra-driver-core-2.1.2.jar:na]
      5 frames
    8. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[na:1.7.0_03]
      2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[na:1.7.0_03]
      3. java.util.concurrent.FutureTask.run(FutureTask.java:166)[na:1.7.0_03]
      4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[na:1.7.0_03]
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[na:1.7.0_03]
      6. java.lang.Thread.run(Thread.java:722)[na:1.7.0_03]
      6 frames