node.js - AWS Elasticsearch 返回 No living Connection
问题描述
大家好,我正在使用 AWS-Elasticsearch 服务并使用 Lambda 访问它。当我尝试从 Lambda 连接弹性搜索时,它会引发错误
{ Error: No Living connections
at sendReqWithConnection (/var/task/node_modules/elasticsearch/src/lib/transport.js:226:15)
at next (/var/task/node_modules/elasticsearch/src/lib/connection_pool.js:214:7)
at /var/task/node_modules/async-listener/glue.js:188:31
at process._tickCallback (internal/process/next_tick.js:61:11)
message: 'No Living connections',
body: undefined,
status: undefined }
我用Nodejs连接es域
const elasticsearch = require('elasticsearch');
const httpAwsEs = require('http-aws-es');
const AWS = require('aws-sdk');
const esClient = new elasticsearch.Client({
host: 'endpointAddress',
connectionClass: httpAwsEs,
httpAuth: 'userName:Passwod',
amazonES: {
region: 'us-east-1',
credentials: new AWS.EnvironmentCredentials('AWS')
}
});
module.exports = esClient;
我已经在另一个运行良好的帐户上进行了测试,这会是什么问题,感谢阅读。
解决方案
推荐阅读
- c# - C++ 互操作 DLL 和引用,以及 /FU 强制包含指令
- php - 如何在 laravel 中使用 ajax 更改状态
- sql - 夏皮罗-威尔克测试
- ruby-on-rails - Pundit 的用户模型设置
- python-2.7 - 连python3环境都激活了,JupyterLab也无法正常启动
- spring-security - InMemoryClientRegistrationRepository:工厂方法抛出异常;嵌套异常是 java.lang.NoSuchFieldError: PASSWORD
- android - 在 Flutter 中启用 USB 调试
- c# - 使用 c# 将数据从 Check Combo-box 插入和更新到 SQL Server
- svg - 响应式 SVG 剪辑路径或蒙版图像
- r - 用于计算签名的 R 字符串