要不要再翻翻文档呢?

使用logstash同步MySQL数据到es,报以下错误,求解决办法

Logstash | 作者 Blithe15 | 发布于2021年02月23日 | 阅读数:126

我的conf文件内容如下:
input {
stdin{
}
jdbc {
jdbc_connection_string => "jdbc:mysql://10.154.12.176:3306/geo_ori"
jdbc_user => ""
jdbc_password => ""
jdbc_driver_library => "useradmin/home/useradmin/elk/logstash/lib/mysql-connector-java-8.0.13.jar"
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
statement => "select * from tk_base_asset"
schedule => "* * * * *"
type => "_doc"
}
}
filter {
json {
source => "message"
remove_field => ["message"]
}
}
output {
elasticsearch {
hosts => "10.154.24.10:9200"
index => "address"
document_id => "%{asset_id}"
}
stdout {
codec => json_lines
}
}
报错如下:
[2021-02-23T15:10:45,613][ERROR][logstash.javapipeline ][main] A plugin had an
unrecoverable error. Will restart this plugin.
Pipeline_id:main
Plugin: <LogStash::Inputs::Jdbc jdbc_user=>"mapsys", schedule=>"* * * * *", jdbc_paging_enabled=>true, jdbc_password=><password>, jdbc_page_size=>50000, statement=>"select * from tk_base_asset", jdbc_driver_library=>"useradmin/home/useradmin/elk/logstash/lib/mysql-connector-java-8.0.13.jar", jdbc_connection_string=>"jdbc:mysql://10.154.12.176:3306/geo_ori", id=>"94a08d174e055f1a940aff01788cf70d75de2924f87b6798c9952d7cf23f0c2a", jdbc_driver_class=>"com.mysql.cj.jdbc.Driver", type=>"_doc", enable_metric=>true, codec=><LogStash::Codecs::Plain id=>"plain_e688c76e-1649-4741-9ac3-f86313d37ccf", enable_metric=>true, charset=>"UTF-8">, jdbc_validate_connection=>false, jdbc_validation_timeout=>3600, jdbc_pool_timeout=>5, sql_log_level=>"info", connection_retry_attempts=>1, connection_retry_attempts_wait_time=>0.5, plugin_timezone=>"utc", last_run_metadata_path=>"/home/useradmin/.logstash_jdbc_last_run", use_column_value=>false, tracking_column_type=>"numeric", clean_run=>false, record_last_run=>true, lowercase_column_names=>true, use_prepared_statements=>false>
Error: unable to load useradmin/home/useradmin/elk/logstash/lib/mysql-connector-java-8.0.13.jar from :jdbc_driver_library, file not readable (please check user and group permissions for the path)
Exception: LogStash::PluginLoadingError
Stack: /home/useradmin/elk/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:172:in `block in load_driver_jars'
org/jruby/RubyArray.java:1814:in `each'
/home/useradmin/elk/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:167:in `load_driver_jars'
/home/useradmin/elk/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/plugin_mixins/jdbc/jdbc.rb:148:in `load_driver'
/home/useradmin/elk/logstash/vendor/bundle/jruby/2.5.0/gems/logstash-integration-jdbc-5.0.1/lib/logstash/inputs/jdbc.rb:273:in `run'
/home/useradmin/elk/logstash/logstash-core/lib/logstash/java_pipeline.rb:328:in `inputworker'
/home/useradmin/elk/logstash/logstash-core/lib/logstash/java_pipeline.rb:320:in `block in start_input'
[2021-02-23T15:10:45,628][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
已邀请:

要回复问题请先登录注册