Logsta sh Синхронизация данных из базы данных MySQL работала в течение нескольких месяцев. Но теперь происходит сбой и отображается следующая ошибка:
2020-03-26T13:40:00,063][ERROR][logstash.inputs.jdbc ]
Unable to connect to database. Tried 1 times
{:error_message=>"Java::ComMysqlJdbcExceptionsJdbc4::CommunicationsException:
Communications link failure\n\nThe last packet successfully received from the
server was 3 milliseconds ago. The last packet sent successfully to the
server was 2 milliseconds ago."}
Вот моя конфигурация Logsta sh:
jdbc_connection_string => "jdbc:mysql://ec2-52-20-227-220.compute-1.amazonaws.com:3306/resource_map"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_user => "...."
jdbc_password => "....."
jdbc_driver_library => "/usr/share/logstash/lib/mysql-connector-java-5.1.47.jar"
statement => "select st.id as site_history_id, st.site_id as site_id , concat('{', '\"name\":\"', coalesce(st.name, ''), '\",\"latitude\":', coalesce(st.lat, 0), ',\"longitude\":', coalesce(st.lng, 0), ',\"collection\":', st.collection_id, ',' ,group_concat(concat('\"', cast(fd.code as char(50)), '\":' , concat('\"', cast(json_extract_c(st.properties, concat('$.', fd.id)) as char character set utf8) ,'\"'))), ',\"createdAt\":\"', cast(st.created_at as char(50)), '\"}') as property
from site_histories as st join fields as fd on fd.collection_id = st.collection_id
where st.id > :sql_last_value and st.collection_id = 32
group by st.id
order by site_history_id;"
schedule => "*/3 * * * *"
use_column_value => true
tracking_column => site_history_id
last_run_metadata_path => "/usr/share/logstash/logs/last_run_metadata"
Чего мне не хватает?