Several kibana services on RH systemd


#1

hi,
I have kibana 4.5.1 on Linux RH7.2, systemd
I start and stop kibana by using systemctl (kibana.service).
My goal : i want to manage a second kibana service.
I copy /opt/kibana to /opt/kibana2
I modify the kibana.yml in /opt/kibana2/config:

  • server.port : 5602
  • kibana.index: ".kibana2"
  • pid.file: /var/run/kibana2.pid
  • logging.dest: /dfic/kibana/logs/kibana2.log

I copy /usr/lib/systemd/system/kibana.service to /usr/lib/systemd/system/kibana2.service
I modify kibana2.service :
Description=Kibana numero 2
[Service]
Type=simple
User=kibana
Group=root
ExecStart=/opt/kibana2/bin/kibana
Restart=always
[Install]
WantedBy=multi-user.target

I execute systemctl daemon-reload.
I enable kibana2.service (systemctl enablekibana2.service).
And I start kibana2.service : systemctl start kibana2.service

kibana2.service fail with this message :

systemctl status kibana2.service

â kibana2.service - Kibana numero 2
Loaded: loaded (/usr/lib/systemd/system/kibana2.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Thu 2017-01-19 15:08:16 CET; 2min 4s ago
Process: 5465 ExecStart=/opt/kibana2/bin/kibana (code=exited, status=1/FAILURE)
Main PID: 5465 (code=exited, status=1/FAILURE)

Jan 19 15:08:16 UD0TX040 systemd[1]: kibana2.service: main process exited, code=exited, status=1/FAILURE
Jan 19 15:08:16 UD0TX040 systemd[1]: Unit kibana2.service entered failed state.
Jan 19 15:08:16 UD0TX040 systemd[1]: kibana2.service failed.
Jan 19 15:08:16 UD0TX040 systemd[1]: kibana2.service holdoff time over, scheduling restart.
Jan 19 15:08:16 UD0TX040 systemd[1]: start request repeated too quickly for kibana2.service
Jan 19 15:08:16 UD0TX040 systemd[1]: Failed to start Kibana numero 2.
Jan 19 15:08:16 UD0TX040 systemd[1]: Unit kibana2.service entered failed state.
Jan 19 15:08:16 UD0TX040 systemd[1]: kibana2.service failed.

can u help my how to manage two kibana services in the same time on RH systemd please ?


(Felix Stürmer) #2

Hi, @ericpietro!

The systemctl status command only shows the last log lines. Would it be possible for you to post the output of journalctl -u kibana2.service for us to take a look at Kibana's complete log output?


#3

hi weltenwort and ty for your answer.
indeed, when i do your command, i find that the problem is a permission denied problem:
Er ror: EACCES: permission denied, open '/dfic/kibana/logs/kibana2.log'
FATAL { [Error: EACCES: permission denied, open '/var/run/kibana2.pid']
I change the permissions and it's good now...

Maybe, in the kibana2.service, I have to change the user=kibana by user=kibana2 ?

ty anyway for your quick and smart answer :slight_smile:


(Felix Stürmer) #4

Glad to hear that solved your problem.

The user setting in the kibana2.service has to match an existing system user that has permission to access all required directories. The choice is up to you to use the kibana system user for both instances or to create a separate user account for the second instance.


(system) #5

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