# Kibana Broken unless run using “/usr/share/kibana/bin/kibana --allow-root” command

**URL:** https://discuss.elastic.co/t/kibana-broken-unless-run-using-usr-share-kibana-bin-kibana-allow-root-command/307513
**Category:** Kibana
**Created:** [June 17, 2022, 1:00pm UTC](https://discuss.elastic.co/t/kibana-broken-unless-run-using-usr-share-kibana-bin-kibana-allow-root-command/307513 "2022-06-17T13:00:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Micah\_Barsness](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/micah_barsness/32/83318_2.png) [@Micah\_Barsness](https://discuss.elastic.co/u/Micah_Barsness)
#### Post date: [June 17, 2022, 1:00pm UTC](https://discuss.elastic.co/t/kibana-broken-unless-run-using-usr-share-kibana-bin-kibana-allow-root-command/307513/1 "2022-06-17T13:00:48Z")

</div>

Pre upgrade to 8.2.3 I was able to start kibana with 'systemctl start kibana' but it just fails over and over again after the upgrade.

I found I am able to run Kibana using

```auto
/usr/share/kibana/bin/kibana --allow-root

```

It looks like I upgraded as root so I'm not sure why this would be a problem:

```auto
root@xxxx1:/usr/share/kibana/bin# ls -al
total 32
drwxr-xr-x 2 root root 4096 Jun 16 14:55 .
drwxr-xr-x 8 root root 4096 Jun 16 14:55 ..
-rwxr-xr-x 1 root root 835 Jun 8 10:42 kibana

```

& Here his the .yml file.

```auto
root@xxxx:/etc/kibana# ls -al
total 36
drwxr-s--- 2 root kibana 4096 Jun 16 14:57 .
drwxr-xr-x 118 root root 12288 Jun 16 14:55 ..
-rw-rw---- 1 root kibana 130 Jun 16 14:55 kibana.keystore
-rw-r--r-- 1 root kibana 62 Jun 16 14:55 .kibana.keystore.initial_md5sum
-rw-rw---- 1 root kibana 7700 Jun 16 14:57 kibana.yml
-rw-r--r-- 1 root kibana 305 Jun 8 10:42 node.options

```

How do I fix this so I can use systemd to start up kibana normally?

---

<div class="post-metadata">

### Author: ![Micah\_Barsness](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/micah_barsness/32/83318_2.png) [@Micah\_Barsness](https://discuss.elastic.co/u/Micah_Barsness)
#### Post date: [June 17, 2022, 2:06pm UTC](https://discuss.elastic.co/t/kibana-broken-unless-run-using-usr-share-kibana-bin-kibana-allow-root-command/307513/2 "2022-06-17T14:06:08Z")

</div>

Resolved this myself using the following commands -

```auto
1991 apt-get remove --purge kibana

1993 rm -r /var/lib/kibana
1994 rm -r /etc/kibana
 
1995 useradd kibana
1996 groupadd kibana
1997 usermod -a -G kibana kibana

 systemctl daemon-reload
 systemctl start kibana 
 systemctl status kibana  
 journalctl -fu kibana.service

```

Also had this error:

```auto
Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.

```

Resolved by:

```auto
/usr/share/kibana/bin/kibana-encryption-keys generate

```

Paste output keys into kibana.yml at the bottom

And lastly this error:

```auto
Unable to retrieve version information from Elasticsearch nodes. security_exception: [security_exception] Reason: missing authentication credentials for REST request [/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip]

```

Requires you to set up your basic authentication credentials in kibana.yml or have pre-upgrade generated a token via this command (using the dev tools in kibana):

```auto
POST /_security/service/elastic/kibana/credential/token

```

```auto
elasticsearch.serviceAccountToken: "paste generated token here"

```

---

<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: [July 15, 2022, 2:06pm UTC](https://discuss.elastic.co/t/kibana-broken-unless-run-using-usr-share-kibana-bin-kibana-allow-root-command/307513/3 "2022-07-15T14:06:48Z")

</div>

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