‘The client noticed that the server is not a supported distribution of Elasticsearch‘ 报错及解决办法

django项目运行的好好的,突然接口查询错误。

观察报错信息

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

搜索百度无果,随搜索谷歌

查询到新闻链接

链接如下:

https://www.theregister.com/2021/08/09/elasticsearch_python_client_change/

主要意思,es为了与aws大战,在新的版本中,不再支持apach 2.0开源协议

https://www.oschina.net/news/154014/aws-fork-clients-of-elasticsearch

所以就需要把python项目的es客户端依赖版本降低或采用aws新拉的开源版本opensearch。

然而opensearch还不可以在生产环境应用

https://aws.amazon.com/cn/elasticsearch-service/the-elk-stack/what-is-opensearch/

所以修改pipfile指定项目的es版本。

重启构建,问题解决!

猜你喜欢

转载自blog.csdn.net/songkai558919/article/details/119568829
今日推荐