版本: 7.6-8.9
简而言之,当 Elasticsearch 无法从指定路径读取 SSL/TLS 证书时,会出现此错误。这可能是由于文件路径不正确、权限不足或证书文件损坏导致的。要解决此问题,您可以验证文件路径并确保其正确。检查证书文件的权限,确保 Elasticsearch 拥有必要的访问权限。如果文件已损坏,您可能需要生成新证书。此外,确保证书采用 Elasticsearch 可以读取的格式,通常是 PEM 格式。
日志上下文 #
日志"Failed to read certificates from"的类名是 HttpCertificateCommand.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入背景的人参考:
default:
terminal.errorPrintln("Read [" + certificates.length + "] certificates from " + path + " but expected 1");
throw new UserException(ExitCodes.DATA_ERROR, path + ": Multiple certificates found");
}
} catch (CertificateException | IOException e) {
throw new ElasticsearchException("Failed to read certificates from " + path, e);
}
} private PrivateKey readPrivateKey(Path path, Terminal terminal) {
try {





