Logstash status: Failed to start logstash

logstash failed to start.

I am using logstash7 .2.0
Elasticsearch-7.2.0
Java-11.0.6

When I check the status after starting it shows Active:Failed.

$: systemctl status logstash.service
â logstash.service - logstash
Loaded: loaded (/etc/systemd/system/logstash.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-01-22 08:04:59 EST; 37s ago
Main PID: 12167 (code=exited, status=1/FAILURE)

systemd[1]: logstash.service: Service hold-off time over, scheduling restart.
Jan 22 08:04:59 xxxxxxx systemd[1]: logstash.service: Scheduled restart job, restart counter is at 5.
Jan 22 08:04:59 xxxxxxx systemd[1]: Stopped logstash.
Jan 22 08:04:59 xxxxxxx systemd[1]: logstash.service: Start request repeated too quickly.
Jan 22 08:04:59 xxxxxxx systemd[1]: logstash.service: Failed with result 'exit-code'.
Jan 22 08:04:59 xxxxxxx systemd[1]: Failed to start logstash.

can any help why is it failed?

after stopping logstash service It also shows status failed instead of inactive.

What do Logstash's logs say? The location of your logs depends on how you installed Logstash, but this documentation should help you find them.

Hi yaauie,

I compared with this as I am downloaded with .deb file.
It is the same as a document
so... now what to do

The Debian package and the RPM package each place config files

I am trying this on also as below
cd /usr/share/logstash sudo bin/logstah -f /etc/logstash/conf.d/example.conf

but it shows below error:

:/usr/share/logstash# sudo /usr/share/logstash/bin/logstash -f /etc/logstash/conf.d/example.conf
could not find java; set JAVA_HOME or ensure java is in PATH

As the error message states, you need to have a valid java on your PATH, or need to have an environment variable JAVA_HOME that points to a valid java.

Hi yaauie,

already set this variable in bashrc file

JAVA_HOME="/usr/lib/jvm/jdk-11.0.6/"
export JAVA_HOME
export PATH=$PATH:$JAVA_HOME/bin

and javac is working properly

Did you set this as root user or normal user ? that's how things usually break with envars.

Hi Grumo
I am at root user

Sooooo,

The paths might be all broken if you install dependencies and other stuff as root user without using "sudo" before each command you'll most likely end-up with think not working.

My advice is to re install java with sudo as normal user and then start logstash.

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