JDBC input Value tracking, "Can't dup Fixnum"


(guocf) #1

rufus-scheduler intercepted an error:
2030 job:
2030 Rufus::Scheduler::CronJob "*/1 * * * *" {}
2030 error:
2030 2030
2030 TypeError
2030 can't dup Fixnum
2030 org/jruby/RubyKernel.java:1882:in dup' 2030 uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/date/format.rb:838:in_parse'
2030 uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/date.rb:1830:in parse' 2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/value_tracking.rb:87:inset_value'
2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/plugin_mixins/jdbc/jdbc.rb:237:in execute_statement' 2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:277:inexecute_query'
2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/logstash-input-jdbc-4.3.13/lib/logstash/inputs/jdbc.rb:258:in block in run' 2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:234:indo_call'
2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:258:in do_trigger' 2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:300:inblock in start_work_thread'
2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:299:in block in start_work_thread' 2030 org/jruby/RubyKernel.java:1292:inloop'
2030 /home/es/logstash-6.4.1/vendor/bundle/jruby/2.3.0/gems/rufus-scheduler-3.0.9/lib/rufus/scheduler/jobs.rb:289:in `block in start_work_thread'
2030 tz:
2030 ENV['TZ']:
2030 Time.now: 2018-09-30 03:52:00 -0700
2030 scheduler:
2030 object_id: 2008
2030 opts:
2030 {:max_work_threads=>1}
2030 frequency: 0.3
2030 scheduler_lock: #Rufus::Scheduler::NullLock:0x12fe432a
2030 trigger_lock: #Rufus::Scheduler::NullLock:0x67666c6b
2030 uptime: 623.324875 (10m23s324)
2030 down?: false
2030 threads: 2
2030 thread: #Thread:0x3a2a6394
2030 thread_key: rufus_scheduler_2008
2030 work_threads: 1
2030 active: 1
2030 vacant: 0
2030 max_work_threads: 1
2030 mutexes: {}
2030 jobs: 1
2030 at_jobs: 0
2030 in_jobs: 0
2030 every_jobs: 0
2030 interval_jobs: 0
2030 cron_jobs: 1
2030 running_jobs: 1
2030 work_queue: 0

what is matter about this problem ?


(Guy Boertje) #2

The error is in /plugin_mixins/jdbc/value_tracking.rb:87:in 'set_value' where the tracking column datatype is Date but it is getting a number not a date.

Have you recently changed the jdbc_input's tracking column settings? If so then you need to set clean_run => true once to clear out the old tracking value.


(guocf) #3

thanks for your answers,I have solved this problem by configure tracking_column_type as numeric type.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.