Logstash Keystore doesn't work

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 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?

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