我正在学习如何使用Elasticsearch,并且遇到了一个问题,我的create_index总是失败。它在预演时看起来工作正常,但在实际运行时失败。我不确定我做错了什么,我查了谷歌,但其他人似乎都没有类似的问题。谢谢你的帮助。
这是我的ACTION.YML:
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时,我得到:
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时,我遇到了这个问题:
Failed to complete action: create_index. <class 'curator.exceptions.FailedExecution'>: Exception encountered.
Exception: TransportError(500, '{"status:":"INTERNAL_SERVER_ERROR","message":"Internal server error"})我在这里做错了什么?
发布于 2021-08-26 14:36:58
由于Elasticsearch没有索引创建的演练概念,因此不可能使用此特定操作进行真正的演练。在这里,管理员所能做的就是验证YAML格式(而不是API调用本身)以及它是否可以连接到Elasticsearch。这里的--dry-run标志实际上只做了一个no-op操作,所以它不会造成问题。
您从Elasticsearch收到一个500错误,这意味着在Elasticsearch服务器的上游发生了一些事情。您可以通过直接查看Elasticsearch日志和/或设置:
logging:
loglevel: DEBUG
blacklist: []在您的CONFIG.YML文件中。这将显示完整的Elasticsearch服务器响应,这些响应通常非常冗长。
https://stackoverflow.com/questions/68927980
复制相似问题