0

I am using Manjaro and installed elasticsearch and kibana with

yay -S elasticsearch kibana

Starting the elasticsearch service works well

sudo systemctl start elasticsearch

I've configured kibana with the basic settings in /etc/kibana/kibana.yml:

server.port: 5601
server.host: "localhost"
elasticsearch.hosts: ["http://localhost:9200"]

But running kibana always fails:

❯❯❯ systemctl status kibana                                                                                                                                                              ✘ 7 
● kibana.service - Kibana - dashboard for Elasticsearch
     Loaded: loaded (/usr/lib/systemd/system/kibana.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Fri 2020-11-13 12:10:13 CET; 5min ago
    Process: 1609 ExecStart=/usr/bin/node --max-old-space-size=512 /usr/share/kibana/src/cli --config=/etc/kibana/kibana.yml (code=exited, status=1/FAILURE)
   Main PID: 1609 (code=exited, status=1/FAILURE)

Nov 13 12:10:13 Trinity systemd[1]: kibana.service: Scheduled restart job, restart counter is at 5.
Nov 13 12:10:13 Trinity systemd[1]: Stopped Kibana - dashboard for Elasticsearch.
Nov 13 12:10:13 Trinity systemd[1]: kibana.service: Start request repeated too quickly.
Nov 13 12:10:13 Trinity systemd[1]: kibana.service: Failed with result 'exit-code'.
Nov 13 12:10:13 Trinity systemd[1]: Failed to start Kibana - dashboard for Elasticsearch.

Maybe I am overseeing somethink. What should I do to start it properly?

journal -u kibana

Nov 13 12:10:10 Trinity systemd[1]: Started Kibana - dashboard for Elasticsearch.
Nov 13 12:10:10 Trinity node[1419]: Kibana does not support the current Node.js version v15.0.1. Please use Node.js v10.22.1.
Nov 13 12:10:10 Trinity systemd[1]: kibana.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 12:10:10 Trinity systemd[1]: kibana.service: Failed with result 'exit-code'.
Nov 13 12:10:11 Trinity systemd[1]: kibana.service: Scheduled restart job, restart counter is at 1.
Nov 13 12:10:11 Trinity systemd[1]: Stopped Kibana - dashboard for Elasticsearch.
Nov 13 12:10:11 Trinity systemd[1]: Stopped Kibana - dashboard for Elasticsearch.
Nov 13 12:10:11 Trinity systemd[1]: Started Kibana - dashboard for Elasticsearch.
Nov 13 12:10:11 Trinity node[1579]: Kibana does not support the current Node.js version v15.0.1. Please use Node.js v10.22.1.
Nov 13 12:10:11 Trinity systemd[1]: kibana.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 12:10:11 Trinity systemd[1]: kibana.service: Failed with result 'exit-code'.
Nov 13 12:10:11 Trinity systemd[1]: kibana.service: Scheduled restart job, restart counter is at 2.
Nov 13 12:10:11 Trinity systemd[1]: Stopped Kibana - dashboard for Elasticsearch.
Nov 13 12:10:11 Trinity systemd[1]: Started Kibana - dashboard for Elasticsearch.
Nov 13 12:10:11 Trinity node[1589]: Kibana does not support the current Node.js version v15.0.1. Please use Node.js v10.22.1.
Nov 13 12:10:11 Trinity systemd[1]: kibana.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 12:10:11 Trinity systemd[1]: kibana.service: Failed with result 'exit-code'.
Nov 13 12:10:12 Trinity systemd[1]: kibana.service: Scheduled restart job, restart counter is at 3.
Nov 13 12:10:12 Trinity systemd[1]: Stopped Kibana - dashboard for Elasticsearch.
Nov 13 12:10:12 Trinity systemd[1]: Started Kibana - dashboard for Elasticsearch.
Nov 13 12:10:12 Trinity node[1599]: Kibana does not support the current Node.js version v15.0.1. Please use Node.js v10.22.1.
Nov 13 12:10:12 Trinity systemd[1]: kibana.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 12:10:12 Trinity systemd[1]: kibana.service: Failed with result 'exit-code'.
Nov 13 12:10:12 Trinity systemd[1]: kibana.service: Scheduled restart job, restart counter is at 4.
Nov 13 12:10:12 Trinity systemd[1]: Stopped Kibana - dashboard for Elasticsearch.
Nov 13 12:10:12 Trinity systemd[1]: Started Kibana - dashboard for Elasticsearch.
Nov 13 12:10:12 Trinity node[1609]: Kibana does not support the current Node.js version v15.0.1. Please use Node.js v10.22.1.
Nov 13 12:10:12 Trinity systemd[1]: kibana.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 12:10:12 Trinity systemd[1]: kibana.service: Failed with result 'exit-code'.
Nov 13 12:10:13 Trinity systemd[1]: kibana.service: Scheduled restart job, restart counter is at 5.
Nov 13 12:10:13 Trinity systemd[1]: Stopped Kibana - dashboard for Elasticsearch.
Nov 13 12:10:13 Trinity systemd[1]: kibana.service: Start request repeated too quickly.
Nov 13 12:10:13 Trinity systemd[1]: kibana.service: Failed with result 'exit-code'.
Nov 13 12:10:13 Trinity systemd[1]: Failed to start Kibana - dashboard for Elasticsearch.
betaros
  • 103
  • 1
  • 4

1 Answers1

1

I spent countless hours trying to get Kibana to work on Arch and Manjaro. I finally succeeded.

Below are my notes to myself, in case someone else has the same problem.

Be aware that I am a newbie, and frankly, I don't know what I am doing, so proceed with caution.

  1. Install Kibana after installing elasticsearch

In Arch, is used this command:

$sudo pacman -S kibana

In Manjaro, I used the Add/Remove Software GUI. Searched for kibana, clicked Install, and Apply

  1. After installation of Kibana, I changed these settings in /etc/kibana/kibana.yml (uncomment the lines below):
$ sudo nano /etc/kibana/kibana.yml

#server.port: 5601
#server.host: "localhost"
#elasticsearch.hosts: ["http://localhost:9200"]
  1. Kibana requires node, but Kibana 7.9.2-1 does not work with the latest node version. So you need an older version of Node to work, specifically Node 10.22.1. To install this older version of Node, I used NVM (Node Version Manager).

I ran these commands:

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.0/install.sh | bash
$ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
$ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
  1. Using NVM, install Node 10.22.1.
$ nvm install v10.22.1

This will install the binary file called "node" in this location: /home/manjaro1/.nvm/versions/node/v10.22.1/bin (be aware that the .nvm directory is hidden)

  1. After installation, I renamed my existing node file (/usr/bin/node) to (/usr/bin/node) I used these commands to achieve that:
$ cd /usr/bin
$ sudo mv -- node node_backup

Caution: I do not know if renaming this file is a good idea, in regards to other programs.

  1. I then copied my new node file to the /usr/bin, with this command (making sure I ran the command from the /usr/bin directory):
$ cd /usr/bin
$ sudo cp -- /home/manjaro1/.nvm/version/node/v10.22.1/bin/node node
  1. I enabled Kibana to run on startup:
$ systemctl enable kibana
  1. I then started Kibana
$ systemctl start kibana
  1. And checked the status:
$ systemctl status kibana
  1. Everything looked good. I then made sure Elasticsearch was running (systemctl status elasticsearch) and opened a browser, and went to localhost:5601

After a few seconds, the Kibana control panel appeared.


Useful Notes

  1. In step 5 and 6 above, you can possibly leave the existing node file in /usr/bin, and copy the version 10.22.1 node file to /usr/bin with a new name, for example node10221. In that case, you need to make a change in this file: /usr/lib/systemd/system/kibana.service with:
$ sudo nano /usr/lib/systemd/system/kibana.service

In the line that starts with ExecStart=/usr/bin/node change the file name to the new node name, like this:

ExecStart=/usr/bin/node10221

Save the file and start or restart Kibana:

$ systemctl start kibana 

or

$ systemctl restart kibana
  1. Make sure you are using eleasticsearch 7.9.2-1 and Kibana 7.9.2-1 and install elasticsearch before Kibana

  2. If something is wrong when you run:

$ systemctl status kibana

you can trouble shoot using:

$ journalctl -fu kibana.service
  1. If Kibana fails to start because of permission issues, check permissions with this command:
$ ls -l
  1. My installation is only running locally, so using localhost in kibana.yml works fine for me. It is my understanding you need to change this, if you want to allow remote access.

I hope this helps someone.

Stewart
  • 12,628
  • 1
  • 37
  • 80
Justin
  • 26
  • 1