Elasticsearch cluster, Master-Slave relationship and querying

(Aditya Patel) #1


Initially, i was running elasticsearch on a single machine on a rackspace. In the config file, i had
in the beginning written

network.host: localhost

Later when i had to run elasticsearch server on two machines , i had to change it to

network.host: (basically current ip address of machine) 

I changed

discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["",""]

Now i have two questions:

  1. I have configured one master and one non-master. Since i have changed my network.host. Should i always post to master ip address. Can i still maintain localhost as my posting ip.
  2. I am also using kibana to visualize the data, since i have changed the network.host. I changed it in the kibana.yml [I had put ip address of master] file as well and restarted it. It stopped working give me an 502 bad gateway error.

Can anybody give me another to expose my two machines apart from changing network.host property or rectify the above two problems?

I am quite new to elasticsearch cluster, i tried going through other discussion forums but couldn't find relevant information


(Mark Walkom) #2
  1. Doesn't matter.
  2. You can still use localhost here.

(Aditya Patel) #3

Hi Mark,

Thanks for the reply. It wasn't working when i was setting

elasticsearch_url: "http://localhost:9200"

in kibana.yml.

The only way i could get it work was to change the master in elasticsearch config file:

network.host: -> network.host: localhost and adding transport.host:

This way i could expose the ip of machine for other node to discover and form the cluster.

Rest all i kept the same.

Let me know what you think about it.

(system) #4