# Customized geoip not working with logstash-5.0.1 v

**URL:** <https://discuss.elastic.co/t/customized-geoip-not-working-with-logstash-5-0-1-v/78653>\
**Category:** Logstash\
**Created:** [March 15, 2017, 7:42am UTC](https://discuss.elastic.co/t/customized-geoip-not-working-with-logstash-5-0-1-v/78653 "2017-03-15T07:42:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![srikanth\_muddu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@srikanth\_muddu](https://discuss.elastic.co/u/srikanth_muddu)\
**Post date:** [March 15, 2017, 7:42am UTC](https://discuss.elastic.co/t/customized-geoip-not-working-with-logstash-5-0-1-v/78653/1 "2017-03-15T07:42:43Z")

</div>

I have customized geoip with private networks using mmutils and works fine in logstash 2.3.4 v ,but in logstash 5.0.1 it throws an error ..how can i reslove this ? please do help

Error: with 5.0.1.v

[2017-03-15T00:57:04,100][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9601}  
[2017-03-15T00:57:07,009][WARN][logstash.agent] stopping pipeline {:id=\>"main"}  
[2017-03-15T00:59:11,295][INFO][logstash.filters.geoip] Using geoip database {:path=\>"/home/netstorm/work/mmutils/GeoLiteCity.mmdb"}  
[2017-03-15T00:59:11,407][ERROR][logstash.filters.geoip] The GeoLite2 MMDB database provided is invalid or corrupted. {:exception=\>com.maxmind.db.InvalidDatabaseException: Could not find a MaxMind DB metadata marker in this file (GeoLiteCity.mmdb). Is this a valid MaxMind DB file?, :field=\>"clientip"}  
[2017-03-15T00:59:11,408][ERROR][logstash.agent] Pipeline aborted due to error {:exception=\>com.maxmind.db.InvalidDatabaseException: Could not find a MaxMind DB metadata marker in this file (GeoLiteCity.mmdb). Is this a valid MaxMind DB file?, :backtrace=\>["com.maxmind.db.Reader.findMetadataStart(com/maxmind/db/Reader.java:278)", "com.maxmind.db.Reader.(com/maxmind/db/Reader.java:129)", "com.maxmind.db.Reader.(com/maxmind/db/Reader.java:116)", "com.maxmind.geoip2.DatabaseReader.(com/maxmind/geoip2/DatabaseReader.java:37)", "com.maxmind.geoip2.DatabaseReader.(com/maxmind/geoip2/DatabaseReader.java:27)", "com.maxmind.geoip2.DatabaseReader$Builder.build(com/maxmind/geoip2/DatabaseReader.java:133)", "java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)", "RUBY.register(/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-4.0.3-java/lib/logstash/filters/geoip.rb:144)", "RUBY.suppress\_all\_warnings(/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-4.0.3-java/lib/logstash/filters/geoip.rb:21)", "RUBY.register(/usr/share/logstash/vendor/bundle/jruby/1.9/gems/logstash-filter-geoip-4.0.3-java/lib/logstash/filters/geoip.rb:130)", "RUBY.register(/usr/share/logstash/vendor/jruby/lib/ruby/1.9/forwardable.rb:201)", "RUBY.start\_workers(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:197)", "org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)", "RUBY.start\_workers(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:197)", "RUBY.run(/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:153)", "RUBY.start\_pipeline(/usr/share/logstash/logstash-core/lib/logstash/agent.rb:250)", "java.lang.Thread.run(java/lang/Thread.java:745)"]}

`* indent preformatted text by 4 spaces`

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 15, 2017, 2:01pm UTC](https://discuss.elastic.co/t/customized-geoip-not-working-with-logstash-5-0-1-v/78653/3 "2017-03-15T14:01:36Z")

</div>

Logstash v5 (and possibly 2.4) uses the new v2 Maxmind database format. Your v1 file, edits and all, will not work there. You will have to edit the v2 database, which like it sounds, is not similar. It will require different tools to edit.

---

<div class="post-metadata">

**Author:** ![srikanth\_muddu](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@srikanth\_muddu](https://discuss.elastic.co/u/srikanth_muddu)\
**Post date:** [March 17, 2017, 9:23am UTC](https://discuss.elastic.co/t/customized-geoip-not-working-with-logstash-5-0-1-v/78653/4 "2017-03-17T09:23:48Z")

</div>

can u suggest any tool which helps to edit v2 mmdb?

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [March 17, 2017, 2:47pm UTC](https://discuss.elastic.co/t/customized-geoip-not-working-with-logstash-5-0-1-v/78653/5 "2017-03-17T14:47:38Z")

</div>

I personally do not know of any. This doesn't mean they do not exist, of course. I just haven't had occasion to look for them or to use them.

---

<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:** [April 14, 2017, 2:47pm UTC](https://discuss.elastic.co/t/customized-geoip-not-working-with-logstash-5-0-1-v/78653/6 "2017-04-14T14:47:56Z")

</div>

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