Issue in Logstash installation on Windows

Hello all,
I am completely new to logstash. I began with downloading logstash for windows zip file, unzipped it in d drive. Now i am trying to cmd D:\logstash-6.3.0\bin>logstash. Its giving me following error:

Sending Logstash's logs to D:/logstash-6.3.0/logs which is now configured via log4j2.properties
[2018-06-21T17:49:26,207][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.queue", :path=>"D:/logstash-6.3.0/data/queue"}
[2018-06-21T17:49:26,229][INFO ][logstash.setting.writabledirectory] Creating directory {:setting=>"path.dead_letter_queue", :path=>"D:/logstash-6.3.0/data/dead_letter_queue"}
ERROR: Pipelines YAML file is empty. Location: D:/logstash-6.3.0/config/pipelines.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_NAME.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-06-21T17:49:26,622][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

When i am trying to run this command : D:\logstash-6.3.0\bin>logstash -e 'input { stdin { } } output { stdout {} }'
then its giving this error:

ERROR: Unknown command '{'

See: 'bin/logstash --help'
[ERROR] 2018-06-21 17:52:53.195 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Is anyone having any idea on how to resolve this. I am stuck in the first step itself.
Thanks in advance

1 Like

You double quotes instead of single quotes in your command.

5 Likes

Hey Magnusbaeck,

Thanks for your input . It worked :slight_smile: :slight_smile:
Cheers

1 Like

Hello,
I am trying to execute this command: "Q1E:/usr/share/logstash$./bin/logstash -f /home/aymenstien/Bureau/fb.conf"
but i am getting an error, please find below the execution result:

aymenstien@aymenstien-VPCEH2Q1E:/usr/share/logstash$ ./bin/logstash -f /home/aymenstien/Bureau/fb.conf
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
[FATAL] 2018-07-05 12:47:56.496 [main] runner - An unexpected error occurred! {:error=>#<ArgumentError: Path "/usr/share/logstash/data" must be a writable directory. It is not writable.>, :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/settings.rb:448:in validate'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:230:invalidate_value'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:141:in block in validate_all'", "org/jruby/RubyHash.java:1343:ineach'", "/usr/share/logstash/logstash-core/lib/logstash/settings.rb:140:in validate_all'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:279:inexecute'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run'", "/usr/share/logstash/logstash-core/lib/logstash/runner.rb:238:inrun'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:in run'", "/usr/share/logstash/lib/bootstrap/environment.rb:73:in'"]}
[ERROR] 2018-07-05 12:47:56.554 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit

Can anyone help me?

Probably you can try running following commands in cmd of your logstash/bin

logstash -f fb.conf --config.test_and_exit

logstash -f fb.conf --config.reload.automatic

@Aymen_Rahal, please start a new topic. Your question has nothing to do with the original question.

I have the same issue as Shweta did (my system is Windows 2012 R2, logstash 6.3.1):

I don't see any double quotes in his command:

And I don't have them in mine.

So, what exactly did help to resolve this issue?
Thanks.

I have found similar error reported here: -e doesn't work using logstash image from docker.elastic.co

Hi Oleh,
Just put double quotes in : 'input { stdin { } } output { stdout {} }'
in place of single quotes , like this :
"'input { stdin { } } output { stdout {} }"

This had worked for me

2 Likes

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