Error Generating Encryption Key - Error: ENOENT: no such file or directory

Hi Kibana team,

I m trying to generate encryption keyusing below command but getting error

ubuntu@host:/usr/share/kibana$ bin/kibana-encryption-keys generate
Error: ENOENT: no such file or directory, open '/usr/share/kibana/config/kibana.yml'
at Object.openSync (node:fs:585:3)
at readFileSync (node:fs:453:35)
at new EncryptionConfig (/usr/share/kibana/src/cli_encryption_keys/encryption_config.js:38:57)
at Object. (/usr/share/kibana/src/cli_encryption_keys/cli_encryption_keys.js:23:26)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at Module.Hook._require.Module.require (/usr/share/kibana/node_modules/require-in-the-middle/index.js:80:39)

Kindly suggest how to solve this issue. Thanks

Hi Team,
I solved this issue. Plz close the topic

@aniketdatir could you please list here what was causing your problem so it can be used for future reference and mark it as the solution? :smiley:

2 Likes

Hi @tiagocosta :slightly_smiling_face: ,

as the error suggest above, it was searching kibana.yml inside config folder but this folder was not present.

So, i created folder named config inside ''/usr/share/kibana/' and copied the kibana.yml file inside it.
Then using root user I run the above command and generated encryption key.

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