MySQL connection error


(emma) #1

input {
jdbc {
jdbc_driver_library => "ELK/logstash-6.2.3/logstash-6.2.3/bin/mysql-connector-java-5.1.47-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/crowdsourcing"
jdbc_user => "root"
jdbc_password => "password"
statement => "select * from tbl_chatbot_answers"
clean_run => true

}
}
filter {
mutate { convert => {"answer_id" => "int"} }
mutate { convert => {"rstatus" => "int"} }
}
output{
elasticsearch {
hosts => ["localhost:9200"]
index => "crowdsourcing"
}
stdout { codec => rubydebug { metadata => true } }

stdout { codec => dots }

}

The above is my config file for sending data from mysql to kibana.
But it is throwing an error like
Error registering plugin {:pipeline_id=>"main", :plugin=>"#<LogStash::FilterDelegator:0x58d9f8a @metric_events_out=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: out value:0, @metric_events_in=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: in value:0, @metric_events_time=org.jruby.proxy.org.logstash.instrument.metrics.counter.LongCounter$Proxy2 - name: duration_in_millis value:0, @id="c9053c610a1e1af3889c6fb3a4adc3dd108203521e4c20d76fad89aa0efd4273", @klass=LogStash::Filters::Mutate, @metric_events=#<LogStash::Instrument::NamespacedMetric:0x3fb788d1 @metric=#<LogStash::Instrument::Metric:0x1a32f894 @collector=#<LogStash::Instrument::Collector:0x7cf71326 @agent=nil, @metric_store=#<LogStash::Instrument::MetricStore:0x15efa2fd @store=#<Concurrent::map:0x00000000000fb0 entries=3 default_proc=nil>, @structured_lookup_mutex=#Mutex:0x5fcca3f7, @fast_lookup=#<Concurrent::map:0x00000000000fb4 entries=67 default_proc=nil>>>>, @namespace_name=[:stats, :pipelines, :main, :plugins, :filters, :c9053c610a1e1af3889c6fb3a4adc3dd108203521e4c20d76fad89aa0efd4273, :events]>, @filter=<LogStash::Filters::Mutate convert=>{"answer_id"=>"int"}, id=>"c9053c610a1e1af3889c6fb3a4adc3dd108203521e4c20d76fad89aa0efd4273", enable_metric=>true, periodic_flush=>false>>", :error=>"translation missing: en.logstash.agent.configuration.invalid_plugin_register", :thread=>"#<Thread:0x4b31541a run>"}
[2018-10-05T16:02:45,300][ERROR][logstash.pipeline ] Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<LogStash::ConfigurationError: translation missing: en.logstash.agent.configuration.invalid_plugin_register>, :backtrace=>["C:/ELK/logstash-6.2.3/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.3.1/lib/logstash/filters/mutate.rb:219:in block in register'", "org/jruby/RubyHash.java:1343:ineach'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/vendor/bundle/jruby/2.3.0/gems/logstash-filter-mutate-3.3.1/lib/logstash/filters/mutate.rb:217:in register'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:341:inregister_plugin'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:352:in block in register_plugins'", "org/jruby/RubyArray.java:1734:ineach'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:352:in register_plugins'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:736:inmaybe_setup_out_plugins'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:362:in start_workers'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:289:inrun'", "C:/ELK/logstash-6.2.3/logstash-6.2.3/logstash-core/lib/logstash/pipeline.rb:249:in `block in start'"], :thread=>"#<Thread:0x4b31541a run>"}
[2018-10-05T16:02:45,453][ERROR][logstash.agent ] Failed to execute action {:id=>:main, :action_type=>LogStash::ConvergeResult::FailedAction, :message=>"Could not execute action: LogStash::PipelineAction::Create/pipeline_id:main, action_result: false", :backtrace=>nil}


(Magnus B├Ąck) #2

mutate { convert => {"answer_id" => "int"} }

"integer", not "int". See https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html#plugins-filters-mutate-convert.


(system) #3

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