# Translate filter error with dictionary file

**URL:** <https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507>\
**Category:** Logstash\
**Created:** [April 15, 2016, 2:18pm UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507 "2016-04-15T14:18:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GambitK](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@GambitK](https://discuss.elastic.co/u/GambitK)\
**Post date:** [April 15, 2016, 2:18pm UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507/1 "2016-04-15T14:18:21Z")

</div>

Logstash is giving me an error with the translate filter, it says that the dictionary file format is not correct:

Pipeline aborted due to error {:exception=\>#\<RuntimeError: LogStash::Filters::Translate: LogStash::Filters::Translate: Dictionary /opt/logstash/tables/maliciousips have a non valid format when loading dictionary file at /opt/logstash/tables/maliciousips\>, :backtrace=\>["/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-translate-2.1.3/lib/logstash/filters/translate.rb:234:in `loading_exception'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-translate-2.1.3/lib/logstash/filters/translate.rb:196:in`load\_dictionary'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-translate-2.1.3/lib/logstash/filters/translate.rb:127:in `register'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:182:in`start\_workers'", "org/jruby/RubyArray.java:1613:in `each'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:182:in`start\_workers'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/pipeline.rb:136:in `run'", "/opt/logstash/vendor/bundle/jruby/1.9/gems/logstash-core-2.3.1-java/lib/logstash/agent.rb:465:in`start\_pipeline'"], :level=\>:error}  
stopping pipeline {:id=\>"main"}

Here is the output of the test dictionary file:

cat /opt/logstash/tables/maliciousips  
100.0.240.30: Binary Defense IP

Isn't that the correct file format?

---

<div class="post-metadata">

**Author:** ![Gnosis](https://avatars.discourse-cdn.com/v4/letter/g/3e96dc/32.png) [@Gnosis](https://discuss.elastic.co/u/Gnosis)\
**Post date:** [April 15, 2016, 3:13pm UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507/2 "2016-04-15T15:13:07Z")

</div>

It seems to be ok and your call to translate ?

---

<div class="post-metadata">

**Author:** ![hamzaezzi](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@hamzaezzi](https://discuss.elastic.co/u/hamzaezzi)\
**Post date:** [April 15, 2016, 3:21pm UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507/3 "2016-04-15T15:21:23Z")

</div>

on my case im using the 2.0.2 version of translate filter and works fine

i had the same problem with the latest version of translate filter (2.1.3)

cordially

---

<div class="post-metadata">

**Author:** ![GambitK](https://avatars.discourse-cdn.com/v4/letter/g/47e85d/32.png) [@GambitK](https://discuss.elastic.co/u/GambitK)\
**Post date:** [April 15, 2016, 3:39pm UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507/4 "2016-04-15T15:39:40Z")

</div>

I found the problem, i just added the .yaml extension to the filename, I had it without it on a previous logstash version.  
Thanks for the reply.

---

<div class="post-metadata">

**Author:** ![elvarb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elvarb/32/44840_2.png) [@elvarb](https://discuss.elastic.co/u/elvarb)\
**Post date:** [April 26, 2016, 1:24pm UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507/5 "2016-04-26T13:24:20Z")

</div>

Just ran into the same problem, used to have my dictionary files end with .dict because why not and nothing seemed to work setting up a slightly more recent version of the filter. Changing all files to .yaml solved this problem.

---

<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:** [May 8, 2016, 12:04am UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507/6 "2016-05-08T00:04:19Z")

</div>

This will help in future - [https://github.com/logstash-plugins/logstash-filter-translate/pull/28](https://github.com/logstash-plugins/logstash-filter-translate/pull/28)

---

<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:58am UTC](https://discuss.elastic.co/t/translate-filter-error-with-dictionary-file/47507/7 "2017-07-06T04:58:52Z")

</div>


