# Elasticsearch.Net.ElasticsearchClientException

**URL:** <https://discuss.elastic.co/t/elasticsearch-net-elasticsearchclientexception/330735>\
**Category:** Elasticsearch\
**Tags:** docker, language-clients\
**Created:** [April 25, 2023, 11:59am UTC](https://discuss.elastic.co/t/elasticsearch-net-elasticsearchclientexception/330735 "2023-04-25T11:59:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atilla\_Cokmez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atilla_cokmez/32/118014_2.png) [@Atilla\_Cokmez](https://discuss.elastic.co/u/Atilla_Cokmez)\
**Post date:** [April 25, 2023, 11:59am UTC](https://discuss.elastic.co/t/elasticsearch-net-elasticsearchclientexception/330735/1 "2023-04-25T11:59:55Z")

</div>

I Use Elasticsearch 7.16.2 on docker and Nest 7.16.0

I added these codes by collecting them from two different classes. It may look complicated

```auto
ConnectionSettings conStr = new ConnectionSettings(new Uri("http://localhost:9200"))
                .DisablePing()
                .SniffOnStartup(false)
            .SniffOnConnectionFault(false)
            .EnableApiVersioningHeader();

public IElasticClient elasticClient { get; set; }

public ElasticSearchManager(ConnectionSettings connectionSettings)
{
    elasticClient = new ElasticClient(connectionSettings);
}
        
public List<T> SimpleSearch<T>(string indexName, string searchValue) where T : SearchEngineEntity
{
    SearchDescriptor<T> searchDescriptor = new SearchDescriptor<T>();
    searchDescriptor.Query(q => q
                .MultiMatch(m => m
                    .Type(TextQueryType.MostFields)
                    .Fields(f => f.Fields("searchingArea"))
                    .Query(searchValue.ToLower()))
                );
    searchDescriptor.Index(indexName);
    var result = elasticClient.Search<T>(searchDescriptor);

```

//error message I received

Invalid NEST response built from a unsuccessful () low level call on POST: /destination\_autocomplete/\_search?pretty=true&error\_trace=true&typed\_keys=true

# Audit trail of this API call:

- [1] ProductCheckOnStartup: Took: 00:00:00.0502621
- [2] ProductCheckFailure: Node: [http://localhost:9200/](http://localhost:9200/) Took: 00:00:00.0392096

# 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 /?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.

 ![Ekran görüntüsü 2023-04-25 145557](https://us1.discourse-cdn.com/elastic/original/3X/b/2/b2149c841ef73dd8f0880bb2aabd78e252f7e29f.jpeg)

I access through the browser

 ![Ekran görüntüsü 2023-04-25 145823](https://us1.discourse-cdn.com/elastic/original/3X/4/7/47f26b31ed48c796d005d5c127770b957d702174.jpeg)

---

<div class="post-metadata">

**Author:** ![Atilla\_Cokmez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atilla_cokmez/32/118014_2.png) [@Atilla\_Cokmez](https://discuss.elastic.co/u/Atilla_Cokmez)\
**Post date:** [April 25, 2023, 1:00pm UTC](https://discuss.elastic.co/t/elasticsearch-net-elasticsearchclientexception/330735/2 "2023-04-25T13:00:47Z")

</div>

I found the solution and wanted to share it

[http://localhost:9200](http://localhost:9200)

instead of

[http://host.docker.internal:9200/](http://host.docker.internal:9200/)

it works !

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 23, 2023, 1:01pm UTC](https://discuss.elastic.co/t/elasticsearch-net-elasticsearchclientexception/330735/3 "2023-05-23T13:01:34Z")

</div>

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