# CIDR filter network\_path error

**URL:** <https://discuss.elastic.co/t/cidr-filter-network-path-error/169684>\
**Category:** Logstash\
**Created:** [February 23, 2019, 9:41pm UTC](https://discuss.elastic.co/t/cidr-filter-network-path-error/169684 "2019-02-23T21:41:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpbourke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpbourke/32/41269_2.png) [@jpbourke](https://discuss.elastic.co/u/jpbourke)\
**Post date:** [February 23, 2019, 9:41pm UTC](https://discuss.elastic.co/t/cidr-filter-network-path-error/169684/1 "2019-02-23T21:41:41Z")

</div>

Hi,

logstash-6.5.3-1.noarch on RHEL

I get the following error when using the cidr filter with network\_path

[2019-02-23T21:30:16,297][ERROR][logstash.pipeline] Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash. {:pipeline\_id=\>"main", "exception"=\>"undefined method `collect' for nil:NilClass", "backtrace"=>["/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-filter-cidr-3.1.2-java/lib/logstash/filters/cidr.rb:144:in`filter'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:143:in `do_filter'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:162:in`block in multi\_filter'", "org/jruby/RubyArray.java:1734:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/filters/base.rb:159:in`multi\_filter'", "/usr/share/logstash/logstash-core/lib/logstash/filter\_delegator.rb:44:in `multi_filter'", "(eval):14343:in`block in initialize'", "org/jruby/RubyArray.java:1734:in `each'", "(eval):14336:in`block in initialize'", "(eval):2872:in `block in filter_func'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:341:in`filter\_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:320:in `worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:286:in`block in start\_workers'"], :thread=\>"#\<Thread:0x6b36f7c2 sleep\>"}

Config is

```
    cidr {
        address => ["%{ipaddr1}"]
        network_path => "/etc/logstash/cidr.mil/pop"
        add_field => {
            "IsSystem1" => "True"
        }
    }

```

/etc/logstash/cidr.mil/pop File contains

10.100.0.0/16  
10.100.1.0/16

Thanks

john

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 23, 2019, 10:22pm UTC](https://discuss.elastic.co/t/cidr-filter-network-path-error/169684/2 "2019-02-23T22:22:35Z")

</div>

That's exactly the error you would expect if /etc/logstash/cidr.mil/pop were present, readable, and empty.

---

<div class="post-metadata">

**Author:** ![jpbourke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpbourke/32/41269_2.png) [@jpbourke](https://discuss.elastic.co/u/jpbourke)\
**Post date:** [February 23, 2019, 10:37pm UTC](https://discuss.elastic.co/t/cidr-filter-network-path-error/169684/3 "2019-02-23T22:37:41Z")

</div>

And that is exactly my mistake 🙂

I wanted some placeholder files, for future additions.

I've added a dummy address as a placeholder in the placeholder files.

All good now !

Many thanks

---

<div class="post-metadata">

**Author:** ![rcowart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rcowart/32/88091_2.png) [@rcowart](https://discuss.elastic.co/u/rcowart)\
**Post date:** [February 24, 2019, 8:35am UTC](https://discuss.elastic.co/t/cidr-filter-network-path-error/169684/4 "2019-02-24T08:35:50Z")

</div>

The subnet 192.0.2.0/24 is reserved for documentation purposes, and is a good choice for such dummy addresses to ensure no accidental match with real addresses.

---

<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:** [March 24, 2019, 8:35am UTC](https://discuss.elastic.co/t/cidr-filter-network-path-error/169684/5 "2019-03-24T08:35:51Z")

</div>

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