fluent-plugin-mysql-replicator
fluent-plugin-mysql-replicator copied to clipboard
mysql_replicator: failed to execute query.error
<source>
@type mysql_replicator
host XXX
username XXX
password XXX
database xxxx
prepared_query SELECT * FROM xxx WHERE CreationTime > '2021-01-01 00:00:00.000000';
query SELECT * FROM xxx WHERE CreationTime > '2021-01-01 00:00:00.000000';
primary_key Id
interval 5s
enable_delete yes
tag replicator.xxx.${event}.${primary_key}
</source>
<match replicator.**>
@type mysql_replicator_elasticsearch
host XXXX
port 9200
tag_format (?<index_name>[^\.]+)\.(?<type_name>[^\.]+)\.(?<event>[^\.]+)\.(?<primary_key>[^\.]+)$
flush_interval 5s
max_retry_wait 1800
index_name fluentd.${tag}.%Y%m%d
flush_at_shutdown yes
buffer_type file
buffer_path /var/log/td-agent/buffer/mysql_replicator_elasticsearch
</match>
td-agent log
2022-02-20 12:24:01 +0800 [info]: #0 starting fluentd worker pid=825716 ppid=825711 worker=0
2022-02-20 12:24:01 +0800 [info]: #0 fluentd worker is now running worker=0
2022-02-20 12:24:01 +0800 [error]: #0 mysql_replicator: failed to execute query.
2022-02-20 12:24:01 +0800 [error]: #0 error: bad value for range
2022-02-20 12:24:01 +0800 [error]: #0 /opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-mysql-replicator-1.0.2/lib/fluent/plugin/in_mysql_replicator.rb:103:in `block in poll'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-mysql-replicator-1.0.2/lib/fluent/plugin/in_mysql_replicator.rb:59:in `loop'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-mysql-replicator-1.0.2/lib/fluent/plugin/in_mysql_replicator.rb:59:in `poll'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluent-plugin-mysql-replicator-1.0.2/lib/fluent/plugin/in_mysql_replicator.rb:46:in `run'
/opt/td-agent/lib/ruby/gems/2.7.0/gems/fluentd-1.14.3/lib/fluent/plugin_helper/thread.rb:78:in `block in thread_create'
SQL syntax is correct
table setting
I don't understand what "error: bad value for range" points to? Or can anyone guide me how to debug the plugin?