NEST/Elasticsearch.Net version : 7.17.1
Elasticsearch version : 7.16.2 (standalone instance)
.NET runtime version : Framework 4.7.1
Operating system version : Windows 10 ENT (build 19042)
Description of the problem including expected versus actual behavior :
Trying to establish a BASIC-auth connection, over plain http:// and query the endpoint (any request). This is on a local network, and from within the same process, I have no problem connecting using the low-level client, using the same connection settings.
I am getting the dreaded:
"The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call"
Steps to reproduce :
- Build a ConnectionSettings object using a SingleNodeConnectionPool( new Uri(http://xyz.myorg.mydom:9200)) ,
and Basic.Authentication(usr, pwd).
The URL resolves to an IP via hosts file. - Connect using regular means (some of the additional 'stuff' below is me struggling to understand/troubleshoot)
_connSettings.EnableApiVersioningHeader().EnableDebugMode();
_connSettings.DisableAutomaticProxyDetection(true);
_nestClient = new Nest.ElasticClient(connSettings);
- Calling any method that hits the ES endpoint, like for example:
GetLifecycleResponse polResponse = _nestClient.IndexLifecycleManagement.GetLifecycle(new GetLifecycleRequest(policyName));
will raise the error; turns out (please see the debug trace below) the client tries to connect to localhost:9200 all the time.
Expected behavior
I expect the client to connect to the running instance (on the local network); once again, an instance (singleton) of the lower-level , in the same process, client connects without problems (right before the NEST call, I make a successful call with the low-level client).
Provide ConnectionSettings
(if relevant) : mentioned above.
Provide DebugInformation
(if relevant) :
Invalid NEST response built from a unsuccessful () low level call on GET: /_ilm/policy/es_edr.policy
# Audit trail of this API call:
- [1] ProductCheckOnStartup: Took: 00:00:04.0759481
- [2] ProductCheckFailure: Node: http://localhost:9200/ Took: 00:00:04.0759481
# 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 unknown from: GET / ---> 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: Unable to connect to the remote server ---> [System.Net](http://system.net/).Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:9200
at [System.Net](http://system.net/).Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at [System.Net](http://system.net/).ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at [System.Net](http://system.net/).HttpWebRequest.GetResponse()
at [Elasticsearch.Net](http://elasticsearch.net/).HttpWebRequestConnection.Request[TResponse](RequestData requestData)
--- End of inner exception stack trace ---
at [Elasticsearch.Net](http://elasticsearch.net/).RequestPipeline.ThrowIfTransientProductCheckFailure()
at [Elasticsearch.Net](http://elasticsearch.net/).RequestPipeline.Ping(Node node)
at [Elasticsearch.Net](http://elasticsearch.net/).Transport`1.Ping(IRequestPipeline pipeline, Node node)
at [Elasticsearch.Net](http://elasticsearch.net/).Transport`1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters)
--- End of inner exception stack trace ---