my configuration file
input{
jdbc {
jdbc_connection_string => "jdbc:mysql://localhost:3307/demo"
jdbc_user => "root"
jdbc_password => "pavitra"
jdbc_validate_connection => true
jdbc_driver_library => "mysql-connector-java-5.1.16-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
statement => "Select * from city"
}
}
output{
stdout { codec => json_lines }
}
running it using
C:\Program Files (x86)\logstash-6.3.2>bin\logstash -f E:\data\db.conf
and getting the following error
Sending Logstash's logs to C:/Program Files (x86)/logstash-6.3.2/logs which is now configured via log4j2.properties
[2018-08-16T14:44:16,263][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2018-08-16T14:44:16,841][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"6.3.2"}
[2018-08-16T14:44:18,448][INFO ][logstash.pipeline ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>8, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2018-08-16T14:44:18,776][INFO ][logstash.pipeline ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x66f1950d sleep>"}
[2018-08-16T14:44:18,823][INFO ][logstash.agent ] Pipelines running {:count=>1, :running_pipelines=>[:main], :non_running_pipelines=>[]}
[2018-08-16T14:44:19,136][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2018-08-16T14:44:19,760][ERROR][logstash.inputs.jdbc ] Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMysqlJdbcExceptionsJdbc4::MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client"}
[2018-08-16T14:44:19,776][ERROR][logstash.pipeline ] A plugin had an unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Jdbc jdbc_connection_string=>"jdbc:mysql://localhost:3307/demo", jdbc_user=>"root", jdbc_password=>, jdbc_validate_connection=>true, jdbc_driver_library=>"C:\Program Files (x86)\logstash-6.3.2\bin\mysql-connector-java-5.1.16-bin.jar", jdbc_driver_class=>"com.mysql.jdbc.Driver", statement=>"Select * from city", id=>"7f79a2db500811024d0d70ea793d3b1084698b8a9c2bc810fecdc5025be8d629", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_a4fd7c9e-3173-4b5d-8abb-57ba5b85a376", enable_metric=>true, charset=>"UTF-8">, jdbc_paging_enabled=>false, jdbc_page_size=>100000, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, parameters=>{"sql_last_value"=>1970-01-01 05:30:00 +0530}, last_run_metadata_path=>"C:\Users\pavitra malpani/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true>
Error: Java::ComMysqlJdbcExceptionsJdbc4::MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client
Exception: Sequel::DatabaseConnectionError
Stack: java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:423)
com.mysql.jdbc.Util.handleNewInstance(com/mysql/jdbc/Util.java:411)
com.mysql.jdbc.Util.getInstance(com/mysql/jdbc/Util.java:386)
com.mysql.jdbc.SQLError.createSQLException(com/mysql/jdbc/SQLError.java:1013)
com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:3597)
com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:3529)
com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:935)
com.mysql.jdbc.MysqlIO.secureAuth411(com/mysql/jdbc/MysqlIO.java:4101)
com.mysql.jdbc.MysqlIO.doHandshake(com/mysql/jdbc/MysqlIO.java:1300)
com.mysql.jdbc.ConnectionImpl.coreConnect(com/mysql/jdbc/ConnectionImpl.java:2337)
com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(com/mysql/jdbc/ConnectionImpl.java:2370)
com.mysql.jdbc.ConnectionImpl.createNewIO(com/mysql/jdbc/ConnectionImpl.java:2154)
com.mysql.jdbc.ConnectionImpl.(com/mysql/jdbc/ConnectionImpl.java:792)
com.mysql.jdbc.JDBC4Connection.(com/mysql/jdbc/JDBC4Connection.java:47)
java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:423)
com.mysql.jdbc.Util.handleNewInstance(com/mysql/jdbc/Util.java:411)
com.mysql.jdbc.ConnectionImpl.getInstance(com/mysql/jdbc/ConnectionImpl.java:381)
com.mysql.jdbc.NonRegisteringDriver.connect(com/mysql/jdbc/NonRegisteringDriver.java:305)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)