I have a sample logstash conf file, However when I. run it I can see a logstash error caused
Error is
[371de1f7cad8c35c02e4a3047ec831da42b9b5048183b45a3916162ab248f3f7] Exception when executing JDBC query {:exception=>"Java::ComMysqlCjJdbcExceptions::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."}
Below is the logstash config file:
input {
jdbc {
jdbc_driver_library => "/usr/share/logstash/mysql-connector-java-8.0.22.jar"
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://xxx-1.x-xxxefxxxdxxxo3.us-east-2.rds.amazonaws.com:3306/sercdb_dev"
jdbc_user => "user"
jdbc_password => "pass"
sql_log_level => "debug" # Set Logstash logging level as this
clean_run => true # Set to true for indexing from scratch
record_last_run => false
tracking_column => "id"
statement => "SELECT * FROM people"
}
}
## Add your filters / logstash plugins configuration here
output {
elasticsearch {
hosts => "elasticsearch:9200"
user => "elastic"
password => "elastic"
ecs_compatibility => disabled
index => "users"
action => "index"
document_id => "%{id}"
}
}