架构版本不匹配cassandra

问题描述 投票:1回答:2

我试图放弃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.
cassandra cassandra-3.0
2个回答
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)。当节点恢复时,它将协商应该解决问题的模式版本。


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]
© www.soinside.com 2019 - 2024. All rights reserved.