其他分享
首页 > 其他分享> > 503 retrying failed action with response code: 503 ({“type“=>“unavailable_shards_exception“

503 retrying failed action with response code: 503 ({“type“=>“unavailable_shards_exception“

作者:互联网

ES报错 :原因最近ES里面有个索引一直保存,错误信息如下:

[021-0-03T09:54:15,328][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 503 ({"type"=>"unavailable_shards_exception", "reason"=>"[gps_lte-mode-2021-.04.03][1] primary shard is not active Timeout: [1m], request: [BulkShardRequest [[gps_lte-mode-2021-.04.03][1]] containing [8] requests]"})
[2021--04-03T09:54:15,328][INFO ][logstash.outputs.elasticsearch] Retrying individual bulk actions that failed or were rejected by the previous bulk request. {:count=>25}

报错位置:在sync_tanle.cfg配置文件中 index索引一直保存没有去掉
在这里插入图片描述
解决方案一:修改index索引名称 例:j_product改为j_product1,然后杀死进程,重新同步

解决方案二、查看异常的index 命令:curl http://‘10.7.1.8:9200/_cat/indices’ | grep red

现有个索引异常了,直接进行删除即可。


[root@netmgmt-prod-elk-03 ~] curl http://'10.7.1.8:9200/_cat/indices' | grep red
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  1  144k    1  2704    0     0    907      0  0:02:43  0:00:02  0:02:41   907
red    open gps_lte-mode-2021.04.03 _N2IkwVeSxiP4s1gMyFQgw 5 1  

删除命名:

 curl -XDELETE 'http://10.7.1.8:9200/gps_lte-mode-2021.04.03'

原文:https://blog.csdn.net/stefan1240/article/details/88988587

相关es查看和删除索引
查看索引

curl localhost:9200/_cat/indices?v

删除索引,通配符形式

curl -XDELETE localhost:9200/索引*

索引起别名

curl -XPUT localhost:9200/索引/_alias/别名

查看别名

curl -XPUT localhost:9200/_cat/aliases?v

原文:https://blog.csdn.net/stefan1240/article/details/8898858

标签:exception,code,9200,索引,mode,lte,curl,503,localhost
来源: https://blog.csdn.net/jq1223/article/details/115592761