在 Mapping 里面,将 dynamic 参数设置成 strict 可以拒绝索引包含未知字段的文档。 此条 Tips 由 medcl 贡献。

logstash6启动后出现问题

Logstash | 作者 a863922230 | 发布于2018年06月15日 | 阅读数:5161


[ERROR][logstash.inputs.jdbc] Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLException: The server time zone value is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support."}
一直出现这样的问题,不能解决
已邀请:

a863922230

赞同来自:

详细的错误是:
[2018-06-15T18:43:00,960][ERROR][logstash.inputs.jdbc     ] Unable to connect to database. Tried 1 times {:error_message=>"Java::JavaSql::SQLException: The server time zone value '锟叫癸拷锟斤拷\u05FC时锟斤拷' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support."}
{ 2010 rufus-scheduler intercepted an error:
  2010   job:
  2010     Rufus::Scheduler::CronJob "* * * * *" {}
  2010   error:
  2010     2010
  2010     Sequel::DatabaseConnectionError
  2010     Java::JavaSql::SQLException: The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
  2010       com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:545)
  2010       com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:513)
  2010       com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:505)
  2010       com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:479)
  2010       com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(com/mysql/cj/jdbc/exceptions/SQLError.java:489)
  2010       com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(com/mysql/cj/jdbc/exceptions/SQLExceptionsMapping.java:69)
  2010       com.mysql.cj.jdbc.ConnectionImpl.createNewIO(com/mysql/cj/jdbc/ConnectionImpl.java:1606)
  2010       com.mysql.cj.jdbc.ConnectionImpl.<init>(com/mysql/cj/jdbc/ConnectionImpl.java:633)
  2010       com.mysql.cj.jdbc.ConnectionImpl.getInstance(com/mysql/cj/jdbc/ConnectionImpl.java:347)
  2010       com.mysql.cj.jdbc.NonRegisteringDriver.connect(com/mysql/cj/jdbc/NonRegisteringDriver.java:219)
  2010       java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
  2010       org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:423)
  2010       org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:290)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/adapters/jdbc.rb:203)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.RUBY$method$connect$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/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/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/adapters/jdbc.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.connection_pool.make_new(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/connection_pool.rb:126)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.connection_pool.RUBY$method$make_new$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/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/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/connection_pool.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.connection_pool.threaded.assign_connection(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/connection_pool/threaded.rb:192)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.connection_pool.threaded.RUBY$method$assign_connection$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/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/connection_pool/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/connection_pool/threaded.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.connection_pool.threaded.acquire(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/connection_pool/threaded.rb:133)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.connection_pool.threaded.RUBY$method$acquire$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/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/connection_pool/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/connection_pool/threaded.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.connection_pool.threaded.hold(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/connection_pool/threaded.rb:90)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.database.connecting.synchronize(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/database/connecting.rb:269)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.database.connecting.test_connection(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/database/connecting.rb:279)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.database.connecting.connect(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/database/connecting.rb:58)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.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.core.connect(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/sequel-5.4.0/lib/sequel/core.rb:116)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.plugin_mixins.jdbc.block in jdbc_connect(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/plugin_mixins/jdbc.rb:112)
  2010       org.jruby.RubyKernel.loop(org/jruby/RubyKernel.java:1292)
  2010       org.jruby.RubyKernel$INVOKER$s$0$0$loop.call(org/jruby/RubyKernel$INVOKER$s$0$0$loop.gen)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.plugin_mixins.jdbc.jdbc_connect(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/plugin_mixins/jdbc.rb:109)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.plugin_mixins.jdbc.RUBY$method$jdbc_connect$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/logstash_minus_6_dot_2_dot_2/vendor/bundle/jruby/$2_dot_3_dot_0/gems/logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3/lib/logstash/plugin_mixins/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/plugin_mixins/jdbc.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.plugin_mixins.jdbc.open_jdbc_connection(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/plugin_mixins/jdbc.rb:161)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.plugin_mixins.jdbc.RUBY$method$open_jdbc_connection$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/logstash_minus_6_dot_2_dot_2/vendor/bundle/jruby/$2_dot_3_dot_0/gems/logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3/lib/logstash/plugin_mixins/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/plugin_mixins/jdbc.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.plugin_mixins.jdbc.execute_statement(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/plugin_mixins/jdbc.rb:227)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.plugin_mixins.jdbc.RUBY$method$execute_statement$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/logstash_minus_6_dot_2_dot_2/vendor/bundle/jruby/$2_dot_3_dot_0/gems/logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3/lib/logstash/plugin_mixins/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/plugin_mixins/jdbc.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.inputs.jdbc.execute_query(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/inputs/jdbc.rb:271)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.inputs.jdbc.RUBY$method$execute_query$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/logstash_minus_6_dot_2_dot_2/vendor/bundle/jruby/$2_dot_3_dot_0/gems/logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3/lib/logstash/inputs/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/inputs/jdbc.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.logstash_minus_input_minus_jdbc_minus_4_dot_3_dot_3.lib.logstash.inputs.jdbc.block in run(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.3/lib/logstash/inputs/jdbc.rb:250)
  2010       org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)
  2010       org.jruby.RubyProc.call19(org/jruby/RubyProc.java:273)
  2010       org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.rufus_minus_scheduler_minus_3_dot_0_dot_9.lib.rufus.scheduler.jobs.do_call(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:234)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.rufus_minus_scheduler_minus_3_dot_0_dot_9.lib.rufus.scheduler.jobs.RUBY$method$do_call$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/logstash_minus_6_dot_2_dot_2/vendor/bundle/jruby/$2_dot_3_dot_0/gems/rufus_minus_scheduler_minus_3_dot_0_dot_9/lib/rufus/scheduler/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.rufus_minus_scheduler_minus_3_dot_0_dot_9.lib.rufus.scheduler.jobs.do_trigger(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:258)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.rufus_minus_scheduler_minus_3_dot_0_dot_9.lib.rufus.scheduler.jobs.RUBY$method$do_trigger$0$__VARARGS__(D_3a_/logstash_minus_6_dot_2_dot_2/logstash_minus_6_dot_2_dot_2/vendor/bundle/jruby/$2_dot_3_dot_0/gems/rufus_minus_scheduler_minus_3_dot_0_dot_9/lib/rufus/scheduler/D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.rufus_minus_scheduler_minus_3_dot_0_dot_9.lib.rufus.scheduler.jobs.block in start_work_thread(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:300)
  2010       org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)
  2010       org.jruby.RubyProc.call19(org/jruby/RubyProc.java:273)
  2010       org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.rufus_minus_scheduler_minus_3_dot_0_dot_9.lib.rufus.scheduler.jobs.block in start_work_thread(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:299)
  2010       org.jruby.RubyKernel.loop(org/jruby/RubyKernel.java:1292)
  2010       org.jruby.RubyKernel$INVOKER$s$0$0$loop.call(org/jruby/RubyKernel$INVOKER$s$0$0$loop.gen)
  2010       D_3a_.logstash_minus_6_dot_2_dot_2.logstash_minus_6_dot_2_dot_2.vendor.bundle.jruby.$2_dot_3_dot_0.gems.rufus_minus_scheduler_minus_3_dot_0_dot_9.lib.rufus.scheduler.jobs.block in start_work_thread(D:/logstash-6.2.2/logstash-6.2.2/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:289)
  2010       org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)
  2010       org.jruby.RubyProc.call(org/jruby/RubyProc.java:246)
  2010       java.lang.Thread.run(java/lang/Thread.java:748)
  2010   tz:
  2010     ENV['TZ']:
  2010     Time.now: 2018-06-15 18:43:01 +0800
  2010   scheduler:
  2010     object_id: 2008
  2010     opts:
  2010       {:max_work_threads=>1}
  2010       frequency: 0.3
  2010       scheduler_lock: #<Rufus::Scheduler::NullLock:0x56a314be>
  2010       trigger_lock: #<Rufus::Scheduler::NullLock:0x1fd0f6c6>
  2010     uptime: 13.614 (13s614)
  2010     down?: false
  2010     threads: 2
  2010       thread: #<Thread:0x272a8750>
  2010       thread_key: rufus_scheduler_2008
  2010       work_threads: 1
  2010         active: 1
  2010         vacant: 0
  2010         max_work_threads: 1
  2010       mutexes: {}
  2010     jobs: 1
  2010       at_jobs: 0
  2010       in_jobs: 0
  2010       every_jobs: 0
  2010       interval_jobs: 0
  2010       cron_jobs: 1
  2010     running_jobs: 1
  2010     work_queue: 0
} 2010 .

要回复问题请先登录注册