Node and elasticSearch client - The client noticed that the server is not a supported distribution of Elasticsearch

10,872

Solution 1

Resolved by upgrading to @elastic/elasticsearch 7.13.0

https://github.com/elastic/elasticsearch-js/issues/1519

Solution 2

Basically, all Elastic clients are going to be updated to not work with anything else than official Elastic versions: https://www.theregister.com/2021/08/09/elasticsearch_python_client_change/

That somehow makes sense since AWS ES (soon Opensearch) and Elasticsearch (by Elastic) are going to be completely different products, so it would make no sense to have one client to rule them all.

When taking the decision to fork the underlying engine (i.e. the elasticsearch project), one also has to fork the related clients since those clients are mainly working through APIs that will diverge anyway.

Share:
10,872
David Faizulaev
Author by

David Faizulaev

Updated on July 06, 2022

Comments

  • David Faizulaev
    David Faizulaev almost 2 years

    I'm using @elastic/elasticsearch version ^7.5.0 and Node 14. Everything worked fine, until I ran yarn upgrade which made various changes in my yarn.lock file and since then I'm getting the following error:

    The client noticed that the server is not a supported distribution of Elasticsearch

    I tried upgrading @elastic/elasticsearch to latest version ^7.14.0, but this did not resolve the issue.

    Nothing changed in AWS configuration either, what can be the cause for this error?

    Please advise.

  • David Faizulaev
    David Faizulaev over 2 years
    So I need to start using a different client then?
  • Val
    Val over 2 years
    What's the exact version of your AWS ES cluster?
  • Val
    Val over 2 years
    This is not going to work going forward (i.e. 7.14+). See this. Also note that AWS ES will never go higher than 7.10.2, and you should keep client versions in synch with the backend versions, otherwise you run the risk of hitting incompatibilities. So you should upgrade to 7.10.0, not higher, and when AWS ES provides their own client, switch to it
  • Iching Chang
    Iching Chang over 2 years
    I think the current solution is to pin point the version exactly to @elastic/elasticsearch: 7.13.0
  • David Faizulaev
    David Faizulaev over 2 years
    @IchingChang true, that's what I did.
  • Jackie
    Jackie over 2 years
    Getting it again when updating further
  • glimmbo
    glimmbo over 2 years
    I think so @DavidFaizulaev, I've run into errors like ProductNotSupportedError: The client noticed that the server is not a supported distribution of Elasticsearch