# Авторизация Kibana - failed to authenticate user \[kibana\]

**URL:** <https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867>\
**Category:** Вопросы на русском языке\
**Created:** [April 14, 2020, 7:51am UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867 "2020-04-14T07:51:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nurlan199206](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nurlan199206/32/66254_2.png) [@Nurlan199206](https://discuss.elastic.co/u/Nurlan199206)\
**Post date:** [April 14, 2020, 7:51am UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/1 "2020-04-14T07:51:22Z")

</div>

Всем привет.

Не получается настроить авторизацию в Kibana для Elasticsearch кластера состоящих из 3 мастер нод. Пароли заводил с помощью утилиты `elasticsearch-setup-passwords auto`

Хотя у меня получалось настраивать страницу авторизации для elasticsearch состоящей из одной ноды. Что я делаю не так?

конфиг `elasticsearch.yml`

```
    cluster.name: elastic-cluster
node.name: Node-1
node.data: true
node.attr.rack: r1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: server1
http.port: 9200
discovery.seed_hosts: ["server1", "server2", "server3"]
cluster.initial_master_nodes: ["server1", "server2", "server3"]

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12

```

`kibana.yml`

```
server.port: 5601
server.host: "kibana"
#server.maxPayloadBytes: 3048576
xpack.reporting.csv.maxSizeBytes: 2048576000
xpack.reporting.queue.timeout: 2920000
xpack.reporting.kibanaServer.protocol: http
xpack.reporting.kibanaServer.hostname: kibana1
xpack.security.enabled: true
#xpack.security.encryptionKey: tTsjKOS96toodtATD0Dp7XOmjAqtcCXT

server.name: "elastic-cluster"

elasticsearch.hosts: ["http://server1:9200", "http://server2:9200", "http://server3:9200"]

logging.verbose: true

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
#ops.interval: 5000

# Specifies locale to be used for all localizable strings, dates and number formats.
# Supported languages are the following: English - en , by default , Chinese - zh-CN .
#i18n.locale: "en"

#elasticsearch.username: "kibana"
elasticsearch.password: "password"

```

 ![кибана](https://us1.discourse-cdn.com/elastic/original/3X/4/e/4e5907d8739c37f181f4cb80b76d7f87322950e5.png)

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [April 14, 2020, 11:15am UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/2 "2020-04-14T11:15:33Z")

</div>

А если запуситить

```auto
curl -u kibana:password http://server1:9200/
curl -u kibana:password http://server2:9200/
curl -u kibana:password http://server3:9200/

```

с сервера, на котором kibana находиться, то что эти команды выдают?

---

<div class="post-metadata">

**Author:** ![Nurlan199206](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nurlan199206/32/66254_2.png) [@Nurlan199206](https://discuss.elastic.co/u/Nurlan199206)\
**Post date:** [April 14, 2020, 12:10pm UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/3 "2020-04-14T12:10:05Z")

</div>

> [@Igor\_Motov](#):
>
> curl -u kibana:password [http://server1:9200/](http://server1:9200/)

```
   {
  "name" : "Node-1",
  "cluster_name" : "elastic-cluster",
  "cluster_uuid" : "j_WFW2FESYG0GSPqaF3Fzw",
  "version" : {
    "number" : "7.6.1",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "aa751e09be0a5072e8570670309b1f12348f023b",
    "build_date" : "2020-02-29T00:15:25.529771Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

curl -u kibana:password http://server2:9200/

{
  "name" : "Node-2",
  "cluster_name" : "elastic-cluster",
  "cluster_uuid" : "j_WFW2FESYG0GSPqaF3Fzw",
  "version" : {
    "number" : "7.6.1",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "aa751e09be0a5072e8570670309b1f12348f023b",
    "build_date" : "2020-02-29T00:15:25.529771Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

curl -u kibana:password http://server3:9200/

{
  "name" : "Node-3",
  "cluster_name" : "elastic-cluster",
  "cluster_uuid" : "j_WFW2FESYG0GSPqaF3Fzw",
  "version" : {
    "number" : "7.6.1",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "aa751e09be0a5072e8570670309b1f12348f023b",
    "build_date" : "2020-02-29T00:15:25.529771Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

curl -u kibana:password -X GET "server1:9200/_cluster/health?pretty"
{
  "cluster_name" : "elastic-cluster",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 3,
  "number_of_data_nodes" : 3,
  "active_primary_shards" : 12,
  "active_shards" : 24,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "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" : 100.0
}

```

---

<div class="post-metadata">

**Author:** ![Nurlan199206](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nurlan199206/32/66254_2.png) [@Nurlan199206](https://discuss.elastic.co/u/Nurlan199206)\
**Post date:** [April 14, 2020, 5:00pm UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/4 "2020-04-14T17:00:48Z")

</div>

еще есть идеи? может в индексах что-нибудь неправильно записалось?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [April 14, 2020, 5:31pm UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/5 "2020-04-14T17:31:26Z")

</div>

А что в логах кибаны после перезагрузки?

---

<div class="post-metadata">

**Author:** ![Nurlan199206](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nurlan199206/32/66254_2.png) [@Nurlan199206](https://discuss.elastic.co/u/Nurlan199206)\
**Post date:** [April 15, 2020, 5:02am UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/6 "2020-04-15T05:02:10Z")

</div>

```
{"type":"log","@timestamp":"2020-04-15T04:59:16Z","tags":["debug","legacy-plugins"],"pid":8835,"path":"/usr/share/kibana/src/legacy/core_plugins/vis_type_vega","message":"Found plugin at /usr/share/kibana/src/legacy/core_plugins/vis_type_vega"}
    {"type":"log","@timestamp":"2020-04-15T04:59:16Z","tags":["debug","legacy-plugins"],"pid":8835,"path":"/usr/share/kibana/src/legacy/core_plugins/visualizations","message":"Found plugin at /usr/share/kibana/src/legacy/core_plugins/visualizations"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: logging"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: logging"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: logging"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: logging"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: logging"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: path"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: csp"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: elasticsearch"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: logging"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: server"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: plugins"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: dev"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: kibana"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: migrations"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: uiSettings"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: apm_oss"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: timelion"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: usageCollection"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: metrics"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.apm"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.case"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.cloud"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.code"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.encryptedSavedObjects"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.infra"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.licensing"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.security"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.siem"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.spaces"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: xpack.task_manager"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: path"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","config"],"pid":8835,"message":"Marking config path as handled: server"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","uuid"],"pid":8835,"message":"Resuming persistent Kibana instance UUID: 268fdf4a-cdbc-46b0-900a-f324f43aa34e"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","http"],"pid":8835,"message":"starting NotReady server"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","root"],"pid":8835,"message":"shutting root down"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["fatal","root"],"pid":8835,"message":"Error: Port 5601 is already in use. Another instance of Kibana may be running!\n at Root.shutdown (/usr/share/kibana/src/core/server/root/index.js:67:18)\n at Root.setup (/usr/share/kibana/src/core/server/root/index.js:46:18)\n at process._tickCallback (internal/process/next_tick.js:68:7)"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","server"],"pid":8835,"message":"stopping server"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","legacy-service"],"pid":8835,"message":"stopping legacy service"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","plugins-service"],"pid":8835,"message":"Stopping plugins service"}
    {"type":"log","@timestamp":"2020-04-15T04:59:17Z","tags":["debug","elasticsearch-service"],"pid":8835,"message":"Stopping elasticsearch service"}

```

логи из `elasticsearch`.

```
[2020-04-15T11:20:19,430][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:19,430][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:22,146][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:23,416][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:26,149][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:31,152][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:34,153][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:38,657][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:41,156][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
[2020-04-15T11:20:46,166][INFO][o.e.x.s.a.AuthenticationService] [Node-1] Authentication of [kibana] was terminated by realm [reserved] - failed to authenticate user [kibana]
```

---

<div class="post-metadata">

**Author:** ![Nurlan199206](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nurlan199206/32/66254_2.png) [@Nurlan199206](https://discuss.elastic.co/u/Nurlan199206)\
**Post date:** [April 15, 2020, 9:40am UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/7 "2020-04-15T09:40:12Z")

</div>

Переустановил Kibana, ElasticSearch до версии 7.6.2 и все работает!!!

Видимо какой-то был баг в 7.6.1

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 13, 2020, 9:44am UTC](https://discuss.elastic.co/t/kibana-failed-to-authenticate-user-kibana/227867/8 "2020-05-13T09:44:45Z")

</div>

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