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

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

jq1223

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值