【问题标题】:elasticSearch/npm: Elasticdump returns a "self signed certificate" errorelasticSearch/npm:Elasticdump 返回“自签名证书”错误
【发布时间】:2017-10-24 05:16:01
【问题描述】:

我能够通过 http 客户端获取弹性搜索查询的 json 响应,但在尝试通过 elasticdump 时,它会给出错误说明 - 自签名证书。有什么可能的解决方案?

###> 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

查询搜索也一样:

###> 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

【问题讨论】:

    标签: node.js elasticsearch npm


    【解决方案1】:

    编辑:忽略下面,你可以试试这个

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

    我认为你可以分叉它并将strictSSL 选项添加到falserequest

    更具体地说,这个文件https://github.com/taskrabbit/elasticsearch-dump/blob/master/lib/transports/elasticsearch.js

    【讨论】:

    • 谢谢 - 这给了我更多选择
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-09-29
    • 2020-08-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多