Logstash service failing on start up on Ubuntu 16.04

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[19009]: 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[19009]: [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[1]: logstash.service: Main process exited, code=exited, status=1/FAILURE
Nov 16 07:59:25 nodename-0 systemd[1]: logstash.service: Unit entered failed state.
Nov 16 07:59:25 nodename-0 systemd[1]: logstash.service: Failed with result 'exit-code'.
Nov 16 07:59:25 nodename-0 systemd[1]: 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
Release: 16.04
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)
Logstash V6.4.2

Can someone help with a solution to this?

Thanks!

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