Can't get ec2 discovery working


#1

Hi,
I've been trying for hours to get 2 nodes to discover each other but I just can't get it working

I followed this:


and many other resources but no good so far

right now my config file looks like this ob both nodes except for the node.name:

cluster.name: my_cluster
node.name: node1
network.host: ec2
cloud.aws.access_key: *****
cloud.aws.secret_key: *****
discovery.type: ec2
discovery.ec2.groups: launch-wizard-1
cloud.aws.region: eu-west-1

perhaps it might be something with the ec2 configuration since I'm really new to AWS
any way this is my installation code:

sudo apt-get install language-pack-UTF-8
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb http://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
sudo apt-get update && sudo apt-get install elasticsearch
sudo update-rc.d elasticsearch defaults 95 10
sudo /usr/share/elasticsearch/bin/plugin install cloud-aws
sudo service elasticsearch start

Thanks


#2

anyone?


(David Pilato) #3

In case it helps: https://www.elastic.co/guide/en/elasticsearch/plugins/current/cloud-aws-discovery.html#cloud-aws-discovery-permissions


(Stephen Goodall) #4

If it helps, I put these options in to my elasticsearch.yml:

logger.discovery: "DEBUG"
cloud.aws.region: "eu-west"
discovery.type: "ec2"
network.host: "ec2"

and changed discovery.zen.ping.multicast.enabled to false. Not sure whether that is supposed to need changing but I think I had issues when it was true.

If you add the logger line you should at least see if the ec2 discovery is finding other nodes in the elasticsearch logs (/var/log/elasticsearch/{cluster-name}.log


(system) #5