Logstash unable to start

I have installed logstash 7.3.2 on EC2 RHEL linux , when i try to start the service i am getting below error

systemctl start logstash
"Failed to start logstash.service: Unit not found."

i have downloaded logstash RPM package and installed using "yum install logstash.....rpm"

my java config: as below
installed java using "sudo yum -y install java-1.7.0-openjdk"

openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

when i debug i found below in logstash-plain.log file
[2019-09-20T00:13:38,988][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2019-09-20T00:13:41,291][INFO ][logstash.runner ] Logstash shut down.
[2019-09-20T16:52:48,387][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-20T16:52:48,424][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/etc/logstash/conf.d/"}
[2019-09-20T16:52:48,428][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2019-09-20T16:52:48,432][INFO ][logstash.runner ] Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
[2019-09-20T16:55:25,366][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-20T16:55:25,403][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/etc/logstash/conf.d/
"}
[2019-09-20T16:55:25,408][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2019-09-20T16:55:25,412][INFO ][logstash.runner ] Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
[2019-09-20T16:59:58,940][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-20T16:59:58,976][INFO ][logstash.config.source.local.configpathloader] No config files found in path {:path=>"/etc/logstash/conf.d/*"}
[2019-09-20T16:59:58,980][ERROR][logstash.config.sourceloader] No configuration found in the configured sources.
[2019-09-20T16:59:58,985][INFO ][logstash.runner ] Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash
[2019-09-20T17:58:42,631][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-20T17:58:43,527][INFO ][org.reflections.Reflections] Reflections took 49 ms to scan 1 urls, producing 19 keys and 39 values
[2019-09-20T17:58:43,802][ERROR][logstash.outputs.elasticsearch] Unknown setting 'region' for elasticsearch
[2019-09-20T17:58:43,808][FATAL][logstash.runner ] The given configuration is invalid. Reason: Something is wrong with your configuration.
[2019-09-20T17:58:43,817][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
[2019-09-20T18:04:02,389][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-20T18:04:03,302][INFO ][org.reflections.Reflections] Reflections took 50 ms to scan 1 urls, producing 19 keys and 39 values
[2019-09-20T18:04:03,592][ERROR][logstash.outputs.elasticsearch] Unknown setting 'region' for elasticsearch
[2019-09-20T18:04:03,597][FATAL][logstash.runner ] The given configuration is invalid. Reason: Something is wrong with your configuration.
[2019-09-20T18:04:03,607][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
[2019-09-20T18:10:03,391][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-20T18:10:04,393][INFO ][org.reflections.Reflections] Reflections took 48 ms to scan 1 urls, producing 19 keys and 39 values
[2019-09-20T18:10:04,673][ERROR][logstash.outputs.elasticsearch] Unknown setting 'region' for elasticsearch
[2019-09-20T18:10:04,680][FATAL][logstash.runner ] The given configuration is invalid. Reason: Something is wrong with your configuration.
[2019-09-20T18:10:04,689][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
[2019-09-20T18:12:20,859][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-09-20T18:12:21,756][INFO ][org.reflections.Reflections] Reflections took 49 ms to scan 1 urls, producing 19 keys and 39 values
[2019-09-20T18:12:22,074][INFO ][logstash.runner ] Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash

Also have a look at the logs in /var/log/messages and maybe post your logstash.yml file

It seems to me from the output that you haven't configured your pipelines.yml file.

You can find the default locations for these files here.
https://www.elastic.co/guide/en/logstash/current/dir-layout.html

Make sure that your config files are registered in your pipelines.yml file.
https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html

I once made the mistake of editing my logstash.yml file as a pipelines.yml file. It gave me this same error.

Indeed, without a configuration found Logstash will just shut down again.
As per the messages there are no configuration files found and your description does not sound like you added them already.

As others mentioned, with your logstash.yml and pipelines.yml file we could help more.
Please use Markdown to format your text and make it more readable for others.

I have done fresh re installation by deleting old logstash directories and folders , now i could able to restart the service.

Awesome, glad to hear that it works for you now!

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