Error while inserting data from oracle db to Elasticsearch using logstash

Error Log

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) after ", :backtrace=>["/logstash-6.4.2/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'", "/logstash-6.4.2/logstash-core/lib/logstash/compiler.rb:49:incompile_graph'", "/logstash-6.4.2/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2486:inmap'", "/logstash-6.4.2/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:149:ininitialize'", "/logstash-6.4.2/logstash-core/lib/logstash/pipeline.rb:22:in initialize'", "/logstash-6.4.2/logstash-core/lib/logstash/pipeline.rb:90:ininitialize'", "/logstash-6.4.2/logstash-core/lib/logstash/pipeline_action/create.rb:38:in execute'", "/logstash-6.4.2/logstash-core/lib/logstash/agent.rb:309:inblock in converge_state'"]}

Config File:
input {
jdbc {
jdbc_connection_string => "jdbc:oracle:thin:@192.168.4.77:1521:DBgg"
jdbc_user => "baseline"
jdbc_password => "baseline"
jdbc_driver_library => "ojdbc7.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
statement => "SELECT * from ES_TEST"
}
}
output {
elasticsearch {
document_id => "%{id}"
document_type => "test"
index => "es_test"
codec => "json"
hosts => ["192.168.2.22:9200"]
}
}

Version:
Elastic Search 6.4.1
Logstash 6.4.2

Please do the needful

There is a syntax error in the configuration file. Before running Logstash, check the configuration for syntax using the following command.

$ /usr/share/logstash/bin/logstash --config.test_and_exit -f /etc/logstash/conf.d/your_conf_file.conf

1 Like

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