# Several kibana services on RH systemd

**URL:** <https://discuss.elastic.co/t/several-kibana-services-on-rh-systemd/72177>\
**Category:** Kibana\
**Created:** [January 19, 2017, 2:23pm UTC](https://discuss.elastic.co/t/several-kibana-services-on-rh-systemd/72177 "2017-01-19T14:23:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericpietro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericpietro/32/9685_2.png) [@ericpietro](https://discuss.elastic.co/u/ericpietro)\
**Post date:** [January 19, 2017, 2:23pm UTC](https://discuss.elastic.co/t/several-kibana-services-on-rh-systemd/72177/1 "2017-01-19T14:23:00Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [January 19, 2017, 2:48pm UTC](https://discuss.elastic.co/t/several-kibana-services-on-rh-systemd/72177/2 "2017-01-19T14:48:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ericpietro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ericpietro/32/9685_2.png) [@ericpietro](https://discuss.elastic.co/u/ericpietro)\
**Post date:** [January 20, 2017, 8:08am UTC](https://discuss.elastic.co/t/several-kibana-services-on-rh-systemd/72177/3 "2017-01-20T08:08:50Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [January 20, 2017, 10:37am UTC](https://discuss.elastic.co/t/several-kibana-services-on-rh-systemd/72177/4 "2017-01-20T10:37:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 17, 2017, 10:37am UTC](https://discuss.elastic.co/t/several-kibana-services-on-rh-systemd/72177/5 "2017-02-17T10:37:46Z")

</div>

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