使用cqlsh的COPY时无法连接到所有副本

时间:2018-07-05 13:45:36

标签: cassandra cqlsh

我的3节点Cassandra集群通过AWS弹性负载平衡(ELB)部署在AWS上

当我运行以下命令时:

$cqlsh -u <userid> -p <pwd>  <ELB's ip> -f backup.cqlsh

并在backup.cqlsh中:

COPY comm_hub.my_table TO 'my_table.csv' WITH PAGESIZE=10;

但是在导出大约200行之后,我得到了

backup.cqlsh:1:
Error for (-429560303281209914, -419692349690315328):
Failed to connect to all replicas ['10.16.234.41', '10.16.233.40', '10.16.234.130'] for (-429560303281209914, -419692349690315328), errors:
['NoHostAvailable - (\'Unable to connect to any servers\', {\'10.16.234.41\': error(None, "Tried connecting to [(\'10.16.234.41\', 9042)]. Last error: timed out")})', 'NoHostAvailable - (\'Unable to connect to any servers\', {\'10.16.233.40\': error(None, "Tried connecting to [(\'10.16.233.40\', 9042)]. Last error: timed out")})', 'NoHostAvailable - (\'Unable to connect to any servers\', {\'10.16.234.130\': error(None, "Tried connecting to [(\'10.16.234.130\', 9042)]. Last error: timed out")})'] (will try again later attempt 1 of 5)

我想念什么?

1 个答案:

答案 0 :(得分:0)

我在本地群集中遇到了同样的问题,并通过设置NUMPROCESSES = 1来解决。

在您提供的示例中:COPY comm_hub.my_table TO 'my_table.csv' WITH PAGESIZE=10 AND NUMPROCESSES=1;