首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在elasticsearch云中创建日志

无法在elasticsearch云中创建日志
EN

Stack Overflow用户
提问于 2022-11-28 19:14:43
回答 1查看 17关注 0票数 0

我使用简单的nodejs应用程序,它将消息记录到elasticsearch (https://cloud.elastic.co/)中。

我使用winston-elasticsearch温斯顿软件包。

应用程序成功地在本地elasticsearch停靠容器中记录消息,但在elasticsearch云中没有记录消息。

我使用这个简单的应用程序:

首先,我得到了错误:ProductNotSupportedSecurityError:客户端由于服务器端的安全权限,无法验证服务器是否是Elasticsearch。,但我只是通过在elastic.js中正确指定用户和密码来解决这个问题。

在此之后,我希望它能够工作,但返回了这个错误:statusCode: 400。ResponseError: illegal_argument_exception: illegal_argument_exception原因:操作/元数据行1包含一个未知参数_type

EN

回答 1

Stack Overflow用户

发布于 2022-11-29 00:32:22

不建议使用文档类型(_type)参数:

https://www.elastic.co/guide/en/elasticsearch/reference/7.17/removal-of-types.html

温斯顿-elasticsearch在0.15版中删除了_type,您的示例使用0.8,所以请尝试升级包。

https://github.com/vanthome/winston-elasticsearch/blob/master/CHANGELOG.md#0150--2021-02-28

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74605500

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档