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

版本: 6.8-8.9

简要来说,当 Elasticsearch 由于加密设置不正确、加密密钥无效或软件 bug 等问题而无法加密数据时,会出现此错误。要解决此问题,您可以检查并更正加密设置,重新生成或替换无效的加密密钥,或将 Elasticsearch 更新到最新版本以修复任何潜在的软件 bug。此外,请确保运行 Elasticsearch 的用户具有访问加密密钥所需的必要权限。

日志上下文 #

日志 “error encrypting data” 的类名是 CryptoService.java。我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人参考:

byte[] output = new byte[iv.length + encrypted.length];
 System.arraycopy(iv, 0, output, 0, iv.length);
 System.arraycopy(encrypted, 0, output, iv.length, encrypted.length);
 return output;
 } catch (BadPaddingException | IllegalBlockSizeException e) {
 throw new ElasticsearchException("error encrypting data", e);
 }
 }  private byte[] decryptInternal(byte[] bytes, SecretKey key) {