Connect kinsta mysql

I want to connect my kinsta DB to visualize on kibana. but error when i run .conf in logstash.

its my .conf =

  input {
    	jdbc {
    		jdbc_connection_string => "jdbc:mysql://35.187.353.208/db?useSSL=true&verifyServerCertificate=false&requireSSL=true"
    		jdbc_user => "user"
    		jdbc_password => "********"
    		jdbc_validate_connection => true
    		jdbc_driver_library => "C:\mysqlconnector\mysql-connector-java-5.1.48\mysql-connector-java-5.1.48-bin.jar"
    		jdbc_driver_class => "com.mysql.jdbc.Driver"
    		statement => "SELECT * FROM table"
    	}
    }
    output {
    	elasticsearch {
    		"hosts" => "localhost:9200"
    		"index" => "name-sql"
    		"document_type" => "data" 
    		"document_id" => "%{personid}"
    	}
    	stdout { codec => rubydebug }
    }

error :

  [2019-08-21T17:35:19,334][ERROR][logstash.inputs.jdbc     ] Unable to connect to database. Tried 1 times {:error_message=>"Java::ComMysqlJdbcExceptionsJdbc4::CommunicationsException: Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server."}
[2019-08-21T17:35:19,353][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://35.187.252.208/pointstarsg?useSSL=true&verifyServerCertificate=false&requireSSL=true", jdbc_user=>"pointstarsg", jdbc_password=><password>, jdbc_validate_connection=>true, jdbc_driver_library=>"C:\\mysqlconnector\\mysql-connector-java-5.1.48\\mysql-connector-java-5.1.48-bin.jar", jdbc_driver_class=>"com.mysql.jdbc.Driver", statement=>"SELECT * FROM wp_comments", id=>"e9df7b6846f48d2a53ea3ca9917921d4a224ef939dc12a7bfa9e23aecb5e38f6", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_e16069a3-ebda-421c-a802-5642cc86fce0", 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 00:00:00 UTC}, last_run_metadata_path=>"C:\\Users\\Point Star/.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::CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
  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:425)
com.mysql.jdbc.SQLError.createCommunicationsException(com/mysql/jdbc/SQLError.java:990)
com.mysql.jdbc.MysqlIO.<init>(com/mysql/jdbc/MysqlIO.java:335)
com.mysql.jdbc.ConnectionImpl.coreConnect(com/mysql/jdbc/ConnectionImpl.java:2187)
com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(com/mysql/jdbc/ConnectionImpl.java:2220)
com.mysql.jdbc.ConnectionImpl.createNewIO(com/mysql/jdbc/ConnectionImpl.java:2015)
com.mysql.jdbc.ConnectionImpl.<init>(com/mysql/jdbc/ConnectionImpl.java:768)
com.mysql.jdbc.JDBC4Connection.<init>(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:425)
com.mysql.jdbc.ConnectionImpl.getInstance(com/mysql/jdbc/ConnectionImpl.java:385)
com.mysql.jdbc.NonRegisteringDriver.connect(com/mysql/jdbc/NonRegisteringDriver.java:323)
java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:423)
org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:290)
C_3a_.elastic.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.sequel_minus_5_dot_4_dot_0.lib.sequel.adapters.jdbc.connect(C:/elastic/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/adapters/jdbc.rb:203)

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