Logstash could not be started because there is already another instance using the configured data directory - Windows7

Hi,

How do i kill multiple instances, i do not wish to run multiple instances of logstash, but however, it is getting created in the background!

How do i kill it in windows 7.

However, on changing the path.data in YML file, i get this below error:

[2018-06-26T09:23:55,708][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
[2018-06-26T09:41:21,604][FATAL][logstash.runner ] An unexpected error occurred! {:error=>#<ArgumentError: Setting "" hasn't been registered>, :backtrace=>["C:/ELK/logstash-6.3.0/logstash-core/lib/logstash/settings.rb:37:in get_setting'", "C:/ELK/logstash-6.3.0/logstash-core/lib/logstash/settings.rb:70:inset_value'", "C:/ELK/logstash-6.3.0/logstash-core/lib/logstash/settings.rb:89:in block in merge'", "org/jruby/RubyHash.java:1343:ineach'", "C:/ELK/logstash-6.3.0/logstash-core/lib/logstash/settings.rb:89:in merge'", "C:/ELK/logstash-6.3.0/logstash-core/lib/logstash/settings.rb:138:invalidate_all'", "C:/ELK/logstash-6.3.0/logstash-core/lib/logstash/runner.rb:279:in execute'", "C:/ELK/logstash-6.3.0/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:inrun'", "C:/ELK/logstash-6.3.0/logstash-core/lib/logstash/runner.rb:238:in run'", "C:/ELK/logstash-6.3.0/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun'", "C:\ELK\logstash-6.3.0\lib\bootstrap\environment.rb:73:in `'"]}
[2018-06-26T09:41:21,620][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Config file :

input {
file {
path => "D:\Temp\KT\TraceLog-2018-06-12T15-28-22.528.log"
}
}

output {
stdout {
codec => rubydebug
}
}

logstash YML

path.data:"C: \ELK\logstash-6.3.0\data1"

Rakesh TS

How do i kill multiple instances, i do not wish to run multiple instances of logstash, but however, it is getting created in the background!

Logstash doesn't start by itself on Windows so this is something you need to dig into on your side.

path.data:"C: \ELK\logstash-6.3.0\data1"

Not sure if it matters but there should be a space after "path.data:". If that doesn't help, post the non-comment lines of your logstash.yml formatted as preformatted text using markdown notation or the </> toolbar button.

i solved it by copying the folder to a different location and installing again ! plus running it using the below command ,

D:\logstash-6.3.0\bin>logstash -f logS.config < "D:\Temp\KT\TraceLog-2018-06-12T
15-47-31.830.log

Config file :

**input {
stdin{

}

}

filter {
grok {
match => {"message" => "<%{WORD:loglevel}>%{TIMESTAMP_ISO8601:timestamp}%{GREEDYDATA:logmessage}'%{PATH:path}'%{WORD:category}%{WORD:user}%{NUMBER:threadid}%{BASE16NUM:errorcode}%{WORD:application}%{WORD:machine}"}
}
}
output {
file {
path => "D:\logstash-6.3.0\data1\output8.csv"
}
}

I don't know for some reason, it isnt working if i pass path in the input {} , the command line keeps executing and nothing happens.

input {
file{
path => "D:\Temp\KT\TraceLog-2018-06-12T15-28-22.528.log"
}

}

the above input {} doesnt work.

What if you append a line to the file with

echo whatever >> D:\logstash-6.3.0\data1\output8.csv

?

I have no problem in getting the output but the input {} component is where im facing issue ! it doesnt work if i add path to the input{}

Sorry, that was the wrong path. This is what I meant:

echo whatever >> D:\Temp\KT\TraceLog-2018-06-12T15-28-22.528.log

The compiler gets stuck there for good ! it doesnt respond.

PFA of theELK screen shot

That's expected with your configuration, but does the "whatever" line end up in output8.csv?

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