Hi,
I have kibana 5.4.2 installed on a server. I can start the service with no problem when I am logged as a root user using "systemctl start kibana" or "service kibana start".
I have the kibana.service file at /etc/systemd/system/kibana.service as below:
[Unit]
Description=Kibana
[Service]
Type=simple
User=svc_tst_elk
Group=gp_svc_tst_elk
# 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=always
WorkingDirectory=/
[Install]
WantedBy=multi-user.target
and the env as /etc/default/kibana:
user="svc_tst_elk"
group="gp_svc_tst_elk"
chroot="/"
chdir="/"
nice=""
# If this is set to 1, then when stop
is called, if the process has
# not exited within a reasonable time, SIGKILL will be sent next.
# The default behavior is to simply log a message "program stop failed; still running"
KILL_ON_STOP_TIMEOUT=0
When, I try to start the kibana service with the user svc_tst_elk:
I see this entry in the kibana.stderr:
chroot: cannot change root directory to /: Operation not permitted
Also, the user svc_tst_elk is/has permissions to run the commands /sbin/service kibana start/stop.