yuliansen
yuliansen

Reputation: 520

logstash not runs config

I'm using filebeat on client side > logstash on serverside > elasticsearch on server side

filebeat on clientside works properly by sending file, but the configuration i've made on logstash returning

Fail

[WARN ] 2019-12-18 14:53:30.987 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[FATAL] 2019-12-18 14:53:31.341 [LogStash::Runner] runner - Logstash could not be started because there is already another instance using the configured data directory.  If you wish to run multiple instances, you must change the "path.data" setting.
[ERROR] 2019-12-18 14:53:31.364 [LogStash::Runner] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Here is my configfile

input {
 beats {
  port =>5044
}
}
filter {
        grok    {
                 match => { "message" =>"%{TIMESTAMP_ISO8601:timestamp}] %{WORD:test}\[%{NUMBER:nom}]\[%{DATA:tes}\] %{DATA:module_name}\: %{WORD:method}%{GREEDYDATA:log_message}" }
                }
        }
output {
         elasticsearch
        {
        hosts => "127.0.0.1:9200"
        index=>"test_log_pbx"
}
}

code to run my logstash config

/usr/share/logstash/bin/logstash -f logstash.conf

when i run configtest it returns

Thread.exclusive is deprecated, use Thread::Mutex
WARNING: Could not find logstash.yml which is typically located in $LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults
Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console
[WARN ] 2019-12-18 14:59:53.300 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified
[INFO ] 2019-12-18 14:59:56.566 [LogStash::Runner] Reflections - Reflections took 139 ms to scan 1 urls, producing 20 keys and 40 values
Configuration OK
[INFO ] 2019-12-18 14:59:57.923 [LogStash::Runner] runner - Using config.test_and_exit mode. Config Validation Result: OK. Exiting Logstash

please help me i dont know whats wrong

Upvotes: 0

Views: 418

Answers (1)

Orkun
Orkun

Reputation: 512

A logstash instance already running, so you can not run another instance.If you made your logstash as service, you should stop the service. If you want to run multiple instances, you should modify pipelines.yml

If you want to learn more about pipelines.yml, I put link the below.

https://www.elastic.co/guide/en/logstash/current/multiple-pipelines.html

Upvotes: 1

Related Questions