# FATAL Error: \[config validation of \[elasticsearch\].username\]

**URL:** https://discuss.elastic.co/t/fatal-error-config-validation-of-elasticsearch-username/324714
**Category:** Kibana
**Tags:** docker
**Created:** [February 4, 2023, 3:06pm UTC](https://discuss.elastic.co/t/fatal-error-config-validation-of-elasticsearch-username/324714 "2023-02-04T15:06:44Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![mohanss08](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohanss08/32/82297_2.png) [@mohanss08](https://discuss.elastic.co/u/mohanss08)
#### Post date: [February 4, 2023, 3:06pm UTC](https://discuss.elastic.co/t/fatal-error-config-validation-of-elasticsearch-username/324714/1 "2023-02-04T15:06:44Z")

</div>

Hello Team,

I had `Elasticsearch, Logstash and Kibana v7.16.2` with `xpack security based login enabled`, So today i had upgraded my ELK versions to `8.6.1` using my docker-compose file, but when i start the kibana container it always fails with below errors.

```auto
kibana | FATAL Error: [config validation of [elasticsearch].username]: value of "elastic" is forbidden. This is a superuser account that cannot write to system indices that Kibana needs to function. Use a service account token instead. Learn more: https://www.elastic.co/guide/en/elasticsearch/reference/8.0/service-accounts.html

```

My docker-compose file's Kibana section as follows.

```auto
  kibana:
    image: docker.elastic.co/kibana/kibana:8.6.1
    container_name: kibana
    environment:
      ELASTICSEARCH_URL: "http://elasticsearch:9200"
      ELASTICSEARCH_USERNAME: "elastic"
      ELASTICSEARCH_PASSWORD: "password1234"
    ports:
      - 5601:5601
    depends_on:
      - elasticsearch

```

Through online sources i had created service token by connecting my elasticsearch container. using cli

```auto
$ elasticsearch-service-tokens create elastic/kibana kibana_token
SERVICE_TOKEN elastic/kibana/kibana_token = AAEAAWVsYXNwedvZmxlZXQtc2VydmVyL3Rva2VuMTo3TFdaQED

```

In my compose file have replaced the password with token and tried. But it fails with same error.

Please guide me to solve this issue. Thanks.

---

<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: [March 4, 2023, 3:07pm UTC](https://discuss.elastic.co/t/fatal-error-config-validation-of-elasticsearch-username/324714/2 "2023-03-04T15:07:09Z")

</div>

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