Hello,
I was using elasticsearch and kibana without problem, but I need to enable some features related with users (to create some accounts and give some permissions to some users), so I need to enable x-pack option to do that.
Unfortunatly when I enabled x-pack I lost access to kibana. I logged in but I lose the access and the follow message appears in the browser:
{"statusCode":401,
"error":"Unauthorized",
"message":"security_exception"}
To enable the x-pack I had to:
in /etc/elasticsearch/elasticsearch.yml
add:
xpack.security.enabled: true
in /etc/kibana/kibana.yml
add:
elasticsearch.username: "kibana"
elasticsearch.password: "***"
I introduced some passwords using:
/usr/share/elasticsearch/bin/./elasticsearch-setup-passwords interactive
(the password I create here for kibana is the same I wrote in the file kibana.yml)
I restart the services:
systemctl restart kibana
systemctl restart elasticsearch
I verify with:
curl -XGET -u elastic:*** http://localhost:9200/_cluster/health?pretty
I get:
{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 23,
"active_shards" : 23,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 11,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 67.64705882352942
}
I send logs in the end (kibana/kibana.log and elasticsearch/elasticsearch.log)
Elastic and kibana version: 7.12.1
Thank you for your help.
Best regards,
Fabio
Kibana.log
{"type":"log","@timestamp":"2021-06-14T14:07:23+00:00","tags":["debug","metrics","ops"],"pid":57954,"ecs":{"version":"1.7.0"},"event":{"kind":"metric","category":["process>{"type":"log","@timestamp":"2021-06-14T14:07:23+00:00","tags":["debug","plugins","taskManager"],"pid":57954,"message":"Latest Monitored Stats: {\"id\":\"7ac66161-4c87-4091>
{"type":"log","@timestamp":"2021-06-14T14:07:23+00:00","tags":["debug","elasticsearch","query","taskManager"],"pid":57954,"message":"200\nPOST /.kibana_task_manager/_updat>
{"type":"log","@timestamp":"2021-06-14T14:07:24+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nPOST /.reporting-*/_search\n{\"seq_no_pr>
{"type":"log","@timestamp":"2021-06-14T14:07:24+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nGET /_nodes?filter_path=nodes.*.version%>
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","http","server","Kibana","cookie-session-storage"],"pid":57954,"message":"Error: Unauthorized"}
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","plugins","security","basic","basic"],"pid":57954,"message":"Trying to authenticate user request to >
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","plugins","security","basic","basic"],"pid":57954,"message":"Cannot authenticate requests with `Auth>
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","plugins","security","http"],"pid":57954,"message":"Trying to authenticate user request to /."}
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"401\nGET /_security/_authenticate [security_e>
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","plugins","security","http"],"pid":57954,"message":"Failed to authenticate request to / via authoriz>
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["info","plugins","security","authentication"],"pid":57954,"message":"Authentication attempt failed: security>
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","plugins","licensing"],"pid":57954,"message":"Requesting Elasticsearch licensing API"}
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nGET /_xpack?accept_enterprise=true\n"}
{"type":"log","@timestamp":"2021-06-14T14:07:25+00:00","tags":["debug","http","server","response"],"pid":57954,"ecs":{"version":"1.7.0"},"client":{"ip":"127.0.0.1"},"http">{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nGET /_xpack?accept_enterprise=true\n"}
{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","elasticsearch","query","monitoring"],"pid":57954,"message":"200\nGET /_xpack?accept_enterprise=true>
{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","elasticsearch","query","taskManager"],"pid":57954,"message":"200\nPOST /.kibana_task_manager/_updat>
{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nGET /.kibana_7.12.1/_doc/config%3A7.12.1>
{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","plugins","monitoring","monitoring","kibana-monitoring"],"pid":57954,"message":"not sending [kibana_>
{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","plugins","monitoring","monitoring","kibana-monitoring"],"pid":57954,"message":"Uploading bulk stats>
{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nPOST /_monitoring/bulk?system_id=kibana&>
{"type":"log","@timestamp":"2021-06-14T14:07:26+00:00","tags":["debug","plugins","monitoring","monitoring","kibana-monitoring"],"pid":57954,"message":"Uploaded bulk stats >
{"type":"log","@timestamp":"2021-06-14T14:07:27+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nGET /_nodes?filter_path=nodes.*.version%>
{"type":"log","@timestamp":"2021-06-14T14:07:27+00:00","tags":["debug","elasticsearch","query","data"],"pid":57954,"message":"200\nPOST /.reporting-*/_search\n{\"seq_no_pr>
{"type":"log","@timestamp":"2021-06-14T14:07:28+00:00","tags":["debug","metrics","ops"],"pid":57954,"ecs":{"version":"1.7.0"},"event":{"kind":"metric","category":["process>
Elasticsearch.log
[2021-06-14T14:16:20,984][ERROR][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.06.14] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step
[2021-06-14T14:26:20,904][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.09] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [182]
[2021-06-14T14:26:20,906][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.11] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [38]
[2021-06-14T14:26:20,908][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.07] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [326]
[2021-06-14T14:26:20,912][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.08] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [254]
[2021-06-14T14:26:20,913][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.05] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [470]
[2021-06-14T14:26:20,917][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.10] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [110]
[2021-06-14T14:26:20,921][ERROR][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.04] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step
[2021-06-14T14:26:20,924][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.05.06] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [398]
[2021-06-14T14:26:20,926][INFO ][o.e.x.i.IndexLifecycleRunner] [elk] policy [filebeat] for index [filebeat-7.12.1-2021.06.14] on an error step due to a transient error, moving back to the failed step [check-rollover-ready] for execution. retry attempt [6]
"elasticsearchLog.log" 31L, 7641C