尝试查询失败的所有主机 - com.datastax.driver.core.exceptions.OperationTimedOutException-操作超时)

时间:2015-12-24 09:29:15

标签: java cassandra timeout datastax-enterprise

我们在Digital Ocean上建立了一个3节点cassandra集群,并编写了一些使用Java CQL驱动程序连接到cassandra的java程序。查询继续运行一段时间,但一段时间后我们得到以下异常

Exception in thread "main" com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /128.199.98.201:9042 (com.datastax.driver.core.exceptions.OperationTimedOutException: [/128.199.98.201] Operation timed out))
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:231)
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1402)
at com.datastax.driver.core.Cluster.init(Cluster.java:164)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:343)
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:316)
at com.datastax.driver.core.Cluster.connect(Cluster.java:254)
at com.attinad.cantiz.iot.platform.cassandrasample.PagingExample.connect(PagingExample.java:24)
at com.attinad.cantiz.iot.platform.cassandrasample.App.main(App.java:31)

cassandra.yaml中的各种超时值如下所示

  1. range_request_timeout_in_ms:10000
  2. write_request_timeout_in_ms:2000
  3. counter_write_request_timeout_in_ms:5000
  4. cas_contention_timeout_in_ms:1000
  5. truncate_request_timeout_in_ms:60000
  6. request_timeout_in_ms:10000
  7. 知道问题是否与时间有关或是编码问题......任何帮助都表示赞赏

0 个答案:

没有答案