Elasticsearch cluster, Master-Slave relationship and querying

Hi

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: 123.23.44.23 (basically current ip address of machine) 

I changed

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

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

Thanks!

  1. Doesn't matter.
  2. You can still use localhost here.

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: 123.23.44.23 -> network.host: localhost and adding transport.host:123.23.44.23

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.