Hello! I see you're disabling the required properties check, likely because otherwise the call won't work. We have recently fixed the client so that cluster().health() can now be called without exception, so could you try using a version of the java client > 8.15.0?
I have tested this myself, the status green is returned correctly:
@ltrotta Thank you for the quick response. the solution works with the current version i am using 8.12.2. is there any optimisation or bug fixes present in version >8.15.0 or i can go ahead with the current version.
@sibasish.palo there are many bugfixes on the client side, but ideally I recommend using a version of the client closest to the version of the server, so that there's no discrepancy between the API definitions.
One other thing that I'm not sure was clear here -- /cluster/health and /_health_report are two very different things, despite having misleadingly similar names and response colors. /_cluster/health only gives information about whether shards are allocated. /_health_report checks a lot of things throughout the cluster (including shard allocation). So it would not be unusual for /_cluster/health to report green (all shards are allocated) but /_health_report to report yellow (for any of a wide variety of reasons)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.