我已经配置了一个卡桑德拉clustter与3个节点卡桑德拉聚类故障切换到高Avialability
Node1(192.168.0.2) , Node2(192.168.0.3), Node3(192.168.0.4)
创建与复制因数的密钥空间 '测试' 为2。
Create KEYSPACE test WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 2}
当我停止Node2或Node3(一次一个,同时一次)时,我可以在keyspace.table上执行CRUD操作。
当我停止Node1和尝试更新/创建节点4或节点3连胜,得到下面的错误虽然节点3和节点4启动并运行 - :
All host(s) tried for query failed (tried: /192.168.0.4:9042 (com.datastax.driver.core.exceptions.DriverException: Timeout while trying to acquire available connection (you may want to increase the driver number of per-host connections))) com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /192.168.0.4:9042 (com.datastax.driver.core.exceptions.DriverException: Timeout while trying to acquire available connection (you may want to increase the driver number of per-host connections)))
我不知道如何卡桑德拉选举的领导者如果领导者节点死亡。
在cassandra中没有领导者的概念...检查是否可以通过端口9042 telnet到主机(192.168.0.4) –
您能否提供更多关于在queires上使用的一致性级别的信息(这对行为有巨大的影响你期待)?你正在使用驱动程序或使用cqlsh访问? –
@undefined_variable ....是我可以从本地桌面telnet到端口9042上的所有节点。 – UAnand