GitHub user nickwallen reopened a pull request:

    https://github.com/apache/metron/pull/644

    METRON-1027: Errant Log Message When No GeoIP Hit on Valid, External IPv4 
Address

    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.   You can use an IP like 
`203.0.113.1` as the range 203.0.113.0/24 is reserved for "TEST-NET-3" and 
should never be locatable.  Before this PR, you will see the noted error 
message in the Enrichment topology logs.  With this change, you will not see 
the error message in your logs.
    
    ## Pull Request Checklist
    
    - [x] 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).
 
    - [x] 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.
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    - [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
    - [x] Have you included steps or a guide to how the change may be verified 
and tested manually?
    - [x] Have you ensured that the full suite of tests and checks have been 
executed in the root metron 
    - [x] Have you written or updated unit tests and or integration tests to 
verify your changes?
    - [x] 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)? 
    - [x] 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 <n...@nickallen.org>
Date:   2017-07-10T18:41:34Z

    METRON-1027: Errant Log Message When No GeoIP Hit on Valid, External IPv4 
Address

commit 12e434e05c27a45961fd1ad7b6dfa711345904cc
Author: Nick Allen <n...@nickallen.org>
Date:   2017-07-10T18:59:51Z

    AddressNotFoundException is an expected condition and should only log at 
debug level

commit e66f9761300462183a9aee360c891a507be2af1f
Author: Nick Allen <n...@nickallen.org>
Date:   2017-07-10T19:19:34Z

    A lookup of private address should have an empty result

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to