Hi, I am facing an issue.
can anyone help me out this.
config.code:
input {
jdbc {
jdbc_connection_string => "jdbc:mysql://192.168.10.111:3306/MTv5"
# The user we wish to execute our statement as
jdbc_user => "readuser"
jdbc_password => "es_pass"
jdbc_password_filepath => "C:\logstash-6.7.0\config"
# The path to our downloaded jdbc driver
jdbc_driver_library => "C:\logstash-6.7.0\bin\mysql-connector-java-8.0.13.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
# our query
statement => "Select * from MTv5.University_Details"
}
}
output {
stdout { codec => json_lines }
elasticsearch {
"hosts" => "localhost:9200"
"index" => "variable"
}
}
C:\logstash-6.7.0\bin>logstash -f validation.conf
Sending Logstash logs to C:/logstash-6.7.0/logs which is now configured via log4j2.properties
[2019-12-03T18:28:03,153][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-12-03T18:28:03,171][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.7.0"}
[2019-12-03T18:28:09,721][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2019-12-03T18:28:10,138][INFO ][logstash.outputs.elasticsearch] Elasticsearch pool URLs updated {:changes=>{:removed=>, :added=>[http://localhost:9200/]}}
[2019-12-03T18:28:10,331][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://localhost:9200/"}
[2019-12-03T18:28:10,393][INFO ][logstash.outputs.elasticsearch] ES Output version determined {:es_version=>6}
[2019-12-03T18:28:10,399][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the type
event field won't be used to determine the document _type {:es_version=>6}
[2019-12-03T18:28:10,436][INFO ][logstash.outputs.elasticsearch] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//localhost:9200"]}
[2019-12-03T18:28:10,449][INFO ][logstash.outputs.elasticsearch] Using default mapping template
[2019-12-03T18:28:10,481][INFO ][logstash.outputs.elasticsearch] Attempting to install template {:manage_template=>{"template"=>"logstash-", "version"=>60001, "settings"=>{"index.refresh_interval"=>"5s"}, "mappings"=>{"default"=>{"dynamic_templates"=>[{"message_field"=>{"path_match"=>"message", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false}}}, {"string_fields"=>{"match"=>"", "match_mapping_type"=>"string", "mapping"=>{"type"=>"text", "norms"=>false, "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}}], "properties"=>{"@timestamp"=>{"type"=>"date"}, "@version"=>{"type"=>"keyword"}, "geoip"=>{"dynamic"=>true, "properties"=>{"ip"=>{"type"=>"ip"}, "location"=>{"type"=>"geo_point"}, "latitude"=>{"type"=>"half_float"}, "longitude"=>{"type"=>"half_float"}}}}}}}}
[2019-12-03T18:28:10,759][ERROR][logstash.pipeline ] Error registering plugin {:pipeline_id=>"main", :plugin=>"<LogStash::Inputs::Jdbc jdbc_user=>"readuser", jdbc_password_filepath=>"C:\\logstash-6.7.0\\config", jdbc_password=>, statement=>"Select * from MTv5.University_Details", jdbc_driver_library=>"C:\\logstash-6.7.0\\bin\\mysql-connector-java-8.0.13.jar", jdbc_connection_string=>"jdbc:mysql://192.168.10.111:3306/MTv5", id=>"c7150c965f5e9f25f94c2a7488b611e151ff4cf74b66258d89e75dad8faee6e3", jdbc_driver_class=>"com.mysql.jdbc.Driver", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_952cc36e-34de-4856-9fc7-cf437c597b4a", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, last_run_metadata_path=>"C:\\Users\\Sampath/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>", :error=>"Only one of :jdbc_password, :jdbc_password_filepath may be set at a time.", :thread=>"#<Thread:0x51fc5982 run>"}
[2019-12-03T18:28:11,452][ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: Only one of :jdbc_password, :jdbc_password_filepath may be set at a time.>, :backtrace=>["C:/logstash-6.7.0/vendor/bundle/jruby/2.5.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:228:in register'", "C:/logstash-6.7.0/logstash-core/lib/logstash/pipeline.rb:259:in
register_plugin'", "C:/logstash-6.7.0/logstash-core/lib/logstash/pipeline.rb:270:in block in register_plugins'", "org/jruby/RubyArray.java:1792:in
each'", "C:/logstash-6.7.0/logstash-core/lib/logstash/pipeline.rb:270:in register_plugins'", "C:/logstash-6.7.0/logstash-core/lib/logstash/pipeline.rb:413:in
start_inputs'", "C:/logstash-6.7.0/logstash-core/lib/logstash/pipeline.rb:311:in start_workers'", "C:/logstash-6.7.0/logstash-core/lib/logstash/pipeline.rb:217:in
run'", "C:/logstash-6.7.0/logstash-core/lib/logstash/pipeline.rb:176:in `block in start'"], :thread=>"#<Thread:0x51fc5982 run>"}
[2019-12-03T18:28:11,483][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: PipelineAction::Create, action_result: false", :backtrace=>nil}
[2019-12-03T18:28:11,867][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}