The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product

Invalid NEST response built from a unsuccessful () low level call on POST: /client/az30268j/_search?pretty=true&error_trace=true&typed_keys=true

Audit trail of this API call:

OriginalException: Elasticsearch.Net.ElasticsearchClientException: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. Call: Status code 404 from: GET /client/?pretty=true&error_trace=true ---> Elasticsearch.Net.PipelineException: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. ---> System.Net.WebException: The remote server returned an error: (404) Not Found.

at System.Net.HttpWebRequest.GetResponse()
at Elasticsearch.Net.HttpWebRequestConnection.Request[TResponse](RequestData requestData) in C:\Users\SteveGordon\Code\elasticsearch-net\src\Elasticsearch.Net\Connection\HttpWebRequestConnection.cs:line 73
--- End of inner exception stack trace ---
at Elasticsearch.Net.RequestPipeline.ThrowIfTransientProductCheckFailure() in C:\Users\SteveGordon\Code\elasticsearch-net\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 661
at Elasticsearch.Net.RequestPipeline.Ping(Node node) in C:\Users\SteveGordon\Code\elasticsearch-net\src\Elasticsearch.Net\Transport\Pipeline\RequestPipeline.cs:line 476
at Elasticsearch.Net.Transport1.Ping(IRequestPipeline pipeline, Node node) in C:\Users\SteveGordon\Code\elasticsearch-net\src\Elasticsearch.Net\Transport\Transport.cs:line 259 at Elasticsearch.Net.Transport1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters) in C:\Users\SteveGordon\Code\elasticsearch-net\src\Elasticsearch.Net\Transport\Transport.cs:line 87
--- End of inner exception stack trace ---

Request:

<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>

Response:

Could you please provide solution?
used elastic 7.16 and NEST 7.16 in project

@shashi1 It appears you've configured the URL with /client/ in the path and the server is returning a 404. How have you configured your server and is it behind proxies? Normally, you would configure only the hostname to the server. This error is slightly misleading. The root issue here is that the client is unable to reach the server based on your configuration.

Thanks Steve for quick update,

But In previous version 7.6 , it is working fine. After upgrade 7.16 version, it is throwing error. I will check and let you know

We checked but it is not working for 7.16 version and throwing same issue.

Can you please share the settings you use to configure your ElasticClient instance?

var node = new Uri(apiURL);
var pool = new SingleNodeConnectionPool(node);
var settings = new ConnectionSettings(pool, sourceSerializer: JsonNetSerializer.Default)
.GlobalHeaders(new NameValueCollection
{
{ "Authorization", $"Bearer {accessToken}" }
});

            settings.EnableDebugMode();
            settings.DefaultFieldNameInferrer(f => f.ToLower());
            var client = new ElasticClient(settings);

          
            {
                
                response = client.Search<Response.Result>(s =>
                      s.Index(agencyCode).Query(q =>
                          q.Bool(b =>
                              b.Filter
                              (
                                  m1 =>
                                      m1.Wildcard(w1 =>
                                      w1.Field(f1 =>
                                      f1.inmateId).Value(request.InmateId+"*"))
                              )
                          )).Size(500));
            }

Thanks @shashi1. At this point, the error still points to the server for URL "https://inminternalservices-dev.keefegp.com/client/?pretty=true&error_trace=true" returning a 404 when we expect a response from the ES server here. What response do you get if you request that URL directly from the same device where this code is running?

In ES 7.6 code, working code here
Valid NEST response built from a successful (200) low level call on POST: /client/tx31881j%2Caz30268j%2Coh32812j/_search?pretty=true&error_trace=true&typed_keys=true

Audit trail of this API call:

Request:

{"query":{"bool":{"filter":[{"wildcard":{"inmateid":{"value":"13*"}}}]}},"size":500}

The 7.16 client performs a pre-flight GET request to the root URL of the server before the first request. This is the one which appears to be failing due to a 404 response. We need to try to determine why that is and the client host can reach that URL.

Is it version specific Elasticsearch installed on server?

The check expects a response to validate the server is officially supported. We're not explicitly checking version numbers. Our clients are forward compatible with future versions of the same major version number. If you can share the response from a GET request to the root URL (https://inminternalservices-dev.keefegp.com/client/?pretty=true&error_trace=true) I can review that to see if there is anything unusual. We also expect headers to be returned without a proxy adjusting/removing them.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.