Description
Elastic.Clients.Elasticsearch version: 8.15.1
Elasticsearch version: 8.15.0
.NET runtime version: 4.8
Operating system version: Windows11
Description of the problem including expected versus actual behavior:
If you instantiate a new ElasticsearchClient and make a call to Indices.ExistsAsync it fails with an error:
Elastic.Clients.Elasticsearch.UnsupportedProductException: The client noticed that the server is not a supported distribution of Elasticsearch or an unknown product.
If you precede the Indices.ExistsAsync call with a Cluster.HealthCheckAsync call the ExistsAsync call succeeds.
Steps to reproduce:
-
I created a brand new 8.15 install of elastic search and kibana having stopped my 7.16.x ES running on 9200.
-
This fails:
public async Task FailingMethod() { var settings = new ElasticsearchClientSettings(new Uri("https://localhost:9205")); settings.Authentication(new BasicAuthentication("elastic", "<password>")); var client = new ElasticsearchClient(settings); var result2 = await client.Indices.ExistsAsync("test"); }
-
This succeeds:
public async Task SuccessfulMethod() { var settings = new ElasticsearchClientSettings(new Uri("https://localhost:9205")); settings.Authentication(new BasicAuthentication("elastic", "<password>")); var client = new ElasticsearchClient(settings); var result = await client.Cluster.HealthAsync(); var result2 = await client.Indices.ExistsAsync("test"); }
-
I've not tested with any other API call.
Expected behavior
I wouldn't expect to have to make another API call before the ExistsAsync works.