GitHub user nickwallen opened a pull request:
https://github.com/apache/metron/pull/644
METRON-1027: Errant Log Message When No GeoIP Hit on Valid, External â¦
When a valid public IPv4 address does not match a record in the Maxmind
GeoIP database, a log message indicates that an error occurred with the
GeoLite2 DB.
```
2017-07-05 12:50:34.266 o.a.m.e.a.g.GeoLiteDatabase WARN Metron GeoLite2 DB
encountered an error
com.maxmind.geoip2.exception.AddressNotFoundException: The address X.X.X.X
is not in the database.
at com.maxmind.geoip2.DatabaseReader.get(DatabaseReader.java:157)
~[stormjar.jar:?]
at com.maxmind.geoip2.DatabaseReader.city(DatabaseReader.java:202)
~[stormjar.jar:?]
at
org.apache.metron.enrichment.adapters.geo.GeoLiteDatabase.get(GeoLiteDatabase.java:136)
[stormjar.jar:?]
at
org.apache.metron.enrichment.adapters.geo.GeoAdapter.enrich(GeoAdapter.java:47)
[stormjar.jar:?]
at
org.apache.metron.enrichment.adapters.geo.GeoAdapter.enrich(GeoAdapter.java:31)
[stormjar.jar:?]
```
Really no error has occurred with the GeoIP database. Not having a hit in
the database is an expected condition and processing should continue without
the errant log message.
### Testing
To test this change, setup a Metron environment with GeoIP enrichment
enabled. Ingest some telemetry containing an valid, external IPv4 address that
is not contained within the GeoIP database. For example `203.0.113.1` works
as the range 203.0.113.0/24 is assigned as "TEST-NET-3" and should never be
locatable. Before this PR, you will see the error message in the Storm logs
for the Enrichment topology. With this change, you will not see the error
message in your logs.
## Pull Request Checklist
- [ ] Is there a JIRA ticket associated with this PR? If not one needs to
be created at [Metron
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
- [ ] Does your PR title start with METRON-XXXX where XXXX is the JIRA
number you are trying to resolve? Pay particular attention to the hyphen "-"
character.
- [ ] Has your PR been rebased against the latest commit within the target
branch (typically master)?
- [ ] Have you included steps to reproduce the behavior or problem that is
being changed or addressed?
- [ ] Have you included steps or a guide to how the change may be verified
and tested manually?
- [ ] Have you ensured that the full suite of tests and checks have been
executed in the root metron
- [ ] Have you written or updated unit tests and or integration tests to
verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] Have you verified the basic functionality of the build by building
and running locally with Vagrant full-dev environment or the equivalent?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nickwallen/metron METRON-1027
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/metron/pull/644.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #644
----
commit f4c669d1c5c8ab2e071f46531941d2016bf0995a
Author: Nick Allen <[email protected]>
Date: 2017-07-10T18:41:34Z
METRON-1027: Errant Log Message When No GeoIP Hit on Valid, External IPv4
Address
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---