架构版本不匹配cassandra

时间:2018-02-15 19:57:52

标签: cassandra cassandra-3.0

我试图放弃Cassandra的物化视图并面对以下问题:

> drop materialized view XXXXXXXXXXXXXXXX;
OperationTimedOut: errors={'10.10.101.10': 'Request timed out while waiting for 
schema agreement. See Session.execute[_async](timeout) and 
Cluster.max_schema_agreement_wait.'}, last_host=10.10.101.10
Warning: schema version mismatch detected; check the schema versions of your nodes
in system.local and system.peers.

2 个答案:

答案 0 :(得分:4)

要调查架构不一致,请尝试运行nodetool describecluster

$ nodetool describecluster
Cluster Information:
    Name: StackOverflowTest
    Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch
    Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
    Schema versions:
        276ea081-1204-3bee-a92a-2171a68bd3a9: [10.1.2.3, 10.1.2.4, 10.6.1.4, 10.1.8.2, 10.1.8.7, 10.6.1.3]

        1f7d8b47-22d3-3210-b385-b2cdeb9c69e6: [10.6.1.5]

请注意,我的大多数节点都同意第一个架构版本,但10.6.1.5有自己的架构版本。在这种情况下,尝试正常重新启动违规节点的Cassandra进程(在这种情况下为10.6.1.5)。当节点重新启动时,它将协商应该解决问题的架构版本。

答案 1 :(得分:2)

您可以使用nodetool describecluster检查群集,它会为您提供有关每个节点架构版本的输出。我想你会看到大多数节点中的一个或几个节点。

大多数情况下,可以通过重新启动此节点轻松修复此问题。

这是我的一个集群的示例(模式版本中没有任何错误):

Cluster Information:
        Name: TestCluster
        Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch
        Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
        Schema versions:
                50219260-24ad-320f-9bd3-9ed0b207e2c6: [x.x.x.9, x.x.x.9, x.x.x.168, x.x.x.14, x.x.x.23, x.x.x.11, x.x.x.180, x.x.x.240, x.x.x.80, x.x.x.136, x.x.x.209, x.x.x.151]
相关问题