Not a valid Logstash keystore java exception problem

Thank you somuch badger

It worked !

here is what i did

before creating the keystore and adding the secret username and password
i went and creat the directory /etc/sysconfig/ and a logstash file in it with the value of LOGSTASH_KEYSTORE_PASS
here are the commands :

sudo systemctl stop logstash.service 
sudo mkdir /etc/sysconfig
sudo nano /etc/sysconfig/logstash
add the following (replace with actual password): 
LOGSTASH_KEYSTORE_PASS=mypassword
sudo chmod 600 /etc/sysconfig/logstash

Then created my keystore and continued with the steps as described above

but i'm still wondring, it is secure to have a file storing such a value in sysconfig ?