# Logstash Keystore doesn't work

**URL:** <https://discuss.elastic.co/t/logstash-keystore-doesnt-work/229034>\
**Category:** Logstash\
**Tags:** elastic-stack-security\
**Created:** [April 21, 2020, 12:30pm UTC](https://discuss.elastic.co/t/logstash-keystore-doesnt-work/229034 "2020-04-21T12:30:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sonia1](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@Sonia1](https://discuss.elastic.co/u/Sonia1)\
**Post date:** [April 21, 2020, 12:30pm UTC](https://discuss.elastic.co/t/logstash-keystore-doesnt-work/229034/1 "2020-04-21T12:30:03Z")

</div>

Hi everyone!

I'm new with ELK and I'm trying to use Logstash-keystore to secure my passwords. I follow the steps of the [doc](https://www.elastic.co/guide/en/logstash/current/keystore.html) but it's doesn't work.

```
set +o history
export LOGSTASH_KEYSTORE_PASS=mypassword
set -o history
/usr/share/logstash/bin/logstash-keystore --path.settings /etc/logstash/ create
/usr/share/logstash/bin/logstash-keystore --path.settings /etc/logstash/ add es_pwd
/usr/share/logstash/bin/logstash-keystore --path.settings /etc/logstash/ add list

```

It looks like it's working propertly this part.

```
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N

es_pwd

```

I have two pipelines that I identified in pipelines.yml which output is this:

```
output {
  stdout {}
  file { path => "/root/salida_logstash.log" }
  elasticsearch {
     hosts => ["localhost:9200"]
     index => "%{index_name}"
     document_id => "%{[@metadata][generated_id]}"
     user => "elastic"
     password => "${es_pwd}"
   }
}

```

However, when I launch Logstash I got this error:

```
sudo /usr/share/logstash/bin/logstash --path.settings /etc/logstash/ --config.reload.automatic --debug

ERROR: Failed to load settings file from "path.settings". Aborting... path.setting=/etc/logstash/, exception=Java::OrgLogstashSecretStore::SecretStoreException::LoadException, message=>Found a file at /etc/logstash/logstash.keystore, but it is not a valid Logstash keystore.
[ERROR] 2020-04-21 07:41:46.194 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

```

Could anybody help me, please?

Other thing that I've notice it's that if I don't use the keystore password it works fine.  
Why could be that?

---

<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:** [May 19, 2020, 12:30pm UTC](https://discuss.elastic.co/t/logstash-keystore-doesnt-work/229034/2 "2020-05-19T12:30:05Z")

</div>

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