# Logstash exeption "=\>"undefined method \`\>' for nil:NilClass"

**URL:** https://discuss.elastic.co/t/logstash-exeption-undefined-method-for-nil-nilclass/142859
**Category:** Logstash
**Created:** [August 3, 2018, 7:31am UTC](https://discuss.elastic.co/t/logstash-exeption-undefined-method-for-nil-nilclass/142859 "2018-08-03T07:31:43Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![M\_B\_I](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@M\_B\_I](https://discuss.elastic.co/u/M_B_I)
#### Post date: [August 3, 2018, 7:31am UTC](https://discuss.elastic.co/t/logstash-exeption-undefined-method-for-nil-nilclass/142859/1 "2018-08-03T07:31:43Z")

</div>

**Hi all, I have a few filters. Some days I receive an errors :**

_[2018-08-03T07:38:53,905][ERROR][logstash.pipeline] Exception in pipelineworker, the pipeline stopped processing new events,_  
\_ please check your filter configuration and restart Logstash.\_  
\_ {"exception"=\>"undefined method `>' for nil:NilClass",_ _ "backtrace"=>["(eval):1981:in`initialize'",\_  
\_ "org/jruby/RubyArray.java:1613:in `each'",_ _ "(eval):1979:in`initialize'", "org/jruby/RubyProc.java:281:in `call'", "(eval):1999:in`initialize'",\_  
\_ "org/jruby/RubyArray.java:1613:in `each'", "(eval):1993:in`initialize'",\_  
\_ "org/jruby/RubyProc.java:281:in `call'", "(eval):530:in`filter\_func'",\_  
\_ "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:370:in `filter_batch'",_ _ "org/jruby/RubyProc.java:281:in`call'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:224:in `each'",_ _ "org/jruby/RubyHash.java:1342:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:223:in `each'",_ _ "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:369:in`filter\_batch'",\_  
\_ "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:350:in `worker_loop'",_ _ "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:317:in`start\_workers'"]}\_

\_ [2018-08-03T07:38:54,322][FATAL][logstash.runner] An unexpected error occurred! {:error=\>#\<NoMethodError: undefined method `>' for nil:NilClass>,_ _ :backtrace=>["(eval):1981:in`initialize'", "org/jruby/RubyArray.java:1613:in `each'",_ _ "(eval):1979:in`initialize'", "org/jruby/RubyProc.java:281:in `call'",_ _ "(eval):1999:in`initialize'", "org/jruby/RubyArray.java:1613:in `each'",_ _ "(eval):1993:in`initialize'", "org/jruby/RubyProc.java:281:in `call'",_ _ "(eval):530:in`filter\_func'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:370:in `filter_batch'",_ _ "org/jruby/RubyProc.java:281:in`call'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:224:in `each'",_ _ "org/jruby/RubyHash.java:1342:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/util/wrapped\_synchronous\_queue.rb:223:in `each'",_ _ "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:369:in`filter\_batch'",\_  
\_ "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:350:in `worker_loop'",_ _ "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:317:in`start\_workers'"]}\_

**From this messages I don't understand in what config may prevent for this erros ? Or maybe this errors occurs cause there are a lot of events in logstash queque?**

---

<div class="post-metadata">

### Author: ![Charaf\_Ahmed](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charaf_ahmed/32/30467_2.png) [@Charaf\_Ahmed](https://discuss.elastic.co/u/Charaf_Ahmed)
#### Post date: [August 3, 2018, 7:34am UTC](https://discuss.elastic.co/t/logstash-exeption-undefined-method-for-nil-nilclass/142859/2 "2018-08-03T07:34:24Z")

</div>

Could you have a little more precision on your problem? show logstash.conf file

---

<div class="post-metadata">

### Author: ![M\_B\_I](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@M\_B\_I](https://discuss.elastic.co/u/M_B_I)
#### Post date: [August 3, 2018, 8:15am UTC](https://discuss.elastic.co/t/logstash-exeption-undefined-method-for-nil-nilclass/142859/3 "2018-08-03T08:15:35Z")

</div>

I have a lot of config files, and they are big 🙄 Maybe there is the way to find what config is the causing of the error?

---

<div class="post-metadata">

### Author: ![M\_B\_I](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@M\_B\_I](https://discuss.elastic.co/u/M_B_I)
#### Post date: [August 6, 2018, 7:04am UTC](https://discuss.elastic.co/t/logstash-exeption-undefined-method-for-nil-nilclass/142859/4 "2018-08-06T07:04:42Z")

</div>

I revised all the configs and everything I found :

if [value] \> 3  
{  
mutate  
{  
update =\> {"value" =\> 0}  
}  
}

so I corrected it like this :

if [value] and [value] \> 3  
{  
mutate  
{  
update =\> {"value" =\> 0}  
}  
}

hope it helps

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 3, 2018, 7:04am UTC](https://discuss.elastic.co/t/logstash-exeption-undefined-method-for-nil-nilclass/142859/5 "2018-09-03T07:04:42Z")

</div>

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