es两年没重启,重启了一次,报了unassigned错误
找了网上各种解决办法,下面是可行的
1、GET _nodes/process?pretty/
2、分配unassigned的shards
http://192.168.xx.xx:9200/_cluster/reroute/
{
"commands": [
{
"allocate": {
"index": "需分配的index",
"shard": 需分配的shard,
"node": "上图里重要的nodeid",
"allow_primary": "true"
}
}
]
}
3、最后一一分配成功,shard由黄变紫变绿