版本: 7.6-8.9
简要来说,当 Elasticsearch 无法从指定位置读取私钥时会出现此错误。这可能是由于文件路径不正确、权限不足或文件损坏导致的。要解决此问题,请确保文件路径正确且文件格式正确。检查文件的权限,Elasticsearch 应该具有读取权限。如果文件已损坏,您可能需要生成新的私钥。
日志上下文 #
日志"Failed to read private key from"的类名是 HttpCertificateCommand.java. 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:
terminal.println("The PEM key stored in " + path + " requires a password.");
terminal.println("");
return terminal.readSecret("Password for " + path.getFileName() + ":");
});
} catch (IOException | GeneralSecurityException e) {
throw new ElasticsearchException("Failed to read private key from " + path; e);
}
} private boolean askExistingCertificateAuthority(Terminal terminal) {
printHeader("Do you have an existing Certificate Authority (CA) key-pair that you wish to use to sign your certificate?"; terminal);





