Kibana getting Error: Unauthorized

I'm on Kibana v6.3.2 and ElasticSearch v6.3.2. I'm getting this error on kibana consooooooooooooool

Given below is a snippet of the logs:
ops [09:38:54.820] memory: 115.2MB uptime: 0:13:24 load: [0.00 0.00 0.00] delay: 8.308
log [09:38:54.832] [debug][kibana-monitoring][monitoring-ui] Received Kibana Ops event data
log [09:38:56.227] [debug][plugin] Checking Elasticsearch version
error [09:38:56.999] [debug][auth][security][session] Error: Unauthorized
at validate (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi-auth-cookie\lib\index.js:145:49)
at Object.authenticate (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi-auth-cookie\lib\index.js:210:13)
at module.exports.internals.Auth.internals.Auth.test (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\auth.js:96:22)
at Object.test (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\plugin.js:65:64)
at resolve (C:/Program Files/Elastic/kibana/6.3.2/node_modules/x-pack/plugins/security/server/lib/authentication/session.js:56:25)
at new Promise ()
at Session.get (C:/Program Files/Elastic/kibana/6.3.2/node_modules/x-pack/plugins/security/server/lib/authentication/session.js:55:12)
at Authenticator.authenticate (C:/Program Files/Elastic/kibana/6.3.2/node_modules/x-pack/plugins/security/server/lib/authentication/authenticator.js:137:49)
at Object.server.expose.request [as authenticate] (C:/Program Files/Elastic/kibana/6.3.2/node_modules/x-pack/plugins/security/server/lib/authentication/authenticator.js:277:60)
at Object.authenticate (C:/Program Files/Elastic/kibana/6.3.2/node_modules/x-pack/plugins/security/server/lib/auth_redirect.js:30:60)
at request._protect.run (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\auth.js:324:34)
at module.exports.internals.Protect.internals.Protect.run (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\protect.js:64:5)
at internals.Authenticator.execute (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\auth.js:320:30)
at internals.Authenticator.authenticate (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\auth.js:306:21)
at module.exports.internals.Auth.internals.Auth._authenticate (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\auth.js:214:19)
at internals.Auth.authenticate (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\auth.js:202:17)
at each (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\request.js:384:16)
at iterate (C:\Program Files\Elastic\kibana\6.3.2\node_modules\items\lib\index.js:36:13)
at done (C:\Program Files\Elastic\kibana\6.3.2\node_modules\items\lib\index.js:28:25)
at Hoek.once (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hapi\lib\protect.js:52:16)
at wrapped (C:\Program Files\Elastic\kibana\6.3.2\node_modules\hoek\lib\index.js:879:20)
at done (C:\Program Files\Elastic\kibana\6.3.2\node_modules\items\lib\index.js:31:25)
log [09:38:57.016] [debug][basic][security] Trying to authenticate user request to /api/console/proxy?path=_mapping&method=GET.
log [09:38:57.017] [debug][basic][security] Trying to authenticate via header.
log [09:38:57.018] [debug][basic][security] Authorization header is not presented.
log [09:38:57.020] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
respons [09:38:56.998] POST /api/console/proxy?path=_mapping&method=GET 401 28ms - 9.0B

I also found the following error messages often:

log [09:54:11.066] [debug][basic][security] Trying to authenticate user request to /api/console/proxy?path=_mapping&method=GET.
log [09:54:11.072] [debug][basic][security] Trying to authenticate via header.
log [09:54:11.076] [debug][basic][security] Authorization header is not presented.
log [09:54:11.084] [debug][license][xpack] Calling [data] Elasticsearch _xpack API. Polling frequency: 30001
error [09:54:11.102] [error][client][connection] Error: socket hang up
at TLSSocket. (_tls_wrap.js:876:25)
at emitOne (events.js:121:20)
at TLSSocket.emit (events.js:211:7)
at _handle.close (net.js:557:12)
at Socket.done (_tls_wrap.js:356:7)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:121:20)
at Socket.emit (events.js:211:7)
at TCP._handle.close [as _onclose] (net.js:557:12)
respons [09:54:11.003] POST /api/console/proxy?path=_mapping&method=GET 401 132ms - 9.0B

Probably need more details about what you are trying to do to give you a proper answer. However, as a guess, I would say maybe you have enabled security in Elasticsearch and not provided Kibana with the credentials to connect? Or, maybe you are logging into Kibana as a user with limited permissions and then trying an operation against an index you don't have rights to?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.