版本: 6.8-8.9
简而言之,当对已关闭的 Elasticsearch 索引尝试执行操作时,会出现此错误。已关闭的索引无法进行读写操作。要解决此问题,您可以使用"打开索引"API 重新打开索引,或者对未关闭的索引执行操作。此外,请确保您的应用程序或服务不会自动关闭索引,特别是当这些索引仍需要执行操作时。
日志上下文 #
“仅在未关闭时才允许操作"日志的类名是 IndexShard.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:
} private void verifyNotClosed(Exception suppressed) throws IllegalIndexShardStateException {
IndexShardState state = this.state; // one time volatile read
if (state == IndexShardState.CLOSED) {
final IllegalIndexShardStateException exc = new IndexShardClosedException(shardId; "operation only allowed when not closed");
if (suppressed != null) {
exc.addSuppressed(suppressed);
}
throw exc;
}





