Hello, after upgrading to elastic 6.4 I am getting the following INFO and ERROR messages when elasticsearch starts.
[2018-10-17T14:51:08,064][INFO ][o.e.x.s.a.AuthenticationService] [_qmypXi] Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]
[2018-10-17T14:51:08,326][ERROR][o.e.x.s.a.e.ReservedRealm] [_qmypXi] failed to retrieve password hash for reserved user [elastic]
It looks like elasticsearch can't access the.security index. What is your cluster status ?
Are there any limes immediately after this one ? There should be a cause for this error close to this.
This is strange as it indicates that your kibana reserved user can authenticate correctly with Elasticsearch - which would not be the case if .security index was unavailable.
Can you share some additional information about your setup ?Do you have any other authentication realms are configured ? Are there other errors in the log or indications that something is wrong when you access via Kibana ?
[2018-10-17T16:09:51,207][ERROR][o.e.x.s.a.e.ReservedRealm] [_qmypXi] failed to retrieve password hash for reserved user [elastic]
org.elasticsearch.action.NoShardAvailableActionException: No shard available for [get [.security][doc][reserved-user-elastic]: routing [null]]
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.perform(TransportSingleShardAction.java:207) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction$AsyncSingleAction.start(TransportSingleShardAction.java:186) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction.doExecute(TransportSingleShardAction.java:95) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.action.support.single.shard.TransportSingleShardAction.doExecute(TransportSingleShardAction.java:59) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.action.support.TransportAction.doExecute(TransportAction.java:143) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:167) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$apply$0(SecurityActionFilter.java:90) ~[?:?]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$authorizeRequest$4(SecurityActionFilter.java:179) ~[?:?]
at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.maybeRun(AuthorizationUtils.java:173) ~[?:?]
at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.setRunAsRoles(AuthorizationUtils.java:167) ~[?:?]
at org.elasticsearch.xpack.security.authz.AuthorizationUtils$AsyncAuthorizer.authorize(AuthorizationUtils.java:155) ~[?:?]
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.authorizeRequest(SecurityActionFilter.java:181) ~[?:?]
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$applyInternal$3(SecurityActionFilter.java:159) ~[?:?]
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:60) ~[elasticsearch-6.4.2.jar:6.4.2]
at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$authenticateAsync$2(AuthenticationService.java:172) ~[?:?]
at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lambda$lookForExistingAuthentication$4(AuthenticationService.java:205) ~[?:?]
at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.lookForExistingAuthentication(AuthenticationService.java:216) ~[?:?]
at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.authenticateAsync(AuthenticationService.java:170) ~[?:?]
at org.elasticsearch.xpack.security.authc.AuthenticationService$Authenticator.access$000(AuthenticationService.java:131) ~[?:?]
at org.elasticsearch.xpack.security.authc.AuthenticationService.authenticate(AuthenticationService.java:101) ~[?:?]
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.applyInternal(SecurityActionFilter.java:158) ~[?:?]
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$apply$2(SecurityActionFilter.java:104) ~[?:?]
[..]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
[2018-10-17T16:09:51,240][INFO ][o.e.x.s.a.AuthenticationService] [_qmypXi] Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]
[2018-10-17T16:09:51,252][INFO ][o.e.g.GatewayService ] [_qmypXi] recovered [119] indices into cluster_state
[2018-10-17T16:09:51,242][ERROR][o.e.x.s.a.e.ReservedRealm] [_qmypXi] failed to retrieve password hash for reserved user [elastic]
Yes, an ldap one (along with the native)
When accessing it using elastic account (via Kibana) or an ldap account, the log in process works fine.
Is it possible that we get the error because .security index was re-created (but the elastic/kibana users have the same password/roles)?
This is what troubles me. It seems you can authenticate as user elastic but then you get
[2018-10-17T14:51:08,326][ERROR][o.e.x.s.a.e.ReservedRealm] [_qmypXi] failed to retrieve password hash for reserved user [elastic]
and I cannot figure out how both of these can be true. Could it be that you have users with a uid that matches one of the reserved users ( i.e. elastic or kibana ) in your ldap ? Is your ldap realm first or second in order ?
Yes (if I remember correctly..., I deleted accidentally all indices, including .security and then searched online how can I restore x-pack accounts, I recreated them with the same passwords )
LDAP is second with order : 2, No kibana or elastic users exist in our LDAP, moreover the issue was there even when only native realm was present.
Another (maybe related) finding I have is the error shown bellow
Reading through your previous message, @Albert_Zaharovits spotted that It looks like something attempts to authenticate as elastic 12 ms before .security index is recovered
Do you have anything else connecting to Elasticsearch as elastic user?
Do you get these [2018-10-17T16:09:51,240][INFO ][o.e.x.s.a.AuthenticationService] [_qmypXi] Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic] errors only on startup ?
we have a few beats directly connecting to elasticsearch (temporary using the elastic account...).
Most probably these are the suspects causing the ERROR message!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.