2016-10-03 3 views
0

Я развернул кластер dassastax cassandra в облаке Google. Размер кластера - 4 узла на двух разных датацентрах.Подключение opscenter, но нет данных

Серверы работают нормально и могут просматривать opscenter, но нет данных о нем и получения следующих ошибок.

Это новое развертывание, и все узлы запущены и работают. Пока не были созданы таблицы.

Сообщение об ошибке из журнала OpsCenter:

[opscenterd] ERROR: Unhandled error in Deferred: com.datastax.driver.core.exceptions.UnavailableException: Not enough replicas available for query at consistency ONE (1 required but only 0 alive) 

address.yaml от одного узла:

stomp_interface: 10.128.x.x [ ops center ip ] 
agent_rpc_interface: 10.132.x.x [ one of the node ip] 
agent_rpc_broadcast_address: 10.132.x.x 

**cassandra.yaml from one of the node:** 

cluster_name: 'Test Cluster' 

num_tokens: 64 



hinted_handoff_enabled: true 
max_hint_window_in_ms: 10800000 # 3 hours 

hinted_handoff_throttle_in_kb: 1024 

max_hints_delivery_threads: 2 

hints_directory: /var/lib/cassandra/hints 

hints_flush_period_in_ms: 10000 

max_hints_file_size_in_mb: 128 


batchlog_replay_throttle_in_kb: 1024 

authenticator: AllowAllAuthenticator 

authorizer: AllowAllAuthorizer 

role_manager: com.datastax.bdp.cassandra.auth.DseRoleManager 

roles_validity_in_ms: 2000 


permissions_validity_in_ms: 2000 


partitioner: org.apache.cassandra.dht.Murmur3Partitioner 

data_file_directories: 
    - /mnt/data 

commitlog_directory: /mnt/commitlog 

disk_failure_policy: stop 

commit_failure_policy: stop 

key_cache_size_in_mb: 

key_cache_save_period: 14400 

row_cache_size_in_mb: 0 

row_cache_save_period: 0 


counter_cache_size_in_mb: 

counter_cache_save_period: 7200 


saved_caches_directory: /mnt/saved_caches 

commitlog_sync: periodic 
commitlog_sync_period_in_ms: 10000 

commitlog_segment_size_in_mb: 32 


seed_provider: 
    # Addresses of hosts that are deemed contact points. 
    # Cassandra nodes use this list of hosts to find each other and learn 
    # the topology of the ring. You must change this if you are running 
    # multiple nodes! 
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider 
     parameters: 
      # seeds is actually a comma-delimited list of addresses. 
      # Ex: "<ip1>,<ip2>,<ip3>" 
      - **seeds: "XX.XXX.X.X" [ The node IP from different Data Center]** 

concurrent_reads: 32 
concurrent_writes: 32 
concurrent_counter_writes: 32 

concurrent_materialized_view_writes: 32 

memtable_allocation_type: heap_buffers 



index_summary_capacity_in_mb: 

index_summary_resize_interval_in_minutes: 60 

trickle_fsync: true 
trickle_fsync_interval_in_kb: 10240 

storage_port: 7000 

ssl_storage_port: 7001 

listen_address: **SAME NODE IP** 

broadcast_address: **SAME NODE IP** 



start_native_transport: true 
native_transport_port: 9042 



start_rpc: true 

rpc_address: 0.0.0.0 

rpc_port: 9160 

broadcast_rpc_address: SAME NODE IP 

rpc_keepalive: true 

rpc_server_type: sync 




thrift_framed_transport_size_in_mb: 15 

incremental_backups: false 

snapshot_before_compaction: false 

auto_snapshot: true 

tombstone_warn_threshold: 1000 
tombstone_failure_threshold: 100000 

Opscenter.conf из OpsCenter:

[webserver] 

port = 8888 

interface = 0.0.0.0 

[authentication] 

enabled = False 

[stat_reporter] 

статус nodetool:

Datacenter: europe-west1-b 

Status=Up/Down 

|/ State=Normal/Leaving/Joining/Moving 

-- Address Load Tokens Owns Host ID Rack 

UN 10.XXX.0.2 220 KB 64 ? 5381a371-c532-4be7-a7f5-80162bef4541 europe-west1-b 

UN 10.XXX.0.3 148.6 KB 64 ? e5b3dfec-f9bf-4952-b48f-b5a82749a9fe europe-west1-b 

Datacenter: us-east1-b 

Status=Up/Down 

|/ State=Normal/Leaving/Joining/Moving 

-- Address Load Tokens Owns Host ID Rack 

UN 10.XXX.0.2 158.72 KB 64 ? b93980e0-3c28-4bb0-9e49-220cb009d44c us-east1-b 

UN 10.XXX.0.3 192.85 KB 64 ? af242b71-b7b4-4345-9888-5b89eb5e6199 us-east1-b 

Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless 
+0

У вас есть несколько контроллеров домена? Какая версия OpsCenter? Можете ли вы включить вывод состояния nodetool? –

+0

версия opscenter 6.0.2. Поскольку статус nodetool имеет более длительный выход. Я опубликовал вывод в разделе «Ответ». – user374374

+0

Можете ли вы предоставить свой коэффициент репликации для пространства ключей OpsCenter? ('cqlsh -e" описывает пространство ключей \ "OpsCenter \" "| grep KEYSPACE') –

ответ

1

У вас есть DC в вашем фактор репликации ($ постоянного тока) то не существует, поэтому, когда OpsCenter посылает запрос на чтение данных координатор реагирует с UnavailableException.

Попробуйте обновить свое пространство ключей, например ALTER KEYSPACE "OpsCenter" WITH replication = {'class': 'NetworkTopologyStrategy', 'us-east1-b': '2'}, и выполнить полный ремонт, если вы хотите сохранить данные там.

Если он еще не запущен, значит, у вас нет данных, которые вы хотите сохранить, просто удалите пространство ключей opscenter (drop keyspace "OpsCenter") и перезапустите opscenterd и агенты (после того, как служба opscenter начала резервное копирование).

+0

Спасибо Крису. Это решило мою проблему. – user374374

Смежные вопросы