首页 > 其他分享 >cassandra

cassandra

时间:2022-10-01 11:44:48浏览次数:44  
标签:mb cache olap 报错 cassandra size

目录

1.某个cassandra节点无法启动,pod状态为Running,0/1,日志无明显报错

2.cassandra日志报错Unknown endpoint: /10.224.14.163

3.cassandra报错Unable to gossip with any peers

1.某个cassandra节点无法启动,pod状态为Running,0/1,日志无明显报错

cassandra版本:3.11.4

该问题是由于cassandra的配置文件配置异常引起,修改配置文件后即可

  1. 修改cassandra配置文件
vim /etc/kubernetes/cassandra-config.yml
[root@controller-71 olap]# cat cassandra-config.yml 
apiVersion: v1
kind: ConfigMap
metadata:
  name: cassandra-config-olap
  namespace: component
data:
  cassandra.yaml: |+
    auto_bootstrap: true
    disk_access_mode: standard
    cluster_name: 'cassandra-olap-cluster'
    num_tokens: 32
    hinted_handoff_enabled: false
    hinted_handoff_throttle_in_kb: 1024
    max_hints_delivery_threads: 2
    hints_directory: /cassandra_data/hints
    hints_flush_period_in_ms: 10000
    max_hints_file_size_in_mb: 128
    batchlog_replay_throttle_in_kb: 65536
    authenticator: PasswordAuthenticator
    authorizer: CassandraAuthorizer
    role_manager: CassandraRoleManager
    roles_validity_in_ms: 2000
    permissions_validity_in_ms: 2000
    credentials_validity_in_ms: 2000
    partitioner: org.apache.cassandra.dht.Murmur3Partitioner
    cdc_enabled: false
    data_file_directories:
        - /mnt/locals/cassandras/volume1
        - /mnt/locals/cassandras/volume2
        - /mnt/locals/cassandras/volume3
        - /mnt/locals/cassandras/volume4
        - /mnt/locals/cassandras/volume5
    commitlog_directory: /cassandra_data/commitlog
    disk_failure_policy: stop
    commit_failure_policy: stop_commit
    key_cache_size_in_mb: 512
    key_cache_save_period: 300
    prepared_statements_cache_size_mb:
    thrift_prepared_statements_cache_size_mb:
    row_cache_size_in_mb: 0
    row_cache_save_period: 0
    counter_cache_size_in_mb:
    counter_cache_save_period: 7200
    saved_caches_directory: /cassandra_data/saved_caches
    commitlog_sync: periodic
    commitlog_sync_period_in_ms: 5000
    commitlog_segment_size_in_mb: 256
    seed_provider:
        - class_name: org.apache.cassandra.locator.SimpleSeedProvider
          parameters:
            - seeds: "cassandra-olap-0.cassandra-olap.component.svc.cluster.local"   #如果这里有以逗号分隔的多个值,需要删掉,只保留这里示例的0这个值即可
    concurrent_reads: 128
    concurrent_writes: 256
    concurrent_counter_writes: 128
  1. 应用更新后的配置文件,重启cassandra服务

    kubectl apply -f /etc/kubernetes/cassandra-config.yml
    kubectl -n component rollout restart sts cassandra-olap
    
  2. 等待cassandra服务启动完成

2.cassandra日志报错Unknown endpoint: /10.224.14.163

备份异常cassandra服务的commit log文件后,并将原commit log删除后重启异常的cassandra后恢复成功

3.cassandra报错Unable to gossip with any peers

该问题通常是由于异常cassandra pod所在节点的flannel异常所导致

可尝试重启flannel服务或重启有网络问题的服务器来修复

标签:mb,cache,olap,报错,cassandra,size
From: https://www.cnblogs.com/zgjj/p/16746989.html

相关文章