版本: 6.8-8.9
简要来说,当 Elasticsearch 由于 Java 安装中的密码术扩展(JCE)策略文件不正确或缺失而无法创建密码器时,会发生此错误。要解决此问题,您可以下载并安装适合您的 Java 版本的无限制强度 JCE 策略文件,或者将 Elasticsearch 配置为使用不需要无限制强度策略的不同密码器。此外,请确保您的 Java 环境设置正确,并且 Elasticsearch 有权访问 JCE 策略文件。
日志上下文 #
日志 “error creating cipher” 的类名是 CryptoService.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些需要深入了解上下文的人参考:
try {
Cipher cipher = Cipher.getInstance(encryptionAlgorithm);
cipher.init(mode, key, new IvParameterSpec(initializationVector));
return cipher;
} catch (Exception e) {
throw new ElasticsearchException("error creating cipher", e);
}
} private static SecretKey encryptionKey(SecretKey systemKey, int keyLength, String algorithm) throws NoSuchAlgorithmException {
byte[] bytes = systemKey.getEncoded();





