Expected one of #, input, filter, output in logstash

I am trying to do the installation of logstash just by running the command in the documentation to respond to what has ever been printed. But that gives me the following error.

My team

C:\logstash-1.4.0\bin>logstash.bat agent -e 'input{stdin{}}output{stdout{}}' 

And mistake

  Error: Expected one of #, input, filter, output at line 1, column 1 (byte 1) aft er You may be interested in the '--configtest' flag which you can use to validate logstash configuration before you choose to restart a running system." 

Please help. Thanks in advance!

+4
source share
3 answers

I am testing using logstash-1.4.0 on linux with this tutorial .

I think this may be a bug in this version.

For example, I am testing this command both on Linux and in a window. Everything is fine on Linux. But this will result in your window error!

bin> logstash agent -e 'input {stdin {}} output {stdout {}}'

According to my recommendation, you can write your configuration in a file. For example, save input{stdin{}}output{stdout{}} in a call to the file "stdin.conf". Then, when you start logstash, do not use the -e flag, but use -f and specify your configuration file.

bin> logstash agent -f stdin.conf

Hope this helps you.

+5
source

Try it without quotes

 C:\logstash-1.4.0\bin>logstash.bat agent -e input{stdin{}}output{stdout{}} 
+3
source

I get this error when I run -e with --debug . I need to remove -e . Example:

 GEM_HOME="/opt/logstash/vendor/bundle/jruby/1.9/" /usr/lib/jvm/java-1.6.0/bin/java -server -Xms765M -Xmx2297M -Djava.io.tmpdir=/opt/logstash/forwarder/tmp/ -Xmx2297M -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Djava.awt.headless=true -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -jar /opt/logstash/forwarder/vendor/jar/jruby-complete-1.7.11.jar -I/opt/logstash/forwarder/lib /opt/logstash/forwarder/lib/logstash/runner.rb agent -f /opt/logstash/forwarder/etc/conf.d/ -l /opt/logstash/forwarder/log/logstash.log -w 1 --debug 
0
source

All Articles