Logstash Secret Password ERROR

Hello,

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

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:

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:

][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.

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