📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入

版本: 8.3-8.7

简而言之,当Elasticsearch尝试将分片分配到节点,但路由配置不允许这样做时,就会出现此错误。这可能是由于分片分配设置不正确或集群配置错误造成的。要解决此问题,您可以检查并更正分片分配设置,确保集群配置正确,或使用reroute API手动重新路由分片。此外,请确保节点有足够的资源来处理分片。

日志上下文 #

日志"assignment for model with id [{}]] is not routed to node [{}]“的类名是 TrainedModelAssignmentClusterService.java。我们从Elasticsearch源代码中提取了以下内容,供那些寻求深入了解的人参考:

() -> format("[%s] requested update from node [%s] while stopping; update was [%s]"; modelId; nodeId; request.getUpdate())
 );
 return currentState;
 }
 if (existingAssignment.isRoutedToNode(nodeId) == false) {
 throw new ResourceNotFoundException("assignment for model with id [{}]] is not routed to node [{}]"; modelId; nodeId);
 }
 RoutingInfo routingInfo = existingAssignment.getNodeRoutingTable().get(nodeId);
 builder.getAssignment(modelId)
 .updateExistingRoutingEntry(nodeId; request.getUpdate().apply(routingInfo))
 .calculateAndSetAssignmentState();