Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery on EC2 not running #244

Open
hernan82arg opened this issue Sep 23, 2015 · 11 comments
Open

Discovery on EC2 not running #244

hernan82arg opened this issue Sep 23, 2015 · 11 comments

Comments

@hernan82arg
Copy link

Hi Guys, I've been trying to make this work with no luck.

My config is as follow:

cluster.name: fake
node.name: prd-fake-app-01
cloud:
aws:
access_key: AKIAI24ITOQA4NFAKE
secret_key: 7fHOeNoeuzFrnvpKgXj2ac6GL4TkeFAKE
region: us-east
discovery:
type: ec2
groups: sg-8d64fake

IAM user has full access to ec2.

Log looks as follow:

[2015-09-23 22:50:12,058][INFO ][node ] [prd-fake-app-01] initializing ...
[2015-09-23 22:50:12,149][INFO ][plugins ] [prd-fake-app-01] loaded [cloud-aws], sites []
[2015-09-23 22:50:12,188][INFO ][env ] [prd-fake-app-01] using [1] data paths, mounts [[/ (/dev/xvda1)]], net usable_space [16.6gb], net total_space [19.5gb], types [ext4]
[2015-09-23 22:50:15,076][INFO ][node ] [prd-fake-app-01] initialized
[2015-09-23 22:50:15,076][INFO ][node ] [prd-fake-app-01] starting ...
[2015-09-23 22:50:15,132][INFO ][transport ] [prd-fake-app-01] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/10.50.1.114:9300]}
[2015-09-23 22:50:15,140][INFO ][discovery ] [prd-fake-app-01] erx/2G9PkhMFQVuC7YZyTGWdTw
[2015-09-23 22:50:21,165][INFO ][cluster.service ] [prd-fake-app-01] new_master [prd-fake-app-01][2G9PkhMFQVuC7YZyTGWdTw][prd-fake-app-01][inet[/10.50.1.114:9300]], reason: zen-disco-join (elected_as_master)
[2015-09-23 22:50:21,182][INFO ][http ] [prd-fake-app-01] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/10.50.1.114:9200]}
[2015-09-23 22:50:21,182][INFO ][node ] [prd-fake-app-01] started
[2015-09-23 22:50:21,194][INFO ][gateway ] [prd-fake-app-01] recovered [0] indices into cluster_state

and same thing is happening in the other node.

I've also tried using the name of the security group with no luck.

I've tried plugin version 2.7.0 and 2.7.1 on ES 1.7.0.

I've this working in the same way with ES 1.7.0 and plugin version 2.7.0
Everything is configured in the same way as I'm doing this thru chef.

Is there any way to get the log in debug ?
any ideas on what to look?

thanks in advance

@danialfaridrocksauce
Copy link

+1 same issue

@mausch
Copy link

mausch commented Oct 15, 2015

Same here. I had this working until a few days ago, has Amazon made a breaking change somewhere?

@ankon
Copy link
Contributor

ankon commented Oct 15, 2015

You should be able to enable debugging for discovery using config/logging.yml by uncommenting the line for discovery

@mausch
Copy link

mausch commented Nov 25, 2015

In my case I was missing the http.publish_host setting ( elastic/elasticsearch#8137 ) because I was running ES on Docker mapping it to a different port. Weird thing is two out of three nodes could always see each other and one of them (seemed to be random which one) was left out.

Anyway, it was not related to the AWS discovery plugin, sorry.

@neonix888
Copy link

+1

@neonix888
Copy link

Greetings, anyone know what is the work around as only single node is showing up when they should be nodes showing up in a cluster. Thank you for your time.

@mausch
Copy link

mausch commented Dec 2, 2015

Scratch my previous comment, it happened again. I had to revert to manual discovery.
Nothing relevant came up in the debug logs, I'll post what I have tomorrow.

@neonix888
Copy link

My bad, need to allow 9300. Auto discovered, voila!

@imacube
Copy link

imacube commented Dec 2, 2015

@hernan82arg Did you set the following:

discovery.ec2.any_group: false

By default its set to true so the plugin still try's all instances in the region regardless of the security group so the discovery.ec2.groups option won't help.

@hernan82arg
Copy link
Author

Nope, I didn't. Will try that the next time. I haven't come back here because after some time it worked (without making any changes). Thanks

@mmedin
Copy link

mmedin commented Jun 21, 2018

Hey @hernan82arg: You have a small indentation or level error in your config. It's "discovery.ec2.groups", not "discovery.groups". The correct config is:

node.name: prd-fake-app-01
cloud:
   aws:
      access_key: AKIAI24ITOQA4NFAKE
      secret_key: 7fHOeNoeuzFrnvpKgXj2ac6GL4TkeFAKE
      region: us-east
discovery:
   type: ec2
   ec2: 
      groups: sg-8d64fake
      any_group: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants