Running kibana as a service on Linux


(Aviral Srivastava) #1

elasticsearch-2.1.1
kibana-4.3.0
OS: Linux

I used putty to remotely install kibana on linux machine as follows:-

  1. Download the kibana 4.3.0 tar
    curl -L -O https://artifacts.elastic.co/downloads/kibana/kibana-5.1.2-linux-x86_64.tar.gz2. Extract it
    tar -xvf kibana-4.3.0-linux-x64.tar.gz
  2. Added server.port, server.host, elasticsearch.url in kibana.yml
  3. After that I started elasticsearch as:-
    ./kibana

Now, how do I need to run it as a service.??


Run Kibana in Linux as a service
Run kibana as a service
(Lee Drengenberg) #2

Hi Aviral,

It's probably possible to complete what you're trying to do, but there's a much easier way.

  1. Go to https://www.elastic.co/downloads/kibana and download the Linux package appropriate for your Linux distribution. For example, on Ubuntu 64-bit you would get the .deb package https://artifacts.elastic.co/downloads/kibana/kibana-5.1.2-amd64.deb
    On Redhat or CentOS you would get the .rpm package.

  2. Install the package (as root). On Ubuntu dpkg -i <the .deb package you downloaded>
    On Redhat or CentOS yum install -y <the .rpm package you downloaded>

  3. same steps as above for Elasticsearch.

  4. The config files are in /etc/elasticsearch and /etc/kibana (but they should both start and connect with no changes)

  5. as root service elasticsearch start , service kibana start

NOTE: Installing the packages create elasticsearch and kibana users and starting the services runs them as those users

  1. see /var/log/elasticsearch/elasticsearch.log and /var/log/kibana/kibana.stdout

Regards,
Lee


Run as a service
Run Kibana on production
Kibana chkconfig startup error
(Lee Drengenberg) #3

Also, see https://www.elastic.co/guide/en/kibana/current/install.html and instructions "Install Kibana with Debian Package" or "Install Kibana with RPM"


(Aviral Srivastava) #4

What am I doing wrong here ??

I have created a service file to run kibana 4.3.0
under /etc/systemd/system/kibana.service
[Unit]
Description=Kibana 4

[Service]
Type=simple
User=kibana
Environment=CONFIG_PATH=/home/app/kibana-4.3.0-linux-x64/config/kibana.yml
Environment=NODE_ENV=production
ExecStart=/home/app/kibana-4.3.0-linux-x64/node/bin/node /home/app/kibana-4.3.0-linux-x64src/cli

[Install]
WantedBy=multi-user.target

Then I did following steps:-

  1. sudo systemctl daemon-reload
  2. sudo systemctl start kibana

But it is not starting
I tried checking the status:;
sudo systemctl status kibana
‚óŹ kibana.service - Kibana 4
Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-01-19 15:02:54 IST; 7min ago
Process: 21863 ExecStart=/home/appadmin/kibana-4.3.0-linux-x64/node/bin/node /home/appadmin/kibana-4.3.0-linux-x64/src/cli (code=exited, status=217/USER)
Main PID: 21863 (code=exited, status=217/USER)

Jan 19 15:02:54 XX-XXX-XXXXXX systemd[1]: Started Kibana 4.
Jan 19 15:02:54 XX-XXX-XXXXXX systemd[1]: Starting Kibana 4...
Jan 19 15:02:54 XX-XXX-XXXXXX systemd[1]: kibana.service: main process exited, code=exited, status=217/USER
Jan 19 15:02:54 XX-XXX-XXXXXX systemd[1]: Unit kibana.service entered failed state.
Jan 19 15:02:54 XX-XXX-XXXXXX systemd[1]: kibana.service failed.


(system) #5

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