简体   繁体   English

Elasticsearch 跨集群复制 - 追随者索引“index_not_found_exception”

[英]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:我已按照以下步骤操作:

  1. Add Cluster1 as remote cluster in Cluster2.在 Cluster2 中添加 Cluster1 作为远程集群。

Configuration image配置图像

  1. Configure the next users:配置下一个用户:
  1. When I try to create a follower index of "newblogs" index, I have the next error:当我尝试创建“newblogs”索引的关注者索引时,出现下一个错误:

Can't create follower index no such index [newblogs] index_not_found_exception: no such index [newblogs]无法创建追随者索引没有这样的索引 [newblogs] index_not_found_exception:没有这样的索引 [newblogs]

Error image错误图片

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.

相关问题 index_not_found_exception - Elasticsearch - index_not_found_exception - Elasticsearch Elasticsearch - NotFoundError: NotFoundError(404, 'index_not_found_exception', '没有这样的索引) - Elasticsearch - NotFoundError: NotFoundError(404, 'index_not_found_exception', 'no such index) 错误:index_not_found_exception - Error: index_not_found_exception ELK中的auditbeat失败:index_not_found_exception - auditbeat failure in ELK : index_not_found_exception Elasticsearch :: Transport :: Transport :: Errors :: NotFound([404] {“错误”:{“ root_cause”:[{“类型”:“ index_not_found_exception” - Elasticsearch::Transport::Transport::Errors::NotFound ([404] {“error”:{“root_cause”:[{“type”:“index_not_found_exception” index_not_found_exception, reason=no such index [Sugestao]] - 如何将索引名称传递给 reactiveElasticsearchOperations.search - index_not_found_exception, reason=no such index [Sugestao]] - how pass index name to reactiveElasticsearchOperations.search putMapping 弹性搜索索引未找到异常 - putMapping elasticsearch index not found exception 弹性搜索:{"error":{"root_cause":[{"type":"index_not_found_exception","re​​ason":"在 asp.net core 中没有使用 NLog 的索引 - Elastic Search : {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index using NLog in asp.net core Elasticsearch索引复制到新服务器 - Elasticsearch index replication to new server Elasticsearch 索引在集群中的位置 - Elasticsearch index location in the cluster
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM