Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create keystore #77392

Closed
Diazole opened this issue Sep 14, 2020 · 5 comments · Fixed by #76465
Closed

Unable to create keystore #77392

Diazole opened this issue Sep 14, 2020 · 5 comments · Fixed by #76465
Labels
Team:Operations Team label for Operations Team

Comments

@Diazole
Copy link

Diazole commented Sep 14, 2020

Kibana version: 7.9.0

Elasticsearch version: 7.9.0

Server OS version: CentOS 7

Original install method (e.g. download page, yum, from source, etc.): yum

Describe the bug: Unable to create keystore via bin/kibana-keystore create due to a permissions issue.

FATAL CLI ERROR Error: EACCES: permission denied, open '/etc/kibana/kibana.keystore'
    at Object.openSync (fs.js:443:3)
    at writeFileSync (fs.js:1194:35)
    at Keystore.save (/usr/share/kibana/src/legacy/server/keystore/keystore.js:65:27)
    at create (/usr/share/kibana/src/cli_keystore/create.js:45:12)
    at Command.<anonymous> (/usr/share/kibana/src/cli/command.js:113:20)
    at Command.listener (/usr/share/kibana/node_modules/commander/index.js:291:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/usr/share/kibana/node_modules/commander/index.js:672:12)
    at Command.parse (/usr/share/kibana/node_modules/commander/index.js:459:21)
    at Object.<anonymous> (/usr/share/kibana/src/cli_keystore/cli_keystore.js:69:9)

It looks like the commit that caused this is #66614 which set /etc/kibana to 2750.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@pmuellr
Copy link
Member

pmuellr commented Sep 16, 2020

This seems very similar to #76829, but a little different?

  • not seeing the same error message as reported here (just a reference that you can't create a keystore file)
  • this was reported against 7.9.0, but the referenced issue appears to be on master and not 7.x

Figured I'd leave this open and cross-reference it anyway, but guessing it's a DUP.

@tylersmalley
Copy link
Contributor

@jbudz, can you please take a look at this?

@pa-jberanek
Copy link

Another "me too" with Kibana 7.9.3 on CentOS 7.8:

# sudo -u kibana /usr/share/kibana/bin/kibana-keystore create
Babel could not write cache to file: /usr/share/kibana/optimize/.babel_register_cache.json
due to a permission issue. Cache is disabled.
FATAL CLI ERROR Error: EACCES: permission denied, open '/etc/kibana/kibana.keystore'
    at Object.openSync (fs.js:443:3)
    at writeFileSync (fs.js:1194:35)
    at Keystore.save (/usr/share/kibana/src/legacy/server/keystore/keystore.js:65:27)
    at create (/usr/share/kibana/src/cli_keystore/create.js:45:12)
    at Command.<anonymous> (/usr/share/kibana/src/cli/command.js:113:20)
    at Command.listener (/usr/share/kibana/node_modules/commander/index.js:291:8)
    at Command.emit (events.js:198:13)
    at Command.parseArgs (/usr/share/kibana/node_modules/commander/index.js:672:12)
    at Command.parse (/usr/share/kibana/node_modules/commander/index.js:459:21)
    at Object.<anonymous> (/usr/share/kibana/src/cli_keystore/cli_keystore.js:69:9)
# ls -al /etc/kibana/
total 32
drwxr-s---.  2 root kibana   66 Oct 27 23:37 .
drwxr-xr-x. 96 root root   8192 Oct 27 23:22 ..
-rw-rw----.  1 root kibana 5417 Oct 27 23:37 kibana.yml
-rw-r--r--.  1 root kibana 5259 Aug 11 23:57 kibana.yml.rpmnew
-rw-r--r--.  1 root kibana  216 Oct 16 12:36 node.options

@pa-jberanek
Copy link

# chmod g+w /etc/kibana
# sudo -u kibana /usr/share/kibana/bin/kibana-keystore create
Created Kibana keystore in /etc/kibana/kibana.keystore
Babel could not write cache to file: /usr/share/kibana/optimize/.babel_register_cache.json
due to a permission issue. Cache is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Operations Team label for Operations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants