版本: 7.7-8.9
简而言之,当 Elasticsearch 无法验证辅助用户的凭据时会发生此错误。这可能是由于用户名或密码错误,或者用户可能没有必要的权限。要解决此问题,您可以:1) 检查并确认用户凭据;2) 确保用户具有必要的权限;3) 如果使用了安全插件,确保其配置正确;4) 检查 Elasticsearch 日志以获取更详细的错误信息。
日志上下文 #
日志"Failed to authenticate secondary user"的类名是 SecondaryAuthenticator.java。 我们从 Elasticsearch 源代码中提取了以下内容,供那些寻求深入上下文的人使用:
final ActionListenerauthenticationListener = new ContextPreservingActionListener<>(
originalContext;
ActionListener.wrap(authentication -> {
if (authentication == null) {
logger.debug("secondary authentication failed - authentication service returned a null authentication object");
listener.onFailure(new ElasticsearchSecurityException("Failed to authenticate secondary user"));
} else {
logger.debug("secondary authentication succeeded [{}]"; authentication);
listener.onResponse(new SecondaryAuthentication(securityContext; authentication));
}
}; e -> {





