Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logstash start with error: Pipelines YAML file is empty

When I try start logstash server on my machine I get this error:

Sending Logstash's logs to D:/kibana/logstash-6.3.2/logs which is now configured
     via log4j2.properties
    ERROR: Pipelines YAML file is empty. Location: D:/kibana/logstash-6.3.2/config/p
    ipelines.yml
    usage:
      bin/logstash -f CONFIG_PATH [-t] [-r] [] [-w COUNT] [-l LOG]
      bin/logstash --modules MODULE_NAME [-M "MODULE_NAME.var.PLUGIN_TYPE.PLUGIN_NAM
    E.VARIABLE_NAME=VALUE"] [-t] [-w COUNT] [-l LOG]
      bin/logstash -e CONFIG_STR [-t] [--log.level fatal|error|warn|info|debug|trace
    ] [-w COUNT] [-l LOG]
      bin/logstash -i SHELL [--log.level fatal|error|warn|info|debug|trace]
      bin/logstash -V [--log.level fatal|error|warn|info|debug|trace]
      bin/logstash --help
    [2018-12-14T16:16:10,809][ERROR][org.logstash.Logstash    ] java.lang.IllegalSta
    teException: Logstash stopped processing because of an error: (SystemExit) exit

I delite all and exctract new code(default configs) and get this error anyway.

like image 892
ip696 Avatar asked Dec 14 '18 13:12

ip696


2 Answers

Looks like you're trying to start your Logstash with multiple pipelines configuration:

When you start Logstash without arguments, it will read the pipelines.yml file and instantiate all pipelines specified in the file. On the other hand, when you use -e or -f, Logstash ignores the pipelines.yml file and logs a warning about it.

You can start Logstash specifying config file location:

logstash -f mypipeline.conf

or you can just configure your pipelines.yml file. I strongly advise to use pipelines configuration becuase it will be easier to expand Logstash in the future and you can specify resources for each pipeline.

An example configuration of pipelines.yml:

- pipeline.id: my_pipeline_name
  path.config: "/path/to/your/config/file.cfg"
  queue.type: persisted
like image 62
Michael Dz Avatar answered Sep 23 '22 05:09

Michael Dz


If have isntalled the logstash recently using brew, just try going to

cd /usr/local/logstash/{version-number}

and run


bin/logstash -f "/path/to/your/pipeline/config.conf" --config.reload.automatic

brew service restart logstash

Source: https://www.elastic.co/guide/en/logstash/current/advanced-pipeline.html

like image 24
Rishi Raj Avatar answered Sep 22 '22 05:09

Rishi Raj