You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/10 18:47:00 UTC

[jira] [Commented] (METRON-1027) Errant Log Message When No GeoIP Hit on Valid, External IPv4 Address

    [ https://issues.apache.org/jira/browse/METRON-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080861#comment-16080861 ] 

ASF GitHub Bot commented on METRON-1027:
----------------------------------------

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 <ni...@nickallen.org>
Date:   2017-07-10T18:41:34Z

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

----


> Errant Log Message When No GeoIP Hit on Valid, External IPv4 Address
> --------------------------------------------------------------------
>
>                 Key: METRON-1027
>                 URL: https://issues.apache.org/jira/browse/METRON-1027
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>
> 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.  
> {code}
> 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:?]
> at org.apache.metron.enrichment.bolt.GenericEnrichmentBolt$1.load(GenericEnrichmentBolt.java:151) [stormjar.jar:?]
> at org.apache.metron.enrichment.bolt.GenericEnrichmentBolt$1.load(GenericEnrichmentBolt.java:148) [stormjar.jar:?]
> at org.apache.metron.guava.enrichment.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3579) [stormjar.jar:?]
> at org.apache.metron.guava.enrichment.cache.LocalCache$Segment.loadSync(LocalCache.java:2372) [stormjar.jar:?]
> at org.apache.metron.guava.enrichment.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2335) [stormjar.jar:?]
> at org.apache.metron.guava.enrichment.cache.LocalCache$Segment.get(LocalCache.java:2250) [stormjar.jar:?]
> at org.apache.metron.guava.enrichment.cache.LocalCache.get(LocalCache.java:3980) [stormjar.jar:?]
> at org.apache.metron.guava.enrichment.cache.LocalCache.getOrLoad(LocalCache.java:3984) [stormjar.jar:?]​
> at org.apache.metron.guava.enrichment.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4868) [stormjar.jar:?]
> at org.apache.metron.guava.enrichment.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4874) [stormjar.jar:?]
> at org.apache.metron.enrichment.bolt.GenericEnrichmentBolt.execute(GenericEnrichmentBolt.java:223) [stormjar.jar:?]
> at org.apache.storm.daemon.executor$fn_10431$tuple_action_fn_10433.invoke(executor.clj:728) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at org.apache.storm.daemon.executor$mk_task_receiver$fn__10352.invoke(executor.clj:460) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at org.apache.storm.disruptor$clojure_handler$reify__9867.onEvent(disruptor.clj:40) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at org.apache.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:472) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at org.apache.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:451) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at org.apache.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:73) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at org.apache.storm.daemon.executor$fn_10431$fn10444$fn_10497.invoke(executor.clj:847) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at org.apache.storm.util$async_loop$fn__553.invoke(util.clj:484) storm-core-1.1.0.2.6.0.3-8.jar:1.1.0.2.6.0.3-8
> at clojure.lang.AFn.run(AFn.java:22) [clojure-1.7.0.jar:?]
> at java.lang.Thread.run(Thread.java:748) ?:1.8.0_131
> 2017-07-05 12:50:34.266 o.a.m.e.a.g.GeoAdapter ERROR GEO Enrichment failure: 146.62.129.174
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)