django项目运行的好好的,突然接口查询错误。
观察报错信息
```
{ "code": 400102, "message": "请求错误", "data": { "detail": "The client noticed that the server is not a supported distribution of Elasticsearch" } }
```
搜索百度无果,随搜索谷歌
查询到新闻链接
链接如下:
www.theregister.com/2021/08/09/…
主要意思,es为了与aws大战,在新的版本中,不再支持apach 2.0开源协议
所以就需要把python项目的es客户端依赖版本降低或采用aws新拉的开源版本opensearch。
然而opensearch还不可以在生产环境应用
所以修改pipfile指定项目的es版本。
重启构建,问题解决!