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

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

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. :slight_smile:

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

There is a setup guide here:

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? :slight_smile:

Once again, thank you so much.

[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]

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?

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 :sweat_smile:

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."}

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