We recently upgraded ES 5.5 to 6.5.
Little background: We are downloading the open source code of elasticsearch and bundle it with our own application and then we give it to the customer. So when the customer install our app, elasticsearch will be also installed.
In ES 5.5 when there is 2 nodes, it forms a cluster but after upgrading it to 6.5 nodes are not forming cluster. It is working as individual nodes and also the status of the cluster health is yellow.
I have manually added the other nodes ip in discovery.zen.ping.unicast.hosts section of elasticsearch.yml file and then it formed cluster and cluster health status is green.
We have to give this product (our app + ES 6.5) to many customers and we can't ask every customer to edit the files to add the other node ips.
Why suddenly in ES6.5 nodes are not forming cluster?
I have checked the open source code and copied it to our project. https://github.com/elastic/elasticsearch/blob/6.5/plugins/discovery-file/src/main/java/org/elasticsearch/discovery/file/FileBasedDiscoveryPlugin.java
I can see the above file has been changed in 6.5 and we accommodated that changes still the issue exists.