elastic / elasticsearch-cloud-aws

AWS Cloud Plugin for Elasticsearch
https://github.com/elastic/elasticsearch/tree/master/plugins/discovery-ec2
577 stars 181 forks source link

EC2 Autodiscovery not working with OpenJDK 8 #181

Closed nikolay closed 8 years ago

nikolay commented 9 years ago

I keep getting the following error: Exception while retrieving instance list from AWS API: Unable to execute HTTP request: peer not authenticated

I used the recommended by you IAM role and things worked fine with Elasticsearch v1.4.2 and v2.4.1 of the plugin, but things no longer work for me. I tried overriding IAM and using omnipotent AWS keys - I still get the error regardlessly.

nikolay commented 9 years ago

I downgraded to v1.4.2 and it's not working either.

nikolay commented 9 years ago

@dadoonet Any comment? I can provide more details if there's any interest to help solve this.

dadoonet commented 9 years ago

@nikolay Sorry for the delay. Wondering which JAVA vendor you are using? Any chance you are using OpenJDK instead of Oracle?

nikolay commented 9 years ago

@dadoonet OpenJDK 8.

dadoonet commented 9 years ago

Any chance you could test with Oracle JDK?

nikolay commented 9 years ago

Our preferences are OpenJDK > Zulu > Oracle JDK, with Oracle's being least desired due to the fact that it's purposely not well-suited for automatic installs. Of course, we can use WebUpd8's PPA, but that's hacky. Let me try though.

dadoonet commented 9 years ago

Yes please. I just like to confirm it is a AWS API issue with OpenJDK as I have read on some websites. Once confirmed, we can try to see if there is any workaround or if we should mention in docs that the plugin is not compatible with Java version X vendor Y.

nikolay commented 9 years ago

@dadoonet It was an issue with OpenJDK 8, which doesn't seem to be supported by (at least) v2.4.1. It would be nice if you can address the issue, but post a compatibility note here so that other people don't waste time like I did. Thanks in advance!

dadoonet commented 9 years ago

I also remember that this could happen when time is not synch'ed with NTP. Could you check that as well please?

If your machine has incorrect time, could you fix it and try again with open JDK ?

nikolay commented 9 years ago

All my machines are in sync and were launched at the same time EC2 instances. My user data already has NTP enabled and updated. Not sure if it's relevant, but this is on Ubuntu 14.10 (and thus OpenJDK 8, which is not available in the latest LTS release).

dadoonet commented 9 years ago

@nikolay We released recently new versions of the cloud-aws plugin. Any chance you can test 2.7.1 with es 1.7 on OpenJDK 8?

vazhnov commented 8 years ago

I got this error in Ubuntu 15.04, Elasticsearch 1.5.2, AWS Cloud Plugin 2.5.0, OpenJDK 8. Fixed by:

sudo update-ca-certificates -f
dadoonet commented 8 years ago

Closing. No further news on this so I suppose everything is fine now with the recent versions.