I have two elasticsearch running on two different servers, I have same indexes on both servers. I want to have a master and data node configuration, for that below are the configuration changes which I did so far:
When I search some indexes from master I get the result but when I hit second server(having only data node), I get master_not_discovered_exception. reason ?
How to check if master and data node configuration is working properly?
I have got the solution. As I installed through rpm packages in the logs I was getting below issue:
[2017-08-24T03:50:01,331][INFO ][o.e.d.z.ZenDiscovery ] [node-2] failed to send join request to master [{node-1}{sYqhGZc4QyK_cbZ9_cz8gQ}{BBHUedE6Roaw0AMiYnQwIg}{172.31.4.119}{172.31.4.119:9300}], reason [RemoteTransportException[[node-1][172.31.4.119:9300][internal:discovery/zen/join]]; nested: IllegalArgumentException[can't add node {node-2}{sYqhGZc4QyK_cbZ9_cz8gQ}{FbDpyWy2S7SS1c8TvLsnfQ}{172.31.4.118}{172.31.4.118:9300}, found existing node {node-1}{sYqhGZc4QyK_cbZ9_cz8gQ}{BBHUedE6Roaw0AMiYnQwIg}{172.31.4.119}{172.31.4.119:9300} with the same id but is a different node instance]; ]
I had deleted contents of data folder(/var/lib/elasticsearch/nodes/0) and restarted both the servers and it worked for me.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.