
# Elasticsearch集群某一节点分配不到shard
#### 解决方案
1. 执行如下命令，查看未分配的shard。
   ```
   GET _cluster/allocation/explain?pretty
   ```
   图1查看未分配的shard   
   ![](https://support.huaweicloud.com/trouble-css/figure/zh-cn_image_0000001981501289.png "点击放大") 
2. 在集群列表，选择目标集群，单击操作列的"更多 \> Cerebro"，登录Cerebro。
3. 在Cerebro页面，选择"more \> cluster settings "-，在左上角输入"allocation.enable"，将"none"改为"all"。 ![](https://support.huaweicloud.com/trouble-css/figure/zh-cn_image_0000001981581453.png "点击放大")
   
4. 如果没有Cerebro，也可以执行如下命令处理。
   ```
   curl -X PUT "http://内网ip:9200/_cluster/settings" -H 'Content-Type: application/json' -d'{"persistent":{"cluster.routing.allocation.enable": "all"}}'
   ```
   
 
