Reputation: 1861
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.
Upvotes: 7
Views: 23028
Reputation: 375
FYI mine complains about line about line 163 and my combined files don't get that far.
Upvotes: 1
Reputation: 3130
Here someone had left an ~.vimrc file in the conf.d directory, which was then appended to the big configuration file.
--configtest probably ignores the file, but reading configs did not.
Upvotes: 0
Reputation: 16362
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.
Upvotes: 28