# Logstash keystore value not detected in configuration processing

**URL:** <https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904>\
**Category:** Logstash\
**Tags:** elastic-stack-security\
**Created:** [August 19, 2021, 5:46am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904 "2021-08-19T05:46:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramilbermejo](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@ramilbermejo](https://discuss.elastic.co/u/ramilbermejo)\
**Post date:** [August 19, 2021, 5:46am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904/1 "2021-08-19T05:46:48Z")

</div>

Hello Everyone,

I'm trying keystore to store the password for elasticsearch but for some reason I've encountered this error during configuration test.

```auto
# /usr/share/logstash/bin/logstash --path.settings /etc/logstash -t
Using bundled JDK: /usr/share/logstash/jdk
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/rubygems_integration.rb:200: warning: constant Gem::ConfigMap is deprecated
ERROR: Failed to load settings file from "path.settings". Aborting... path.setting=/etc/logstash, exception=LogStash::ConfigurationError, message=>Cannot evaluate `${es_password}`. Replacement variable `es_password` is not defined in a Logstash secret store or as an Environment entry and there is no default value given.
[FATAL] 2021-08-19 05:35:33.386 [main] Logstash - Logstash stopped processing because of an error: (SystemExit) exit
org.jruby.exceptions.SystemExit: (SystemExit) exit
	at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.19.0.jar:?]
	at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.19.0.jar:?]
	at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:89) ~[?:?]

```

Keystore data does exist:

```auto
# bin/logstash-keystore list
es_password

```

And here's the basic config of my logstash.yml file:

```auto
# cat logstash.yml
path.data: /var/lib/logstash
path.logs: /var/log/logstash

xpack.monitoring.elasticsearch.password: ${es_password}
xpack.monitoring.elasticsearch.url: https://localhost:9200
xpack.monitoring.elasticsearch.username: logstash_system

```

Please let me know how can I make it work. Any advise is highly appreciated.

---

<div class="post-metadata">

**Author:** ![ramilbermejo](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@ramilbermejo](https://discuss.elastic.co/u/ramilbermejo)\
**Post date:** [August 27, 2021, 1:14am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904/2 "2021-08-27T01:14:09Z")

</div>

Did anyone encounter similar issue?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 27, 2021, 1:29am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904/3 "2021-08-27T01:29:48Z")

</div>

Hi @ramilbermejo welcome to the community.

Most likely Logstash can't find the keystore.

What version?

How was it installed?

See here

> **[Secrets keystore for secure settings | Logstash Reference \[8.11\] | Elastic](https://www.elastic.co/guide/en/logstash/current/keystore.html#keystore-location)**

Did you use path.settings when you created it?

> The keystore must be located in the Logstash `path.settings` directory. This is the same directory that contains the `logstash.yml` file. When performing any operation against the keystore, it is recommended to set `path.settings` for the keystore command.

```auto
set +o history
export LOGSTASH_KEYSTORE_PASS=mypassword
set -o history
sudo -E /usr/share/logstash/bin/logstash-keystore --path.settings /etc/logstash create

```

---

<div class="post-metadata">

**Author:** ![ramilbermejo](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@ramilbermejo](https://discuss.elastic.co/u/ramilbermejo)\
**Post date:** [August 27, 2021, 3:05am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904/4 "2021-08-27T03:05:09Z")

</div>

@stephenb thanks for the reply.

My test environment has logstash version 7.14.0.

I've followed the same guide when I set it up but I might missed something so I'll further check and review.

Thanks again!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [August 27, 2021, 3:24am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904/5 "2021-08-27T03:24:11Z")

</div>

Another possibility, once you create the keystore and make sure it is in the right location make sure the user you are starting Logstash with has permission to access the keystore

---

<div class="post-metadata">

**Author:** ![ramilbermejo](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@ramilbermejo](https://discuss.elastic.co/u/ramilbermejo)\
**Post date:** [August 27, 2021, 3:47am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904/6 "2021-08-27T03:47:29Z")

</div>

OK, thank you!

---

<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:** [September 24, 2021, 3:48am UTC](https://discuss.elastic.co/t/logstash-keystore-value-not-detected-in-configuration-processing/281904/7 "2021-09-24T03:48:14Z")

</div>

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