I am able to run logstash through the command line but when I run it as a service using sudo systemctl start logstash.service, logstash keeps on crashing and I get the following error-
Nov 16 07:59:24 nodename-0 logstash: 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.
Nov 16 07:59:25 nodename-0 logstash: [ERROR] 2018-11-16 07:59:25.012 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
Nov 16 07:59:25 nodename-0 systemd: logstash.service: Main process exited, code=exited, status=1/FAILURE
Nov 16 07:59:25 nodename-0 systemd: logstash.service: Unit entered failed state.
Nov 16 07:59:25 nodename-0 systemd: logstash.service: Failed with result 'exit-code'.
Nov 16 07:59:25 nodename-0 systemd: logstash.service: Service hold-off time over, scheduling restart.
I have my keystore set up with the password and I can list the keys successfully. Also, I have my /etc/logstash/logstash.yml at the correct location with correct permissions.
I am running Logstash with the following configuration-
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Operating System: Ubuntu 16.04.5 LTS
Kernel: Linux 4.15.0-1031-azure
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Can someone help with a solution to this?