Problem getting logstash started


(Saurabh) #1

Hi,

I am a newbie and trying to use the stack of Elastic Search, Logstash and Kibana working together to parse the apache log file and visualize it.
I started with this URL - https://www.elastic.co/downloads/logstash where in I downloaded logstash and unzipped it on windows.

As per the steps mentioned, I configured a config file name " logstash-simple.conf" and placed it in root directory of logstash. The file has the following content

input { stdin { } }
output {
elasticsearch { hosts => ["localhost:9200"] }
stdout { codec => rubydebug }
}

Post that i executed the following command from bin directory-
logstash -f logstash-simple.conf

However, it gives me an error saying:

An unexpected error occurred! :error => bad URI(is not URI?): file://D:/Software
s/Log Monitoring Stack/logstash-5.2.0/config/log4j2.properties, :backtrace => ["
D:/Softwares/Log Monitoring Stack/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/uri/c
ommon.rb:176:in split'", "D:/Softwares/Log Monitoring Stack/logstash-5.2.0/vend or/jruby/lib/ruby/1.9/uri/common.rb:210:inparse'", "D:/Softwares/Log Monitorin
g Stack/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/uri/common.rb:747:in parse'", "D:/Softwares/Log Monitoring Stack/logstash-5.2.0/vendor/jruby/lib/ruby/1.9/uri/ common.rb:994:inURI'", "D:/Softwares/Log Monitoring Stack/logstash-5.2.0/logst
ash-core/lib/logstash/logging/logger.rb:76:in initialize'", "org/jruby/ext/thre ad/Mutex.java:149:insynchronize'", "D:/Softwares/Log Monitoring Stack/logstash
-5.2.0/logstash-core/lib/logstash/logging/logger.rb:74:in initialize'", "D:/Sof twares/Log Monitoring Stack/logstash-5.2.0/logstash-core/lib/logstash/runner.rb: 198:inexecute'", "D:/Softwares/Log Monitoring Stack/logstash-5.2.0/vendor/bund
le/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run'", "D:/Softwares/L og Monitoring Stack/logstash-5.2.0/logstash-core/lib/logstash/runner.rb:183:in
run'", "D:/Softwares/Log Monitoring Stack/logstash-5.2.0/vendor/bundle/jruby/1.9
/gems/clamp-0.6.5/lib/clamp/command.rb:132:in run'", "D:\\Softwares\\Log Monito ring Stack\\logstash-5.2.0\\lib\\bootstrap\\environment.rb:71:in(root)'"]

I am not sure how to get logstash working. Can someone suggest step by step how can I configure logstash?

Thanks in advance.
Saurabh


(Mark Walkom) #2

Try removing spaces in the path that LS us running under.


(Saurabh) #3

Thanks for your reply. I removed the spaces from the path wheer logstash is installed. After that executed the following command again and this time it worked.
logstash -f logstash-simple.conf

However, I needed to place the config file in BIN folder so that it gets picked up.

Saurabh


(system) #4

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