‘The client noticed that the server is not a supported distribution of Elasticsearch‘ error and solution

‘The client noticed that the server is not a supported distribution of Elasticsearch‘ error and solution

·

1 min read

The django project is running very well, but suddenly the interface query error.

{
 “code”: 400102,
 “message”: “请求错误”,
 “data”: {
 “detail”: “The client noticed that the server is not a supported distribution of Elasticsearch”
 }
}

Search Baidu there is no result, just search Google Query to the news link

image.png Links: https://www.theregister.com/2021/08/09/elasticsearch_python_client_change/ The main meaning is that in order to fight aws, es no longer supports the apach 2.0 open source protocol in the new version. https://www.oschina.net/news/154014/aws-fork-clients-of-elasticsearch

image.png Therefore, it is necessary to reduce the dependency version of the es client of the python project or adopt the open source version of opensearch newly pulled by aws. However, opensearch can not be used in the production environment https://aws.amazon.com/cn/elasticsearch-service/the-elk-stack/what-is-opensearch/

image.png So modify the es version of the specified project in pipfile.rch can not be used in the production environment

image.png

Restart the build, the problem is solved!