-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
NullPointerException when multiple zones are used #16967
Comments
I looked at the source code and I think that this could happen if you have absolutely no instance running in one of the zones you mentioned. Is that your case? Could you confirm that please? For the record, we have a test which tries settings with 2 zones: https://github.com/elastic/elasticsearch/blob/2.1/plugins/cloud-gce/src/test/java/org/elasticsearch/discovery/gce/GceDiscoverySettingsTests.java#L72. |
Thank you dadoonet, That is correct at the moment I don't have any instances running in the second zone. This is my current setup:
The problem is that when a second zone is added to the configuration file the communication between the nodes is terminated. I'm using autoscaling so depending on traffic I may need a new node on a different zone or if traffic is low the nodes in a certain zone can be shutdown leaving that zone empty |
Thanks for confirming. Definitely something we need to fix. |
When GCE region is empty we get back from the API something like: ``` { "id": "dummy" } ``` instead of: ``` { "id": "dummy", "items":[ ] } ``` This generates a NPE when we aggregate all the lists into a single one. Closes elastic#16967.
When GCE region is empty we get back from the API something like: ``` { "id": "dummy" } ``` instead of: ``` { "id": "dummy", "items":[ ] } ``` This generates a NPE when we aggregate all the lists into a single one. Closes elastic#16967.
@ghorkov I was able to reproduce it and came with fixes for 5.x and 2.x versions. |
Elasticsearch version: 2.1.2
JVM version:1.8.0_74
OS version:Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u3 (2016-01-17) x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
GCE Discovery is not working when multiple zones are used. I followed the steps here: https://www.elastic.co/guide/en/elasticsearch/plugins/current/cloud-gce-usage-discovery-zones.html
I have tested my configuration by changing the configuration file to use 1 zone and GCE discovery works correctly and the nodes can communicate correctly. As soon as I add a second zone the nodes stop communicating to each other.
I was expecting to configure all nodes to communicate with each other across all Google Cloud zones. If I need a new node in a different zone I could clone my existing instance template and move it to the new zone and communication between nodes will happen automatically across all zones.
Steps to reproduce:
Provide logs (if relevant):
My configuration yml file:
By the way: I've also configured the metadata es_port=9301
GCE discovery only works if the zone property is changed to one of the following:
The text was updated successfully, but these errors were encountered: