[英]Elasticsearch Cross cluster replication - Follower index "index_not_found_exception"
I have 2 elastic clusters (Cluster1 and Cluster2) and I am trying to configure a follower index in Cluster2 from a leader index of Cluster1.我有 2 个弹性集群(Cluster1 和 Cluster2),我正在尝试从 Cluster1 的领导索引配置 Cluster2 中的追随者索引。
I have followed the next steps:我已按照以下步骤操作:
In Cluster1 user "cross-cluster-user" with the role "remote-replication".在 Cluster1 中,角色为“remote-replication”的用户“cross-cluster-user”。 cross-cluster-user configuration image跨集群用户配置镜像
In Cluster2 user "cross-cluster-user" with the role "remote-replication".在 Cluster2 用户“cross-cluster-user”中,角色为“remote-replication”。 cross-cluster-user configuration image跨集群用户配置镜像
Can't create follower index no such index [newblogs] index_not_found_exception: no such index [newblogs]无法创建追随者索引没有这样的索引 [newblogs] index_not_found_exception:没有这样的索引 [newblogs]
The newblogs index exists in Cluster1: Get index result新博客索引存在于 Cluster1:获取索引结果
My elasticsearch version is 8.3.3.我的 elasticsearch 版本是 8.3.3。
Any help will be appreciated.任何帮助将不胜感激。
Best regards.此致。
elasticsearch.yml (Cluster1) 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) 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 -------------------------
It was a very silly problem...I have 2 Clusters (Cluster1 and Cluster2) and each consists in 1 elasticsearch node (hostname: node1) and 1 kibana virtual machine (hostname: node4).这是一个非常愚蠢的问题...我有 2 个集群(Cluster1 和 Cluster2),每个集群包含 1 个 elasticsearch 节点(主机名:node1)和 1 个 kibana 虚拟机(主机名:node4)。 "Node1" has different IP addresses in each cluster, but when I configured node1 (of Cluster1) as a seed node, the resolution of the name "node1" was the IP address of the node1 from Cluster2. “Node1”在每个集群中具有不同的 IP 地址,但是当我将(集群 1 的)节点 1 配置为种子节点时,名称“节点 1”的解析是集群 2 中节点 1 的 IP 地址。 This was the reason the remote cluster appeared as connected, it was connected to its own node1!这就是远程集群显示为已连接的原因,它已连接到自己的 node1!
I have configured the seed node by IP (instead of hostname) and it seems to work.我已经通过 IP (而不是主机名)配置了种子节点,它似乎工作。 I had to change the option "verification_mode" in elasticsearch.yml of all nodes to the value "none" (because I was having SSL issues and this is only a lab).我不得不将所有节点的 elasticsearch.yml 中的选项“verification_mode”更改为值“none”(因为我遇到了 SSL 问题,这只是一个实验室)。
Note: I didn´t have to configure any user or role for the clusters to connect, even though the documentation says so.注意:我不必为集群连接配置任何用户或角色,即使文档是这样说的。
Best regards.此致。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.