elasticsearch 打开和关闭索引接口 返回 process_cluster_event_timeout_exception 503

调用 elasticsearch 打开和关闭索引接口 返回 503

一、操作内容

curl --user 123:456 -s -XPOST http://127.0.0.1:9200/jy-123-server_3_2b9ec95-21020-2021.02.27/_open

二、错误信息

接口返回的错误信息

{"error":{"root_cause":[{"type":"process_cluster_event_timeout_exception","reason":"failed to process cluster event (update-settings) within 30s"}],"type":"process_cluster_event_timeout_exception","reason":"failed to process cluster event (update-settings) within 30s"},"status":503} 

elasticsearch 错误日志

[2021-03-02T16:15:17,382][DEBUG][o.e.a.b.TransportShardBulkAction] [jy-123-server_3_2b9ec95-21020-2021.02.27][0] failed to execute bulk item (index) BulkShardRequest [[jy-gateway-server-inner_1_release1-2021.02.28][0]] containing [index {[jy-123-server_3_2b9ec95-21020-2021.02.27][doc][V1sA8ncBW_IbLluGsND1], source[n/a, actual length: [14.3kb], max length: 2kb]}]
org.elasticsearch.ElasticsearchTimeoutException: Failed to acknowledge mapping update within [30s]

三、问题解决

https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html

默认超时时间是 30s , 我们可以设置我们的集群时间为 5m.

增大超时时间 ?master_timeout=5m

curl --user 123:456 -s -XPOST http://127.0.0.1:9200/jy-123-server_3_2b9ec95-21020-2021.02.27/_open?master_timeout=5m
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章