# Kibana service will not start Exit 126

**URL:** <https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286>\
**Category:** Kibana\
**Created:** [January 24, 2022, 9:52pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286 "2022-01-24T21:52:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigothy](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@craigothy](https://discuss.elastic.co/u/craigothy)\
**Post date:** [January 24, 2022, 9:52pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/1 "2022-01-24T21:52:27Z")

</div>

Upon trying to start kibana 7.16.3 after a fresh successful install on rhel 8, I am getting the following errors. Any ideas on what the cause could be. Thank you so much for any help.

```auto
> [root@attack-range-elastic-server vagrant]# sudo -u kibana /usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log --pid.file=/run/kibana/kibana.pid &
> [1] 8636
> [root@attack-range-elastic-server vagrant]# /usr/share/kibana/bin/kibana: line 29: /usr/share/kibana/bin/../node/bin/node: Operation not permitted
> /usr/share/kibana/bin/kibana: line 29: /usr/share/kibana/bin/../node/bin/node: Success
> 
> [1]+ Exit 126 sudo -u kibana /usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log --pid.file=/run/kibana/kibana.pid
> [root@attack-range-elastic-server vagrant]# systemctl start kibana
> [root@attack-range-elastic-server vagrant]# systemctl status kibana
> ● kibana.service - Kibana
> Loaded: loaded (/etc/systemd/system/kibana.service; enabled; vendor preset: disabled)
> Active: failed (Result: exit-code) since Mon 2022-01-24 16:48:33 EST; 2s ago
> Docs: https://www.elastic.co
> Process: 8656 ExecStart=/usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log --pid.file=/run/kibana/kibana.pid (code=exited, status=126)
> Main PID: 8656 (code=exited, status=126)
> 
> Jan 24 16:48:30 attack-range-elastic-server systemd[1]: kibana.service: Main process exited, code=exited, status=126/n/a
> Jan 24 16:48:30 attack-range-elastic-server systemd[1]: kibana.service: Failed with result 'exit-code'.
> Jan 24 16:48:33 attack-range-elastic-server systemd[1]: kibana.service: Service RestartSec=3s expired, scheduling restart.
> Jan 24 16:48:33 attack-range-elastic-server systemd[1]: kibana.service: Scheduled restart job, restart counter is at 3.
> Jan 24 16:48:33 attack-range-elastic-server systemd[1]: Stopped Kibana.
> Jan 24 16:48:33 attack-range-elastic-server systemd[1]: kibana.service: Start request repeated too quickly.
> Jan 24 16:48:33 attack-range-elastic-server systemd[1]: kibana.service: Failed with result 'exit-code'.
> Jan 24 16:48:33 attack-range-elastic-server systemd[1]: Failed to start Kibana.
> [root@attack-range-elastic-server vagrant]#

```

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 24, 2022, 10:50pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/2 "2022-01-24T22:50:13Z")

</div>

Can you check `/var/log/kibana/kibana.log` and post that?

---

<div class="post-metadata">

**Author:** ![craigothy](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@craigothy](https://discuss.elastic.co/u/craigothy)\
**Post date:** [January 24, 2022, 10:50pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/3 "2022-01-24T22:50:56Z")

</div>

That file is present but empty

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [January 25, 2022, 7:07pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/4 "2022-01-25T19:07:15Z")

</div>

> [@craigothy](#):
>
> ```auto
> > [root@attack-range-elastic-server vagrant]# sudo -u kibana /usr/share/kibana/bin/kibana --logging.dest=/var/log/kibana/kibana.log --pid.file=/run/kibana/kibana.pid &
> 
> ```

Exit code 126 means there is a permission problem, or the command is not an executable file. This message seems to agree: `line 29: /usr/share/kibana/bin/../node/bin/node: Operation not permitted`

Does the `kibana` user have permission to read all the files that have been installed with Kibana, and to execute all of the binaries?

---

<div class="post-metadata">

**Author:** ![craigothy](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@craigothy](https://discuss.elastic.co/u/craigothy)\
**Post date:** [January 25, 2022, 8:38pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/5 "2022-01-25T20:38:43Z")

</div>

Thanks @tsullivan . Yes, I've verified that the kibana user has rights. In my troubleshooting, I even did a chmod 777 against the whole /usr/share/kibana directory just as a test and still get the same error.

---

<div class="post-metadata">

**Author:** ![craigothy](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@craigothy](https://discuss.elastic.co/u/craigothy)\
**Post date:** [January 25, 2022, 9:04pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/6 "2022-01-25T21:04:05Z")

</div>

Actually I think that might be my issue after all. Although, in looking at the file permissions I am not sure why the "vagrant" user can execute node but my "kibana" user cannot. The file permissions should have full rights for everyone?

```auto
[vagrant@attack-range-elastic-server ~]$ sudo -u kibana /usr/share/kibana/bin/../node/bin/node
sudo: unable to execute /usr/share/kibana/bin/../node/bin/node: Operation not permitted
[vagrant@attack-range-elastic-server ~]$ /usr/share/kibana/bin/../node/bin/node
Welcome to Node.js v16.13.0.
Type ".help" for more information.
>
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
>
[vagrant@attack-range-elastic-server ~]$ ls -la /usr/share/kibana/bin/../node/bin/node
-rwxrwxrwx. 1 kibana kibana 79303064 Jan 6 18:42 /usr/share/kibana/bin/../node/bin/node

```

---

<div class="post-metadata">

**Author:** ![craigothy](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@craigothy](https://discuss.elastic.co/u/craigothy)\
**Post date:** [January 25, 2022, 10:11pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/7 "2022-01-25T22:11:12Z")

</div>

Looks like this actually might be related to RHEL fapolicy in case anyone else runs into this behavior.

---

<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 22, 2022, 10:11pm UTC](https://discuss.elastic.co/t/kibana-service-will-not-start-exit-126/295286/8 "2022-02-22T22:11:46Z")

</div>

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