com.datastax.driver.core.ConnectionException: [/x.x.x.x:9042] Timeout while setting keyspace on connection 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) at com.datastax.driver.core.Connection.setKeyspace(Connection.java:451)

DataStax JIRA | Gábor AUTH | 1 year ago
  1. 0

    Timeout during the first connection: {code} 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) com.datastax.driver.core.ConnectionException: [/x.x.x.x:9042] Timeout while setting keyspace on connection 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) at com.datastax.driver.core.Connection.setKeyspace(Connection.java:451) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.HostConnectionPool.borrowConnection(HostConnectionPool.java:277) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.query(RequestHandler.java:296) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.sendRequest(RequestHandler.java:276) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.RequestHandler$SpeculativeExecution$1.run(RequestHandler.java:377) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2015-11-22 21:58:32,872 ERROR [stderr] (Thread-7) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2015-11-22 21:58:32,872 ERROR [stderr] (Thread-7) at java.lang.Thread.run(Thread.java:745) {code} After after the reconnect, works. :/

    DataStax JIRA | 1 year ago | Gábor AUTH
    com.datastax.driver.core.ConnectionException: [/x.x.x.x:9042] Timeout while setting keyspace on connection 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) at com.datastax.driver.core.Connection.setKeyspace(Connection.java:451)
  2. 0

    Timeout during the first connection: {code} 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) com.datastax.driver.core.ConnectionException: [/x.x.x.x:9042] Timeout while setting keyspace on connection 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) at com.datastax.driver.core.Connection.setKeyspace(Connection.java:451) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.HostConnectionPool.borrowConnection(HostConnectionPool.java:277) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.query(RequestHandler.java:296) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.RequestHandler$SpeculativeExecution.sendRequest(RequestHandler.java:276) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at com.datastax.driver.core.RequestHandler$SpeculativeExecution$1.run(RequestHandler.java:377) 2015-11-22 21:58:32,871 ERROR [stderr] (Thread-7) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2015-11-22 21:58:32,872 ERROR [stderr] (Thread-7) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2015-11-22 21:58:32,872 ERROR [stderr] (Thread-7) at java.lang.Thread.run(Thread.java:745) {code} After after the reconnect, works. :/

    DataStax JIRA | 1 year ago | Gábor AUTH
    com.datastax.driver.core.ConnectionException: [/x.x.x.x:9042] Timeout while setting keyspace on connection 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) at com.datastax.driver.core.Connection.setKeyspace(Connection.java:451)
  3. 0

    We have few clients connecting to nodes of another cluster due to some operational mistakes. We can detect such issues sooner if we log the invalid keyspave below at -ERROR- WARN level. (_*Note: level changed after the issue was open, see discussion below*_) {code} 2014/10/20 10:43:50.968  bld14E37 svn16344 tags[remaining] TRACE [New I/O worker #51] com.datastax.driver.core.Connection - [host1/ip1:9042-41102] received: ERROR INVALID: Keyspace 'xxx' does not exist 2014/10/20 10:43:50.968  bld14E37 svn16344 tags[remaining] TRACE [New I/O worker #42] com.datastax.driver.core.Connection - [host/ip:9042-2] request sent successfully 2014/10/20 10:43:50.968  bld14E37 svn16344 tags[remaining] DEBUG [Cassandra Java Driver worker-14] com.datastax.driver.core.Connection - Defuncting connection to host1/ip1:9042 com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Problem while setting keyspace, got ERROR INVALID: Keyspace 'xxx' does not exist as response         at com.datastax.driver.core.Connection.setKeyspace(Connection.java:287)         at com.datastax.driver.core.Cluster$Manager.prepareAllQueries(Cluster.java:1723)         at com.datastax.driver.core.Cluster$Manager.onUp(Cluster.java:1295)         at com.datastax.driver.core.Cluster$Manager.access$900(Cluster.java:1064)         at com.datastax.driver.core.Cluster$Manager$4.runMayThrow(Cluster.java:1406)         at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32)         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)         at java.util.concurrent.FutureTask.run(FutureTask.java:262)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)         at java.lang.Thread.run(Thread.java:744) {code}

    DataStax JIRA | 2 years ago | Vishy Kasar
    com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Problem while setting keyspace, got ERROR INVALID: Keyspace 'xxx' does not exist as response
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    We have few clients connecting to nodes of another cluster due to some operational mistakes. We can detect such issues sooner if we log the invalid keyspave below at -ERROR- WARN level. (_*Note: level changed after the issue was open, see discussion below*_) {code} 2014/10/20 10:43:50.968  bld14E37 svn16344 tags[remaining] TRACE [New I/O worker #51] com.datastax.driver.core.Connection - [host1/ip1:9042-41102] received: ERROR INVALID: Keyspace 'xxx' does not exist 2014/10/20 10:43:50.968  bld14E37 svn16344 tags[remaining] TRACE [New I/O worker #42] com.datastax.driver.core.Connection - [host/ip:9042-2] request sent successfully 2014/10/20 10:43:50.968  bld14E37 svn16344 tags[remaining] DEBUG [Cassandra Java Driver worker-14] com.datastax.driver.core.Connection - Defuncting connection to host1/ip1:9042 com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Problem while setting keyspace, got ERROR INVALID: Keyspace 'xxx' does not exist as response         at com.datastax.driver.core.Connection.setKeyspace(Connection.java:287)         at com.datastax.driver.core.Cluster$Manager.prepareAllQueries(Cluster.java:1723)         at com.datastax.driver.core.Cluster$Manager.onUp(Cluster.java:1295)         at com.datastax.driver.core.Cluster$Manager.access$900(Cluster.java:1064)         at com.datastax.driver.core.Cluster$Manager$4.runMayThrow(Cluster.java:1406)         at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32)         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)         at java.util.concurrent.FutureTask.run(FutureTask.java:262)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)         at java.lang.Thread.run(Thread.java:744) {code}

    DataStax JIRA | 2 years ago | Vishy Kasar
    com.datastax.driver.core.ConnectionException: [host1/ip1:9042] Problem while setting keyspace, got ERROR INVALID: Keyspace 'xxx' does not exist as response
  6. 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)

    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. com.datastax.driver.core.ConnectionException

      [/x.x.x.x:9042] Timeout while setting keyspace on connection 2015-11-22 21:58:32,870 ERROR [stderr] (Thread-7) at com.datastax.driver.core.Connection.setKeyspace(Connection.java:451)

      at com.datastax.driver.core.HostConnectionPool.borrowConnection()
    2. DataStax Java Driver for Apache Cassandra - Core
      RequestHandler$SpeculativeExecution$1.run
      1. com.datastax.driver.core.HostConnectionPool.borrowConnection(HostConnectionPool.java:277)
      2. com.datastax.driver.core.RequestHandler$SpeculativeExecution.query(RequestHandler.java:296)
      3. com.datastax.driver.core.RequestHandler$SpeculativeExecution.sendRequest(RequestHandler.java:276)
      4. com.datastax.driver.core.RequestHandler$SpeculativeExecution$1.run(RequestHandler.java:377)
      4 frames
    3. Java RT
      ThreadPoolExecutor.runWorker
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      1 frame