gpt4 book ai didi

elasticsearch - Elasticsearch部落节点和Kibana-未知的主节点

转载 作者:行者123 更新时间:2023-12-03 00:14:56 25 4
gpt4 key购买 nike

我正在使用Elasticsearch 2.3.1和Kibana 4.5。我有2个Elasticsearch集群。

群集1-1主节点,1个数据节点和1个客户端节点。
群集2-1-主节点,1个数据节点和1个部落节点。

部落节点能够与两个集群中的节点通信。我在两个集群中也都有2个索引,集群1中的cluster1index和集群2中的cluster2index。我能够查看这些索引:

yellow open cluster2index 5 1  22400 0  24.6mb  24.6mb 
yellow open cluster1index 5 1 129114 0 109.9mb 109.9mb

但是,如果我尝试将Kibana与部落节点连接,则会收到错误消息
[2016-05-05 11:49:03,162][DEBUG][action.admin.indices.create] [tribe-node-MS2] no known master node, scheduling a retry
[2016-05-05 11:49:33,163][DEBUG][action.admin.indices.create] [tribe-node-MS2] timed out while retrying [indices:admin/create] after failure (timeout [30s])
[2016-05-05 11:49:33,165][WARN ][rest.suppressed ] /.kibana Params: {index=.kibana}
MasterNotDiscoveredException[null]
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$5.onTimeout(TransportMasterNodeAction.java:226)
at org.elasticsearch.cluster.ClusterStateObserver$ObserverClusterStateListener.onTimeout(ClusterStateObserver.java:236)
at org.elasticsearch.cluster.service.InternalClusterService$NotifyTimeout.run(InternalClusterService.java:804)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

我尝试将kibana连接到客户端节点,并且能够查看我的索引。此后,如果我将Kibana连接到部落节点,则可以查看仪表板。

我的kibana配置:
 server.port: 5601
server.host: "hostname"
elasticsearch.url: "http://hostname:port"
kibana.index: ".kibana"

我不确定为什么Kibana不能最初使用部落节点,以及我的配置中是否缺少任何内容。

我在elasticsearch论坛中读了一个答案:

"Regarding the issue you have with kibana, you can't create a .kibana index directly with the tribe node because it's a tribe node :slight_smile: sitting in a cluster that has no master node and data node. Yes, this tribe node is connected to two clusters in this case but it does not know where to put .kibana index if you are under the assumption that it should write to one of the clusters."



这是为什么我无法直接在部落节点中直接创建kibana索引的原因,但是后来在创建索引之后,我就能够指向部落节点的Kibana吗?如果是这样,是否有任何配置可直接将Kibana与部落节点连接?

最佳答案

很好的附加信息,还有确认,可以在this github issuethis one中找到此行为。

作为总结 ...

The Tribe Node documentation states that you cannot execute Master Level Write Operations such as Create Index, both of which are required when using Kibana 4 for the first time. Simply creating the index is not sufficient, because Put Mapping is also required, and is also a Master Level Write Operation.

As a workaround, first bring up the Kibana 4 instance and configure it to point directly at one of the remote clusters so that it will initialize the .kibana index in that cluster. While Kibana 4 is connected to this single cluster, create and save the Index Settings/Index Pattern that you will be using for the tribe node there, and create/save at least 1 visualization and 1 dashboard. Then update Kibana yml file to reconfigure its ES connection to point to the tribe node and restart Kibana 4.

From that point on, you should be able to continue managing Kibana Dashboards & Visualizations through the tribe node, providing that the .kibana index exists in only one of the remote clusters. If the index must exist in more than one cluster (e.g., you are doing snapshot/restore for redundancy), then instruct the Tribe node to prefer the master version with these settings (where clusterA holds the master .kibana index):


tribe:
on_conflict: prefer_clusterA

关于elasticsearch - Elasticsearch部落节点和Kibana-未知的主节点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37046050/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com