Kibana Upgrade to 7.8 : FATAL CLI ERROR Error: ENOENT: no such file or directory

Upgraded from 7.7 to 7.8 elasticsearch works fine but kibana shows me this error :

FATAL CLI ERROR Error: ENOENT: no such file or directory, open '/usr/share/kibana/config/kibana.yml'
at Object.openSync (fs.js:443:3)
at readFileSync (fs.js:343:35)
at readYaml (/usr/share/kibana/src/core/server/config/read_config.js:34:69)
at getConfigFromFiles (/usr/share/kibana/src/core/server/config/read_config.js:66:18)
at RawConfigService.loadConfig (/usr/share/kibana/src/core/server/config/raw_config_service.js:51:70)
at bootstrap (/usr/share/kibana/src/core/server/bootstrap.js:61:20)
at Command. (/usr/share/kibana/src/cli/serve/serve.js:195:33)
at Command. (/usr/share/kibana/src/cli/command.js:111: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. (/usr/share/kibana/src/cli/cli.js:60:9)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Module._compile (/usr/share/kibana/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:789:10)

My config file is in /etc/kibana/ and it worked fine before. what can I do to bypass this error ?

Here is my service config for kibana :

[Unit]
Description=Kibana

[Service]
Type=simple
User=kibana
Group=kibana
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/kibana
EnvironmentFile=-/etc/sysconfig/kibana
ExecStart=/usr/share/kibana/bin/kibana
Restart=on-failure
RestartSec=3
StartLimitBurst=3
StartLimitInterval=60
WorkingDirectory=/

[Install]
WantedBy=multi-user.target

Same with me, but fixed.

You should add "-c /etc/kibana/kibana.yml" at the end of ExecStart config.
Here is my service config (/etc/systemd/system/kibana.service):

[Service]
Type=simple
User=kibana
Group=kibana
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/kibana
EnvironmentFile=-/etc/sysconfig/kibana
ExecStart=/usr/share/kibana/bin/kibana "-c /etc/kibana/kibana.yml"
Restart=on-failure
RestartSec=3
StartLimitBurst=3
StartLimitInterval=60
WorkingDirectory=/
1 Like

I opened https://github.com/elastic/kibana/issues/71120. Confirming ^ as the recommended fix.

2 Likes

I am setting up a new cluster and got this error, so basically have not gone through the upgrade path and got the exact same error. Did not get success after the above step to make changes in /etc/systemd/system/kibana.service, what I see is there is no config folder available
I am using es 7.8.0 version

/usr/share/kibana$ ls
bin  built_assets  LICENSE.txt  node  node_modules  NOTICE.txt  optimize  package.json  plugins  README.txt  src  webpackShims  x-pack

I have the same issue. A new install of v7.8 on Debian 10. madkoala's fix is not sufficient.

/usr/share/kibana/config does not exist.

The only changes to /etc/kibana/kibana.yaml are
server.port
server.host
elasticsearch.hosts

Found a resolution. The following IP occurrences all must match.

/etc/kibana/kibana.yml
elasticsearch.url: "http://ip:9200"

/etc/elasticsearch/elasticsearch.yml
network.host: "ip"
cluster.initial_master_nodes: ["ip"]

I also uncommented the following line in kibana.yml
#server.name: "your-hostname"

just confirming that I had a same problem and this fixed the problem.

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