0
votes

I have two computers running in Amazon EC2. I want to setup an Elasticsearch cluster between them. I have installed the EC2 Discovery Plugin and also I have included Zen Discovery configuration in their YMLs. Despite these, the cluster is not being formed. Both are starting as independent nodes.

My network and discovery settings are:

network.host: 0.0.0.0
http.port: 8200
discovery.zen.ping.unicast.hosts: ["10.0.1.2", "10.0.3.4"]
cloud.aws.access_key: "abc"
cloud.aws.secret_key: "xyz"

What other steps should I take to start the cluster?

1
Can you show the network configuration of both of your nodes?Val
I remember that you need to set on amazon machine level permissions for that.Vova Bilyachat
@Val I have added my cluster stats.khateeb
@VolodymyrBilyachat I will try that and let you know. How do I see my EC2 access policy?khateeb

1 Answers

0
votes

Your hosts are not seeing each other because your network.host setting doesn't use the correct IP address:

On host1 you need this config:

network.host: 10.0.1.2
http.port: 8200
discovery.zen.ping.unicast.hosts: ["10.0.3.4"]
cloud.aws.access_key: "abc"
cloud.aws.secret_key: "xyz"

On host2 you need this config:

network.host: 10.0.3.4
http.port: 8200
discovery.zen.ping.unicast.hosts: ["10.0.1.2"]
cloud.aws.access_key: "abc"
cloud.aws.secret_key: "xyz"

To simplify you can also have both hosts in the discovery.zen.ping.unicast.hosts, that will simplify automated deployments, but the above should work.