# Logstash crashes after failed dns lookup

**URL:** <https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223>\
**Category:** Logstash\
**Created:** [July 11, 2016, 7:17pm UTC](https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223 "2016-07-11T19:17:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![renevdm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/renevdm/32/5730_2.png) [@renevdm](https://discuss.elastic.co/u/renevdm)\
**Post date:** [July 11, 2016, 7:17pm UTC](https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223/1 "2016-07-11T19:17:59Z")

</div>

Every now and then my logstash crashes randomly. having a look at the logs, it seems to be related to a failed DNS lookup.

`{:timestamp=>"2016-07-11T20:30:04.574000+0200", :message=>"Exception in pipelineworker, the pipeline stopped processing new events, please check your filter configuration and restart Logstash.", "exception"=>#<ConcurrencyError: interrupted waiting for mutex: null>, "backtrace"=>["org/jruby/ext/thread/Mutex.java:94:in`lock'", "org/jruby/ext/thread/Mutex.java:147:in `synchronize'", "/opt/logstash/vendor/jruby/lib/ruby/1.9/resolv.rb:190:in`lazy\_initialize'", "/opt/logstash/vendor/jruby/lib/ruby/1.9/resolv.rb:268:in `each_name'", "/opt/logstash/vendor/jruby/lib/ruby/1.9/resolv.rb:151:in`each\_name'", "org/jruby/RubyArray.java:1613:in `each'", "/opt/logstash/vendor/jruby/lib/ruby/1.9/resolv.rb:150:in`each\_name'", "/opt/logstash/vendor/jruby/lib/ruby/1.9/resolv.rb:132:in `getname'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:244:in`getname'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:231:in `retriable_getname'", "org/jruby/RubyProc.java:281:in`call'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:216:in `retriable_request'", "org/jruby/ext/timeout/Timeout.java:115:in`timeout'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:215:in `retriable_request'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:230:in`retriable\_getname'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:178:in `reverse'", "org/jruby/RubyArray.java:1613:in`each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:156:in `reverse'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-dns-2.1.3/lib/logstash/filters/dns.rb:95:in`filter'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-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.4-java/lib/logstash/filters/base.rb:148:in `multi_filter'", "(eval):457:in`initialize'", "org/jruby/RubyArray.java:1613:in `each'", "(eval):452:in`initialize'", "org/jruby/RubyProc.java:281:in `call'", "(eval):319:in`filter\_func'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-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.4-java/lib/logstash/pipeline.rb:265:in`filter\_batch'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:223:in `worker_loop'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.4-java/lib/logstash/pipeline.rb:201:in`start\_workers'"], :level=\>:error}`

This is what I have in my config:

```
dns {
    reverse => ["host"]
    action => "replace"
  }

```

I don't get why logstash crashes after a failed dns lookup. Wouldn't it be better to add some sort of failure tag, as suggested here [https://github.com/logstash-plugins/logstash-filter-dns/issues/24](https://github.com/logstash-plugins/logstash-filter-dns/issues/24) ?

Should I create an issue on the mentioned github page about this?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [July 13, 2016, 4:07am UTC](https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223/2 "2016-07-13T04:07:17Z")

</div>

What version are you on?

---

<div class="post-metadata">

**Author:** ![renevdm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/renevdm/32/5730_2.png) [@renevdm](https://discuss.elastic.co/u/renevdm)\
**Post date:** [July 13, 2016, 10:06pm UTC](https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223/3 "2016-07-13T22:06:28Z")

</div>

Sorry for the late response, but I'm on logstash 2.3.4

---

<div class="post-metadata">

**Author:** ![purbon](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@purbon](https://discuss.elastic.co/u/purbon)\
**Post date:** [August 4, 2016, 10:29am UTC](https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223/4 "2016-08-04T10:29:31Z")

</div>

Hi Rene, sorry for the really late response here. I'm working on a solution for this problem and I'm wondering if you can share a bit more hints about your environment?

- OS.
- java version.  
[https://www.elastic.co/guide/en/logstash/current/pipeline.html#\_notes\_on\_pipeline\_configuration\_and\_performance](https://www.elastic.co/guide/en/logstash/current/pipeline.html#_notes_on_pipeline_configuration_and_performance) for more context.

Thanks a lot,

- purbon

---

<div class="post-metadata">

**Author:** ![purbon](https://avatars.discourse-cdn.com/v4/letter/p/edb3f5/32.png) [@purbon](https://discuss.elastic.co/u/purbon)\
**Post date:** [August 4, 2016, 11:24am UTC](https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223/5 "2016-08-04T11:24:13Z")

</div>

In case you are interested, I opened I created [https://github.com/logstash-plugins/logstash-filter-dns/issues/26](https://github.com/logstash-plugins/logstash-filter-dns/issues/26) to track the fix. to track the fix.

---

<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:** [July 6, 2017, 4:44am UTC](https://discuss.elastic.co/t/logstash-crashes-after-failed-dns-lookup/55223/6 "2017-07-06T04:44:55Z")

</div>


