Windows 10 logstash config parse error [Expected one of #, {, } at line 11, column 17 ]

Hi,

While loading a CSV file into logstash, I am seeing error about Config's line#11 ( separator => "," ) which looks pretty normal to me. Can someone suggest what's wrong here.

Config:

input {
file {
path => "c:\Work\csvs\toxicity.csv"
start_position => "beginning"
sincedb_path => "c:\Work"
}
}

filter {
csv {
separator => ","
columns => ["pod","client","trader","ric","Side","washbook",
"dollarvalue","hedgedPNL","bps","bps10","commvalue","profit","bpsTotal"]
}
}

output {
elasticsearch {
hosts => "locahost:9200"
index => "Toxicity"
document_type => "Toxicity"
}
stdout {
}
}

Error:
c:\Work\logstash-6.2.4>bin\logstash.bat -f ..\csvs\toxicity.cfg
Sending Logstash's logs to c:/Work/logstash-6.2.4/logs which is now configured via log4j2.properties
[2018-05-23T20:54:33,129][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"c:/Work/logstash-6.2.4/modules/fb_apache/configuration"}
[2018-05-23T20:54:33,162][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"c:/Work/logstash-6.2.4/modules/netflow/configuration"}
[2018-05-23T20:54:33,560][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-05-23T20:54:34,350][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.2.4"}
[2018-05-23T20:54:35,007][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-05-23T20:54:35,279][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, {, } at line 11, column 17 (byte 154) after input {\n\tfile {\n\t\tpath => "c:\Work\csvs\toxicity.csv"\n\t\tstart_position => "beginning"\n\t\tsincedb_path => "c:\Work\"\n\t}\n}\n\nfilter {\n\tcsv {\n\t\tseparator => "", :backtrace=>["c:/Work/logstash-6.2.4/logstash-core/lib/logstash/compiler.rb:42:in compile_imperative'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/compiler.rb:50:in compile_graph'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/compiler.rb:12:in block in compile_sources'", "org/jruby/RubyArray.java:2486:in map'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/compiler.rb:11:in compile_sources'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:51:in initialize'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/pipeline.rb:169:in initialize'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/pipeline_action/create.rb:40:in execute'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:315:in block in converge_state'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:141:in with_pipelines'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:312:in block in converge_state'", "org/jruby/RubyArray.java:1734:in each'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:299:in converge_state'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:166:in block in converge_state_and_update'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:141:in with_pipelines'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:164:in converge_state_and_update'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/agent.rb:90:in execute'", "c:/Work/logstash-6.2.4/logstash-core/lib/logstash/runner.rb:348:in block in execute'",

sincedb_path must be a file path and not a directory path. C:\Work seems directory.

https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#plugins-inputs-file-sincedb_path

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