• <tfoot id='xXzfT'></tfoot>

    <i id='xXzfT'><tr id='xXzfT'><dt id='xXzfT'><q id='xXzfT'><span id='xXzfT'><b id='xXzfT'><form id='xXzfT'><ins id='xXzfT'></ins><ul id='xXzfT'></ul><sub id='xXzfT'></sub></form><legend id='xXzfT'></legend><bdo id='xXzfT'><pre id='xXzfT'><center id='xXzfT'></center></pre></bdo></b><th id='xXzfT'></th></span></q></dt></tr></i><div id='xXzfT'><tfoot id='xXzfT'></tfoot><dl id='xXzfT'><fieldset id='xXzfT'></fieldset></dl></div>

    <legend id='xXzfT'><style id='xXzfT'><dir id='xXzfT'><q id='xXzfT'></q></dir></style></legend>
  • <small id='xXzfT'></small><noframes id='xXzfT'>

          <bdo id='xXzfT'></bdo><ul id='xXzfT'></ul>

        Elasticsearch 服务器发现配置

        Elasticsearch server discovery configuration(Elasticsearch 服务器发现配置)

        <small id='6cSqq'></small><noframes id='6cSqq'>

            <bdo id='6cSqq'></bdo><ul id='6cSqq'></ul>

                <i id='6cSqq'><tr id='6cSqq'><dt id='6cSqq'><q id='6cSqq'><span id='6cSqq'><b id='6cSqq'><form id='6cSqq'><ins id='6cSqq'></ins><ul id='6cSqq'></ul><sub id='6cSqq'></sub></form><legend id='6cSqq'></legend><bdo id='6cSqq'><pre id='6cSqq'><center id='6cSqq'></center></pre></bdo></b><th id='6cSqq'></th></span></q></dt></tr></i><div id='6cSqq'><tfoot id='6cSqq'></tfoot><dl id='6cSqq'><fieldset id='6cSqq'></fieldset></dl></div>
                <legend id='6cSqq'><style id='6cSqq'><dir id='6cSqq'><q id='6cSqq'></q></dir></style></legend>
                  <tbody id='6cSqq'></tbody>
                1. <tfoot id='6cSqq'></tfoot>
                  本文介绍了Elasticsearch 服务器发现配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已经安装了 ElasticSearch 服务器,我正在运行它:

                  I've installed ElasticSearch server, that i'm running by:

                  $ ./elasticsearch -f
                   {0.18.2}[11698]: initializing ...
                   loaded [], sites []
                   {0.18.2}[11698]: initialized
                   {0.18.2}[11698]: starting ...
                   bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.1.106:9300]}
                   new_master [Stingray][ocw4qPdmSfWuD9pUxHoN1Q][inet[/192.168.1.106:9300]], reason: zen-disco-join (elected_as_master)
                   elasticsearch/ocw4qPdmSfWuD9pUxHoN1Q
                   recovered [0] indices into cluster_state
                   bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.1.106:9200]}
                   {0.18.2}[11698]: started
                  

                  如何配置 Java 客户端以连接到此服务器?我刚刚:

                  How I can configure Java client to connect to this server? I have just:

                  node.client=true
                  

                  但是,在尝试连接后,我收到了:

                  but, after trying to connect i'm receiving:

                  org.elasticsearch.discovery.MasterNotDiscoveredException: 
                      at org.elasticsearch.action.support.master.TransportMasterNodeOperationAction$3.onTimeout(TransportMasterNodeOperationAction.java:162)
                  

                  如果我将 java 客户端配置为:

                  If i'm configuring java client as:

                  node.data=false
                  

                  我收到以下日志:

                  INFO main node:internalInfo:93 - [Stark, Tony] {0.18.2}[13008]: starting ...
                  INFO main transport:internalInfo:93 - [Stark, Tony] bound_address {inet[/0:0:0:0:0:0:0:0:9301]}, publish_address {inet[/192.168.1.106:9301]}
                  INFO elasticsearch[Stark, Tony]clusterService#updateTask-pool-13-thread-1 service:internalInfo:93 - [Stark, Tony] new_master [Stark, Tony][WkNn96hgTkWXRnsR0EOZjA][inet[/192.168.1.106:9301]]{data=false}, reason: zen-disco-join (elected_as_master)
                  

                  据我了解,这意味着这个新节点(应该是客户端节点)使自己成为一个新的主节点.而且我不会从日志中找到它并连接到任何其他节点.

                  As I understood it means that this new node (supposed to be client node) made itself a new master node. And I don't from log that it's found and connect to any other node.

                  服务器和客户端都在同一台机器上启动.192.168.1.106:9200 可以从浏览器访问.

                  Both server and client are started on same machine. 192.168.1.106:9200 are accessible from browser.

                  而且我找不到任何关于发现配置的好文档.我可以在哪里阅读有关 ElasticSearch 配置的更多信息?以及如何配置Java客户端?

                  And I can't find any good documentation about discovery config. Where I can read more about ElasticSearch configurations? And how to configure Java client?

                  推荐答案

                  遇到同样的问题,节点重启时节点无法选举主节点.

                  Faced the same issue where the nodes were not able to elect a master on nodes restart.

                  问题在于节点之间的通信.

                  The problem lies in the communication of nodes among themselves.

                  请确保在您的弹性搜索日志中,节点重启是否显示

                  Please ensure in your elastic search logs, whether the node restart says

                    publish_address {127.0.0.1:9200}
                    or
                    publish_address {0.0.0.1:9200}
                  

                  这意味着当前节点没有将其 IP 地址发布给其他节点,因此即使节点 IP 可能存在于 discovery.zen.ping.unicast.hosts<中,节点也不会识别此节点/strong>

                  This means the current node is not publishing its IP address to other nodes and hence the nodes won't recognise this node even though the node IP might be present in the discovery.zen.ping.unicast.hosts

                  解决方案在 elasticsearch.yml 中进行以下更改.添加

                  Solution Make the following changes in elasticsearch.yml. Add

                   network.host: _non_loopback:ipv4_
                   and restart the node.
                   Ensure that the bound address now shows the <IP address>:<port no> and not the localhost.
                  

                  这意味着现在您的节点是可发现的.使其在集群中可发现的第二步是将节点的 ip 地址添加到所有 master 节点的单播主机列表中,这样每当我们有一个新的 master 时,该节点就可以被新的 master 发现.

                  This means that now your node is discoverable. The second step to make it discoverable in the cluster is to add the ip address of the node in the unicast hosts lists of all the master nodes, so that whenever we have a new master, the node is discoverable to the new master.

                     Add the node IP to the discovery.zen.ping.unicast.hosts 
                     list of hosts of all the masters to make it disoverable. A masterpings all the 
                     nodes present in the unicast list.
                  

                  这篇关于Elasticsearch 服务器发现配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Lucene Porter Stemmer not public(Lucene Porter Stemmer 未公开)
                  How to index pdf, ppt, xl files in lucene (java based or python or php any of these is fine)?(如何在 lucene 中索引 pdf、ppt、xl 文件(基于 java 或 python 或 php 中的任何一个都可以)?)
                  KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)
                  How to search between dates (Hibernate Search)?(如何在日期之间搜索(休眠搜索)?)
                  How to get positions from a document term vector in Lucene?(如何从 Lucene 中的文档术语向量中获取位置?)
                  Java Lucene 4.5 how to search by case insensitive(Java Lucene 4.5如何按不区分大小写进行搜索)

                    • <bdo id='Z5OLo'></bdo><ul id='Z5OLo'></ul>

                        <tbody id='Z5OLo'></tbody>

                            <legend id='Z5OLo'><style id='Z5OLo'><dir id='Z5OLo'><q id='Z5OLo'></q></dir></style></legend>

                            <small id='Z5OLo'></small><noframes id='Z5OLo'>

                            <i id='Z5OLo'><tr id='Z5OLo'><dt id='Z5OLo'><q id='Z5OLo'><span id='Z5OLo'><b id='Z5OLo'><form id='Z5OLo'><ins id='Z5OLo'></ins><ul id='Z5OLo'></ul><sub id='Z5OLo'></sub></form><legend id='Z5OLo'></legend><bdo id='Z5OLo'><pre id='Z5OLo'><center id='Z5OLo'></center></pre></bdo></b><th id='Z5OLo'></th></span></q></dt></tr></i><div id='Z5OLo'><tfoot id='Z5OLo'></tfoot><dl id='Z5OLo'><fieldset id='Z5OLo'></fieldset></dl></div>
                            <tfoot id='Z5OLo'></tfoot>