logstash nil import errors -


i'm getting errors attempting data import in logstash. i'm seeing every "geo" field have. here of config files

input {     jdbc {         jdbc_driver_library => "c:\binaries\driver\ojdbc6.jar"         jdbc_driver_class => "java::oracle.jdbc.driver.oracledriver"         jdbc_connection_string => "jdbc:oracle:thin:@random:1521/random"         jdbc_user => "user"         jdbc_password => "password"          statement => "select a.*, myfunc() geo foo a"          type => "sometype"     } }  filter{     if [type] == "sometype" {         mutate {             rename => { "sometype_id" => "id" }             remove_field => ["gdo_geometry"]             add_field => [ "display", "%{id}" ]         }          # parses string json         json{             source => "geo"             target => "geometry"         }     } }  output {     if [type] == "sometype" {         elasticsearch {             hosts => ["myesbox:80"]             document_id => "%{id}"             index => "sjw"         }     } } 

here second.

input {     jdbc {         jdbc_driver_library => "c:\binaries\driver\ojdbc6.jar"         jdbc_driver_class => "java::oracle.jdbc.driver.oracledriver"         jdbc_connection_string => "jdbc:oracle:thin:@random:1521/random"         jdbc_user => "user"         jdbc_password => "password"          statement => "select a.*, myfunc() geo foo2 a"          type => "sometype2"     } }  filter{     if [type] == "sometype2" {         mutate {             rename => { "sometype2_id" => "id" }             remove_field => ["gdo_geometry"]             add_field => [ "display", "%{id}" ]         }          # parses string json         json{             source => "geo"             target => "geometry"         }     } }  output {     if [type] == "sometype2" {         elasticsearch {             hosts => ["myesbox:80"]             document_id => "%{id}"             index => "sjw"         }     } } 

and here error message (repeated once each record in database tables).

{:timestamp=>"2016-01-05t13:33:18.258000-0800", :message=>"trouble parsing json", :source=>"geo", :raw=>nil, :exception=>java.lang.classcastexception: org.jruby.rubynil cannot cast org.jruby.rubyio, :level=>:warn} 

now interestingly, field seem import successfully. can see data populated expected. don't know why warning being generated. i'm running logstash

logstash -f /my/logstash/dir 

also interesting note if modify first config file given , changed source json filter name "geom" instead of "geo" -- warning no longer occur. seems occur when have multiple config files same field/json filter combinations. if added third config file , had "geo" field being parsed json filter -- issue occurs again -- though still not see warning messages first config file -- second , third.

the issue here turned out bug 2.0 version of logstash. i'm not sure problem was, upgrading 2.1 resolved issue me.


Comments

Popular posts from this blog

multithreading - Exception in Application constructor -

React Native allow user to reorder elements in a scrollview list -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -