Unable to write Kibana UUID file when using keystore #76829
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Build Packaging
Team:Operations
Team label for Operations Team
Kibana version: master
Elasticsearch version: master
Server OS version: CentOS 7
Browser version: N/A
Browser OS version: N/A
Original install method (e.g. download page, yum, from source, etc.): default dist rpms
Describe the bug: This could potentially be a couple of different issues.
--allow-root
flag to create the keystore as the root user./etc/kibana/
with the same ownership as the other files there;/usr/share/kibana/data/
but I think the permissions only allow kibana user to read, not write that dir;
"Error: Unable to write Kibana UUID file, please check the uuid.server configuration value in kibana.yml and ensure Kibana has sufficient permissions to read / write to this file. Error was: EACCES
chmod 777 /usr/share/kibana/data/
) does allow kibana to start successfully.uuid
file, and aoptimize
directory created in it.So the simple bug is that the data dir is created with only owner:rw and group:r. The owner is root and group is kibana. And so the kibana user that the kibana service runs as can't write to the uuid file to that dir.
But what confuses me, is that when I don't create the keystore, no data directory is ever created.
And I only find an optimize directory at
/usr/share/kibana/src/optimize
.And I don't find a uuid file anywhere. I think there must be a uuid file somewhere because /api/status shows
And restarting the server still shows the same uuid. So it must be persisted somewhere, but I haven't found it.
Steps to reproduce: (do all these as root user on CentOS 7)
yum install -y kibana-8.0.0-SNAPSHOT-x86_64.rpm
sg kibana -c '/usr/share/kibana/bin/kibana-keystore --allow-root create'
sg kibana -c 'echo somepassword | /usr/share/kibana/bin/kibana-keystore --allow-root add --stdin elasticsearch.password'
(I'm thinking you really don't even need this step because creating the keystore creates the data dir)service kibana start
journalctl -u kibana
to see the failure messageExpected behavior: the
data
dir should get created at some point with the permissions needed to allow theuuid
file to be written there (if that's the right place for it)and the
uuid
should always be in the same place regardless of whether you use a keystore file or notScreenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Any additional context: I'm not having this same problem on 7.x branch but I haven't dug into the details of the data dir creation or ownership or permissions.
/cc @jportner
The text was updated successfully, but these errors were encountered: