# FATAL UnableToReadKeystore: unable to read keystore

**URL:** https://discuss.elastic.co/t/fatal-unabletoreadkeystore-unable-to-read-keystore/280710
**Category:** Kibana
**Created:** [August 7, 2021, 5:28pm UTC](https://discuss.elastic.co/t/fatal-unabletoreadkeystore-unable-to-read-keystore/280710 "2021-08-07T17:28:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AmirHossein\_Sohrabi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amirhossein_sohrabi/32/92645_2.png) [@AmirHossein\_Sohrabi](https://discuss.elastic.co/u/AmirHossein_Sohrabi)
#### Post date: [August 7, 2021, 5:28pm UTC](https://discuss.elastic.co/t/fatal-unabletoreadkeystore-unable-to-read-keystore/280710/1 "2021-08-07T17:28:35Z")

</div>

I'm using an ubuntu 16.04 server on a VM.  
and installed elasticsearch and kibana both version 7.14.  
elasticsearch works properly.  
but when I start the kibana service first it logs running on "systemctl status kibana" command after seconds it becomes activating and stopped at the end.  
Startup log in "var/log/kibana/startup.log"

> Configuring logger failed: UnableToReadKeystore: unable to read keystore  
> at Function.decrypt (/usr/share/kibana/src/cli/keystore/keystore.js:55:13)  
> at Keystore.load (/usr/share/kibana/src/cli/keystore/keystore.js:72:39)  
> at new Keystore (/usr/share/kibana/src/cli/keystore/keystore.js:29:10)  
> at readKeystore (/usr/share/kibana/src/cli/keystore/read\_keystore.js:22:20)  
> at applyConfigOverrides (/usr/share/kibana/src/cli/serve/serve.js:165:41)  
> at applyConfigOverrides (/usr/share/kibana/src/cli/serve/serve.js:227:42)  
> at MapSubscriber.project (/usr/share/kibana/node\_modules/@kbn/config/target/raw/raw\_config\_service.js:30:24)  
> at MapSubscriber.\_next (/usr/share/kibana/node\_modules/rxjs/internal/operators/map.js:49:35)  
> at MapSubscriber.Subscriber.next (/usr/share/kibana/node\_modules/rxjs/internal/Subscriber.js:66:18)  
> at ReplaySubject.\_subscribe (/usr/share/kibana/node\_modules/rxjs/internal/ReplaySubject.js:80:28)  
> FATAL UnableToReadKeystore: unable to read keystore

The line Which exception is thrown "/usr/share/kibana/src/cli/keystore/keystore.js"

```auto
static decrypt(data, password = '') {
    try {
      const bData = Buffer.from(data, 'base64'); // convert data to buffers

      const salt = bData.slice(0, 64);
      const iv = bData.slice(64, 76);
      const tag = bData.slice(76, 92);
      const text = bData.slice(92);
      const key = (0, _crypto.pbkdf2Sync)(password, salt, ITERATIONS, 32, 'sha512');
      const decipher = (0, _crypto.createDecipheriv)(ALGORITHM, key, iv);
      decipher.setAuthTag(tag);
      return decipher.update(text, 'binary', 'utf8') + decipher.final('utf8');
    } catch (e) {
      throw new errors.UnableToReadKeystore();
    }
  }

```

lines 42-57  
I didn't found the error on the internet.

---

<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: [August 8, 2021, 11:25pm UTC](https://discuss.elastic.co/t/fatal-unabletoreadkeystore-unable-to-read-keystore/280710/2 "2021-08-08T23:25:15Z")

</div>

Can you share your `kibana.yml` and the entire Kibana log from startup to the error?

---

<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: [August 8, 2021, 11:25pm UTC](https://discuss.elastic.co/t/fatal-unabletoreadkeystore-unable-to-read-keystore/280710/3 "2021-08-08T23:25:54Z")

</div>

Please don't post the same topic more than once 🙂

> [@Kibana startup Fatal error](https://discuss.elastic.co/t/kibana-startup-fatal-error/280669):
>
> I'm using an ubuntu 16.04 server on a VM. and installed elasticsearch and kibana both version 7.14. elasticsearch works properly. but when I start the kibana service first it logs running on "systemctl status kibana" command after seconds it becomes activating and stopped at the end. Startup log in "var/log/kibana/startup.log" Configuring logger failed: UnableToReadKeystore: unable to read keystore at Function.decrypt (/usr/share/kibana/src/cli/keystore/keystore.js:55:13) at Keystore.loa…

---

<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: [August 8, 2021, 11:25pm UTC](https://discuss.elastic.co/t/fatal-unabletoreadkeystore-unable-to-read-keystore/280710/4 "2021-08-08T23:25:57Z")

</div>


