aws-es-kibana:发送到客户端后无法设置标头

时间:2021-04-15 23:36:53

标签: elasticsearch curl kibana aws-elasticsearch

几天来一直在使用 aws-es-kibana,现在试图通过命令行发送 CURL 命令。这是我的步骤:

  1. 使用 aws-es-kibana -b 127.0.0.1 <ES_ENDPOINT> 连接到代理。代理启动正常。
  2. 创建一个包含查询对象的 JSON 文件:

yolo.json

{
  "query": {
    "bool": {
      "should": [
        {
          "term": {
            "member.id_number": 1
          }
        },
        {
          "term": {
            "member.id_number": 2
          }
        },
        {
          "term": {
            "member.id_number": 3
          }
        }
      ]
    }
  }
}
  1. 在单独的终端窗口中,我运行 curl -XGET http://127.0.0.1:9200/<CLUSTER_NAME>/_msearch -H 'Content-Type: application/json' -d @yolo.json

运行此命令后,在我运行第 3 步的终端中,出现以下错误:

curl: (52) Empty reply from server

在我运行第 1 步的终端中,出现以下错误:

_http_outgoing.js:518
    throw new ERR_HTTP_HEADERS_SENT('set');
    ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

如果我只在查询中请求一个 member.id_number,则查询似乎没有问题。有谁知道为什么这个查询会导致代理崩溃?我希望 kibana-to-es 库能够很好地处理包含一系列请求的请求。

0 个答案:

没有答案
相关问题