[英]Elasticsearch Cross cluster replication - Follower index "index_not_found_exception"
我有 2 個彈性集群(Cluster1 和 Cluster2),我正在嘗試從 Cluster1 的領導索引配置 Cluster2 中的追隨者索引。
我已按照以下步驟操作:
在 Cluster1 中,角色為“remote-replication”的用戶“cross-cluster-user”。 跨集群用戶配置鏡像
在 Cluster2 用戶“cross-cluster-user”中,角色為“remote-replication”。 跨集群用戶配置鏡像
無法創建追隨者索引沒有這樣的索引 [newblogs] index_not_found_exception:沒有這樣的索引 [newblogs]
新博客索引存在於 Cluster1:獲取索引結果
我的 elasticsearch 版本是 8.3.3。
任何幫助將不勝感激。
此致。
elasticsearch.yml (Cluster1)
cluster.name: elastic-lab
node.name: ${HOSTNAME}
network.host: _eth1_
cluster.initial_master_nodes: ["node1"]
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 28-08-2022 15:46:47
#
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
elasticsearch.yml (Cluster2)
cluster.name: elastic-lab2
node.name: ${HOSTNAME}
network.host: _eth1_
cluster.initial_master_nodes: ["node1"]
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 28-08-2022 16:07:28
#
# --------------------------------------------------------------------------------
# Enable security features
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------
這是一個非常愚蠢的問題...我有 2 個集群(Cluster1 和 Cluster2),每個集群包含 1 個 elasticsearch 節點(主機名:node1)和 1 個 kibana 虛擬機(主機名:node4)。 “Node1”在每個集群中具有不同的 IP 地址,但是當我將(集群 1 的)節點 1 配置為種子節點時,名稱“節點 1”的解析是集群 2 中節點 1 的 IP 地址。 這就是遠程集群顯示為已連接的原因,它已連接到自己的 node1!
我已經通過 IP (而不是主機名)配置了種子節點,它似乎工作。 我不得不將所有節點的 elasticsearch.yml 中的選項“verification_mode”更改為值“none”(因為我遇到了 SSL 問題,這只是一個實驗室)。
注意:我不必為集群連接配置任何用戶或角色,即使文檔是這樣說的。
此致。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.