Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Expected one of #, input, filter, output at line 24, column 1 (byte 528) after "}

I am able to run logstash as:

bin/logstash -f /etc/logstash/conf.d/config.json

but running logstash as a service

sudo service logstash start

is giving me the following error:

... Error: Expected one of #, input, filter, output at line 24, column 1 (byte 528) after "}

Not sure what I am doing wrong here? Configtest also says the config file is fine.

bin/logstash -f /etc/logstash/conf.d/config.json --configtest
Configuration OK

Any help is appreciated.

Thanks.

like image 569
lex Avatar asked Dec 08 '15 19:12

lex


2 Answers

When logstash runs, it combines all the files in your config directory into one file. When there's an error, you're getting line and position information into that merged config.

Try:

cat /etc/logstash/conf.d/* > /tmp/total.conf

and then look at line 24 or 25 there.

like image 56
Alain Collins Avatar answered Oct 26 '22 08:10

Alain Collins


FYI mine complains about line about line 163 and my combined files don't get that far.

like image 28
Dave Hodgkinson Avatar answered Oct 26 '22 08:10

Dave Hodgkinson