Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logstash crash with "IndexError: string not matched" Exception #33

Open
toopa2002 opened this issue Mar 3, 2017 · 0 comments
Open

logstash crash with "IndexError: string not matched" Exception #33

toopa2002 opened this issue Mar 3, 2017 · 0 comments

Comments

@toopa2002
Copy link

Logstash process crash when using "json" filter to expands json data which is has "[" and "]" as key as below Sample Data. It create exception as below.

{
:timestamp=>"2017-02-08T14:20:29.531000+0000",
:message=>"Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash.",
"exception"=>#<IndexError: string not matched>,
"backtrace"=>["org/jruby/RubyString.java:3910:in []='", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-event-2.3.3-java/lib/logstash/util/accessors.rb:64:in set'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-event-2.3.3-java/lib/logstash/event.rb:136:in []='", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-json-2.0.6/lib/logstash/filters/json.rb:101:in filter'",
"org/jruby/RubyHash.java:1342:in each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-json-2.0.6/lib/logstash/filters/json.rb:101:in filter'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/filters/base.rb:151:in multi_filter'", "org/jruby/RubyArray.java:1613:in each'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/filters/base.rb:148:in multi_filter'", "(eval):901006:in initialize'",
"org/jruby/RubyArray.java:1613:in each'", "(eval):901003:in initialize'",
"org/jruby/RubyProc.java:281:in call'", "(eval):901023:in initialize'",
"org/jruby/RubyArray.java:1613:in each'", "(eval):901020:in initialize'",
"org/jruby/RubyProc.java:281:in call'", "(eval):902385:in initialize'",
"org/jruby/RubyArray.java:1613:in each'", "(eval):902244:in initialize'",
"org/jruby/RubyProc.java:281:in call'", "(eval):85736:in filter_func'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:267:in filter_batch'", "org/jruby/RubyArray.java:1613:in each'",
"org/jruby/RubyEnumerable.java:852:in inject'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:265:in filter_batch'",
"/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:223:in worker_loop'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.3-java/lib/logstash/pipeline.rb:201:in start_workers'"],
:level=>:error
}

  • Config File (if you have sensitive info, please remove it):

json {
source => "message"
}

  • Sample Data:

{
"message": ""baseFields[fIndex]": "xxx","baseFields[fIndex].OverrideField.Name":"DTSubjectName"",
"uuid" : "1234"
}

  • Steps to Reproduce:
    Run logstash with above configuration and send the sample data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant