# After enabling the xpack security, couldn't access into kibana

**URL:** https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [May 18, 2022, 8:50am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036 "2022-05-18T08:50:59Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![fanfan01127](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fanfan01127](https://discuss.elastic.co/u/fanfan01127)
#### Post date: [May 18, 2022, 8:50am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036/1 "2022-05-18T08:50:59Z")

</div>

First of all, I am currently using Elasticsearch 7.17 on Linux Redhat 8.

Since I want to install the elastic agent on my windows client, so I get into Fleet to set it up.  
But there is a message told me that missing security requirements and I put these 2 configurations into my Elasticsearch.yml

```auto
xpack.security.enabled: true
xpack.security.authc.api_key.enabled: true

```

But after I update this and use below command to setup the password, I couldn't access into kibana:5601 anymore and it says "Kibana server is not ready yet" until I comment the xpack security code.

`/usr/share/elasticsearch/bin/elasticsearch-setup-passwords interactive`

May I ask if anyone of you came across similar issue?  
Thank you. 🙂

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [May 19, 2022, 12:14am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036/2 "2022-05-19T00:14:50Z")

</div>

Unfortunately, in 7.16 turning on security requires more than simply enabling those settings.

There is a setup guide here:

- [Configure security for the Elastic Stack | Elasticsearch Guide [7.17] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/configuring-stack-security.html)

---

<div class="post-metadata">

### Author: ![fanfan01127](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fanfan01127](https://discuss.elastic.co/u/fanfan01127)
#### Post date: [May 19, 2022, 10:39am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036/3 "2022-05-19T10:39:56Z")

</div>

Hi @TimV  
I still have no luck after following the guide you've provided on setting up the basic security.  
Not sure if below log could help to find out the problem or actually this wasn't the actual log we're looking for? 🙂

Once again, thank you so much.

```auto
[2022-05-19T08:16:35,843][INFO][o.e.n.Node] [elasticsearch-test-v] version[7.17.3], pid[1391], build[default/rpm/5ad023604c8d7416c9eb6c0eadb62b14e766caff/2022-04-19T08:11:19.070913226Z], OS[Linux/4.18.0-193.80.1.el8_2.x86_64/amd64], JVM[Eclipse Adoptium/OpenJDK 64-Bit Server VM/18/18+36]
[2022-05-19T08:16:35,877][INFO][o.e.n.Node] [elasticsearch-test-v] JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]
[2022-05-19T08:16:35,877][INFO][o.e.n.Node] [elasticsearch-test-v] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -Djava.security.manager=allow, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-12016941505707016183, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms1888m, -Xmx1888m, -XX:MaxDirectMemorySize=989855744, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=rpm, -Des.bundled_jdk=true]
[2022-05-19T08:16:41,199][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [aggs-matrix-stats]
[2022-05-19T08:16:41,200][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [analysis-common]
[2022-05-19T08:16:41,200][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [constant-keyword]
[2022-05-19T08:16:41,200][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [frozen-indices]
[2022-05-19T08:16:41,200][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [ingest-common]
[2022-05-19T08:16:41,200][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [ingest-geoip]
[2022-05-19T08:16:41,200][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [ingest-user-agent]
[2022-05-19T08:16:41,200][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [kibana]
[2022-05-19T08:16:41,201][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [lang-expression]
[2022-05-19T08:16:41,201][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [lang-mustache]
[2022-05-19T08:16:41,201][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [lang-painless]
[2022-05-19T08:16:41,201][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [legacy-geo]
[2022-05-19T08:16:41,201][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [mapper-extras]
[2022-05-19T08:16:41,201][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [mapper-version]
[2022-05-19T08:16:41,201][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [parent-join]
[2022-05-19T08:16:41,202][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [percolator]
[2022-05-19T08:16:41,202][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [rank-eval]
[2022-05-19T08:16:41,202][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [reindex]
[2022-05-19T08:16:41,204][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [repositories-metering-api]
[2022-05-19T08:16:41,204][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [repository-encrypted]
[2022-05-19T08:16:41,204][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [repository-url]
[2022-05-19T08:16:41,205][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [runtime-fields-common]
[2022-05-19T08:16:41,205][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [search-business-rules]
[2022-05-19T08:16:41,205][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [searchable-snapshots]
[2022-05-19T08:16:41,205][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [snapshot-repo-test-kit]
[2022-05-19T08:16:41,205][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [spatial]
[2022-05-19T08:16:41,205][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [systemd]
[2022-05-19T08:16:41,205][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [transform]
[2022-05-19T08:16:41,206][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [transport-netty4]
[2022-05-19T08:16:41,206][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [unsigned-long]
[2022-05-19T08:16:41,206][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [vector-tile]
[2022-05-19T08:16:41,206][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [vectors]
[2022-05-19T08:16:41,206][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [wildcard]
[2022-05-19T08:16:41,206][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [x-pack-aggregate-metric]
[2022-05-19T08:16:41,206][INFO][o.e.p.PluginsService] [elasticsearch-test-v] loaded module [x-pack-analytics]

```

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [May 20, 2022, 4:45am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036/4 "2022-05-20T04:45:47Z")

</div>

There's no error in that log, and it doesn't look like it captures the full startup process.

What's the actual problem you're running into?

---

<div class="post-metadata">

### Author: ![fanfan01127](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fanfan01127](https://discuss.elastic.co/u/fanfan01127)
#### Post date: [May 20, 2022, 10:45am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036/5 "2022-05-20T10:45:44Z")

</div>

Actually I try to setup the fleet elastic agent, but before doing this, I've been told to rectify the missing security requirement as follows.

It's quite panic to setup Elasticsearch as a linux newbie 😅

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e71f5af482ff05fad9b48478dac74cd4248c974e.png)

---

<div class="post-metadata">

### Author: ![fanfan01127](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@fanfan01127](https://discuss.elastic.co/u/fanfan01127)
#### Post date: [May 20, 2022, 10:54am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036/6 "2022-05-20T10:54:12Z")

</div>

Just forgot one more thing.  
After I update those 2 configurations in my Elasticsearch.yml file and restart the Elasticsearch service, it will throw the error as below in the browser. Thank you.

`{"statusCode":503,"error":"Service Unavailable","message":"License is not available."}`

---

<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: [June 17, 2022, 10:55am UTC](https://discuss.elastic.co/t/after-enabling-the-xpack-security-couldnt-access-into-kibana/305036/7 "2022-06-17T10:55:10Z")

</div>

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