# Logstash DNS unexpected error

**URL:** <https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741>\
**Category:** Logstash\
**Created:** [January 20, 2020, 1:17pm UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741 "2020-01-20T13:17:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmanyushin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vmanyushin/32/50887_2.png) [@vmanyushin](https://discuss.elastic.co/u/vmanyushin)\
**Post date:** [January 20, 2020, 1:17pm UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741/1 "2020-01-20T13:17:28Z")

</div>

After upgrade to 7.5.1 a got error messages in log:

```
[2020-01-20T16:00:39,036][ERROR][logstash.filters.dns][main] DNS: Unexpected Error. {:field=>"upstream_hostname", :value=>"172.16.21.57", :message=>"Mutex relocking by same thread"}
[2020-01-20T16:00:39,040][ERROR][logstash.filters.dns][main] DNS: Unexpected Error. {:field=>"upstream_hostname", :value=>"172.16.22.54", :message=>"Mutex relocking by same thread"}
[2020-01-20T16:00:39,046][ERROR][logstash.filters.dns][main] DNS: Unexpected Error. {:field=>"upstream_hostname", :value=>"172.16.32.17", :message=>"Mutex relocking by same thread"}

```

how to fix this problem?

---

<div class="post-metadata">

**Author:** ![Marco\_Longo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_longo/32/44722_2.png) [@Marco\_Longo](https://discuss.elastic.co/u/Marco_Longo)\
**Post date:** [February 3, 2020, 8:58am UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741/2 "2020-02-03T08:58:37Z")

</div>

We have the same problem,

```
				dns {
				id => "elastiflow_dns_dst_hostname"
				nameserver => ["172.16.81.41","172.16.81.42"]
				hit_cache_size => 100000 
				hit_cache_ttl => 3600 
				failed_cache_size => 100000 
				failed_cache_ttl => 3600
				max_retries => 1
				reverse => ["fqdn_dest"]
				action => "replace"
				periodic_flush => true
			}

```

We tried to disable periodic\_flush and different size for the cache fields, but nothing change

Does Anyone have a working configuration?

Thank you

---

<div class="post-metadata">

**Author:** ![RobBavey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robbavey/32/20421_2.png) [@RobBavey](https://discuss.elastic.co/u/RobBavey)\
**Post date:** [February 10, 2020, 3:06pm UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741/3 "2020-02-10T15:06:28Z")

</div>

@Marco_Longo, @vmanyushin We identified an issue with the `logstash-filter-dns` plugin, and have pushed out a bugfix. Can you try upgrading your plugin:

`bin/logstash-plugin update logstash-filter-dns`

And see if the problem still arises?

---

<div class="post-metadata">

**Author:** ![vmanyushin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vmanyushin/32/50887_2.png) [@vmanyushin](https://discuss.elastic.co/u/vmanyushin)\
**Post date:** [February 10, 2020, 3:25pm UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741/4 "2020-02-10T15:25:05Z")

</div>

Thanks for reply, i will update it today and reply about problem after 1- 2 days of usage.

---

<div class="post-metadata">

**Author:** ![Marco\_Longo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_longo/32/44722_2.png) [@Marco\_Longo](https://discuss.elastic.co/u/Marco_Longo)\
**Post date:** [February 12, 2020, 7:48am UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741/5 "2020-02-12T07:48:46Z")

</div>

@RobBavey thanks, after the upgrade we don't get anymore error. It is going from two days

---

<div class="post-metadata">

**Author:** ![vmanyushin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vmanyushin/32/50887_2.png) [@vmanyushin](https://discuss.elastic.co/u/vmanyushin)\
**Post date:** [February 17, 2020, 1:41pm UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741/6 "2020-02-17T13:41:56Z")

</div>

All work correctly, no new errors. Thanks

---

<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 16, 2020, 1:42pm UTC](https://discuss.elastic.co/t/logstash-dns-unexpected-error/215741/7 "2020-03-16T13:42:01Z")

</div>

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