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.
var node = new Uri(apiURL);
var pool = new SingleNodeConnectionPool(node);
var settings = new ConnectionSettings(pool, sourceSerializer: JsonNetSerializer.Default)
.GlobalHeaders(new NameValueCollection
{
{ "Authorization", $"Bearer {accessToken}" }
});
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
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.
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.
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.