# Logstash Secret Password ERROR

**URL:** <https://discuss.elastic.co/t/logstash-secret-password-error/273156>\
**Category:** Logstash\
**Tags:** elastic-stack-security\
**Created:** [May 17, 2021, 10:05am UTC](https://discuss.elastic.co/t/logstash-secret-password-error/273156 "2021-05-17T10:05:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAACNTT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaacntt/32/88833_2.png) [@JAACNTT](https://discuss.elastic.co/u/JAACNTT)\
**Post date:** [May 17, 2021, 10:05am UTC](https://discuss.elastic.co/t/logstash-secret-password-error/273156/1 "2021-05-17T10:05:19Z")

</div>

Hello,

I am trying to implement secret keystore from logstash, but I always get the same error:

```auto
sudo /usr/share/logstash/bin/logstash-keystore create
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.
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults

WARNING: The keystore password is not set. Please set the environment variable `LOGSTASH_KEYSTORE_PASS`. Failure to do so will result in reduced security. Continue without password protection on the keystore? [y/N] y
[ERROR] 2021-05-17 11:57:16.207 [main] secretstorecli - Error while trying to create the Logstash keystore. Please ensure that path to /usr/share/logstash/config/logstash.keystore exists and is writable

```

If I use --path.setting it tells me the following:

```auto
sudo /usr/share/logstash/bin/logstash-keystore create --path.settings /etc/logstash/
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.
ERROR: Failed to load settings file from "path.settings". Aborting... path.setting=/etc/logstash/, exception=NameError, message=>uninitialized constant LogStash::Util::Password

WARNING: The keystore password is not set. Please set the environment variable `LOGSTASH_KEYSTORE_PASS`. Failure to do so will result in reduced security. Continue without password protection on the keystore? [y/N] y
Created Logstash keystore at /etc/logstash/logstash.keystore

```

And it creates the file logstash-keystore, but when restarting the service it gives the following error:

```auto
][ERROR][logstash.agent] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:.monitoring-logstash, :exception=>"Java::OrgLogstashSecretStore::Sec
retStoreException::AccessException", :message=>"Can not access Logstash keystore at /etc/logstash/logstash.keystore. Please verify correct file permissions and keystore password."

```

Can anybody help me??

Thank you.

Greetings.

---

<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:** [June 14, 2021, 10:05am UTC](https://discuss.elastic.co/t/logstash-secret-password-error/273156/2 "2021-06-14T10:05:42Z")

</div>

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