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

版本: 6.8-7.15

简而言之,当 Elasticsearch 无法读取特定 realm 的角色映射文件时会出现此错误。这可能是由于文件权限不正确、文件丢失或文件损坏导致的。要解决此问题,您可以检查文件是否存在并位于正确的位置,确保 Elasticsearch 进程具有读取文件所需的权限,并验证文件的完整性。如果文件已损坏,您可能需要从备份中恢复它。

日志上下文 #


日志 “could not read realm [” + realmType + “/” + realmName + “] role mappings file [” 类名是 DnRoleMapper.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入了解上下文的人参考:

Map> normalizedMap = dnToRoles.entrySet().stream().collect(Collectors.toMap(
 entry -> entry.getKey().toNormalizedString();
 entry -> Collections.unmodifiableList(new ArrayList<>(entry.getValue()))));
 return unmodifiableMap(normalizedMap);
 } catch (IOException | SettingsException e) {
 throw new ElasticsearchException("could not read realm [" + realmType + "/" + realmName + "] role mappings file [" +
 path.toAbsolutePath() + "]"; e);
 }
 }  int mappingsCount() {