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
作者:理想三旬
本人承接各种项目维护和python项目开发, 如果觉得文章写得不错,或者帮助到您了,请点个赞,加个关注哦。运维学习交流群:544692191
本文版权归作者所有,欢迎转载,如果文章有写的不足的地方,或者是写得错误的地方,请你一定要指出,因为这样不光是对我写文章的一种促进,也是一份对后面看此文章的人的责任。谢谢。