LogStash::ConfigurationError", :message=>"Expected one of #, input, filter, output at line 1, column 1 (byte 1)

Hi ,

I am trying pull data from oracle table to elastic search but i am getting below error,
Any one please tell me how to fix this issue.

conf file :

input {
jdbc {
jdbc_driver_library => "C:\Product\SabaWeb\lib\ojdbc6.jar"
jdbc_driver_class => "oracle.jdbc.driver.OracleDriver"
jdbc_connection_string => "jdbc:oracle:thin:@//localhost:1521/orcl"
jdbc_user => "tp2_cls"
jdbc_password => "tp2cls"
statement => "select * from test"

}
}

output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "test"
document_type => "_doc"
documnet_id => "%{id}"
}
stdout{
codec => rubydebug
}
}

Error :

[2019-08-30T11:36:55,871][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-08-30T11:36:55,928][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"7.2.0"}
[2019-08-30T11:36:57,699][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, input, filter, output at line 1, column 1 (byte 1)", :backtrace=>["C:/Users/shswamin/Downloads/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'", "C:/Users/shswamin/Downloads/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:49:incompile_graph'", "C:/Users/shswamin/Downloads/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2577:inmap'", "C:/Users/shswamin/Downloads/logstash-7.2.0/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:151:ininitialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in initialize'", "C:/Users/shswamin/Downloads/logstash-7.2.0/logstash-core/lib/logstash/java_pipeline.rb:24:ininitialize'", "C:/Users/shswamin/Downloads/logstash-7.2.0/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "C:/Users/shswamin/Downloads/logstash-7.2.0/logstash-core/lib/logstash/agent.rb:325:inblock in converge_state'"]}
[2019-08-30T11:36:58,419][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2019-08-30T11:37:02,971][INFO ][logstash.runner ] Logstash shut down.

Is path.config (or -f) pointing to a directory? If so, logstash will read every file in the directory and treat it as part of the configuration.

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