首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么Elasticsearch-curator `create_index`试运行成功,而实际运行却不成功?

为什么Elasticsearch-curator `create_index`试运行成功,而实际运行却不成功?
EN

Stack Overflow用户
提问于 2021-08-25 18:15:32
回答 1查看 34关注 0票数 0

我正在学习如何使用Elasticsearch,并且遇到了一个问题,我的create_index总是失败。它在预演时看起来工作正常,但在实际运行时失败。我不确定我做错了什么,我查了谷歌,但其他人似乎都没有类似的问题。谢谢你的帮助。

这是我的ACTION.YML:

代码语言:javascript
复制
actions:
  1:
    action: create_index
    description: "create the new index"
    options:
      name: creating_some_metrics.v1
      extra_settings:
        number_of_replicas: 4
        number_of_shards: 4
        refresh_interval: 1s
        mappings:
          parquet-metrics:
            properties:
              lists:
                properties:
                  success_date_history:
                    type: date
                  process_time_history:
                    type: date
                  stat_delta_seconds_history:
                    type: integer
                  options:
                    type: text
              '@timestamp':
                type: date
              id_schema:
                type: integer
              bucket:
                type: keyword
                fields:
                  text:
                    type: text
              error_code:
                type: keyword
              error_reason:
                type: text
                fields:
                  keyword:
                    type: keyword
                    ignore_above: 256
              error_trace:
                type: text
                fields:
                  keyword:
                    type: keyword
                    ignore_above: 256
              success_date:
                type: date
              object_key:
                type: text
                fields:
                  keyword:
                    type: keyword
                    ignore_above: 256
              object_path:
                type: text
                fields:
                  keyword:
                    type: keyword
                    ignore_above: 256
              partition_time:
                type: date
              partition_time_str:
                type: text
              process_time:
                type: date
              stat_delta_seconds:
                type: integer
              stat_file_count:
                type: integer
              stat_row_count:
                type: long
              stat_total_size:
                type: long
              stat_type:
                type: keyword
              status:
                type: keyword
              tag_id:
                type: text
                fields:
                  keyword:
                    type: keyword
                    ignore_above: 256

当我执行curator --config CONFIG.YML --dry-run ACTION.YML时,我得到:

代码语言:javascript
复制
2021-08-25 14:09:06,083 INFO                 curator.cli                    run:225  Action ID: 1, "create_index" completed.
2021-08-25 14:09:06,083 INFO                 curator.cli                    run:226  Job completed.

当我执行curator --config CONFIG.YML ACTION.YML时,我遇到了这个问题:

代码语言:javascript
复制
Failed to complete action: create_index.  <class 'curator.exceptions.FailedExecution'>: Exception encountered.
Exception: TransportError(500, '{"status:":"INTERNAL_SERVER_ERROR","message":"Internal server error"})

我在这里做错了什么?

EN

回答 1

Stack Overflow用户

发布于 2021-08-26 14:36:58

由于Elasticsearch没有索引创建的演练概念,因此不可能使用此特定操作进行真正的演练。在这里,管理员所能做的就是验证YAML格式(而不是API调用本身)以及它是否可以连接到Elasticsearch。这里的--dry-run标志实际上只做了一个no-op操作,所以它不会造成问题。

您从Elasticsearch收到一个500错误,这意味着在Elasticsearch服务器的上游发生了一些事情。您可以通过直接查看Elasticsearch日志和/或设置:

代码语言:javascript
复制
logging:
  loglevel: DEBUG
  blacklist: []

在您的CONFIG.YML文件中。这将显示完整的Elasticsearch服务器响应,这些响应通常非常冗长。

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

https://stackoverflow.com/questions/68927980

复制
相关文章

相似问题

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