简体   繁体   English

elasticSearch / npm:Elasticdump返回“自签名证书”错误

[英]elasticSearch/npm: Elasticdump returns a “self signed certificate” error

I am able to get the json response for the elastic search query via an http client but on trying via elasticdump it gives an error stating - self signed certificate. 我可以通过http客户端获取弹性搜索查询的json响应,但通过elasticdump尝试给出错误提示-自签名证书。 What is a possible solution for this? 有什么可能的解决方案?

###> elasticdump --input "https://<server_ip>/elasticsearch/_cat/indi
ces?v" --output "c:\edmp.log" --type data
Wed, 24 May 2017 03:38:07 GMT | starting dump
Wed, 24 May 2017 03:38:08 GMT | Error Emitted => self signed certificate
Wed, 24 May 2017 03:38:08 GMT | Total Writes: 0
Wed, 24 May 2017 03:38:08 GMT | dump ended with error (get phase) => Error: self
 signed certificate

And same for queried searches: 对于查询的搜索也是如此:

###> elasticdump  --input "https://<server_ip>/elasticsearch/_search"
 --output "c:\edmp.log" --searchbody {"query": {"filtered":{"filter":{"bool":{"m
ust":[{"range":{"timestamp":{"gte":"now-5m"}}}]}},"query":{"query_string":{"anal
yze_wildcard":true,"query":"filter:value"}}}},"size":"100","sort":[{"timestamp":{
"order":"desc","unmapped_type":"boolean"}}]} --type data
Wed, 24 May 2017 03:31:14 GMT | starting dump
Wed, 24 May 2017 03:31:15 GMT | Error Emitted => self signed certificate
Wed, 24 May 2017 03:31:15 GMT | Total Writes: 0
Wed, 24 May 2017 03:31:15 GMT | dump ended with error (get phase) => Error: self
 signed certificate

EDIT: ignore below, you can try this 编辑:在下面忽略,您可以尝试此

NODE_TLS_REJECT_UNAUTHORIZED=0 elasticdump --input=.....

i think you can fork it and add strictSSL option to false for request . 我认为您可以将其派生并为request添加strictSSL选项为false

More specific, this file https://github.com/taskrabbit/elasticsearch-dump/blob/master/lib/transports/elasticsearch.js 更具体地说,此文件https://github.com/taskrabbit/elasticsearch-dump/blob/master/lib/transports/elasticsearch.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM