【问题标题】:schema version mismatch cassandra架构版本不匹配 cassandra
【发布时间】:2018-07-26 16:25:26
【问题描述】:

我正在尝试放弃对 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


    【解决方案1】:

    要调查架构分歧,请尝试运行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)。当节点恢复时,它将协商应该解决问题的架构版本。

    【讨论】:

    • 尝试多次在有问题的节点上重新启动进程,但仍然无法解决问题。知道可以做什么(除了删除节点)? p.s.必须删除关闭节点上的提交日志,因为在重新启动时遇到错误
    【解决方案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]
    

    【讨论】:

      猜你喜欢
      • 2016-07-03
      • 2019-11-27
      • 1970-01-01
      • 1970-01-01
      • 2017-04-17
      • 2020-12-31
      • 2021-01-25
      • 2021-02-23
      • 1970-01-01
      相关资源
      最近更新 更多