Tamas Palfy created NIFI-13860:
----------------------------------
Summary: IPLookupService throws exception when lookup fails
Key: NIFI-13860
URL: https://issues.apache.org/jira/browse/NIFI-13860
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Reporter: Tamas Palfy
The
{code:java}
Optional<Record> lookup
{code}
in {{IPLookupService}} calls into {{com.maxmind.geoip2.DatabaseReader}} methods
that throw {{AddressNotFoundException}} when an IP lookup fails.
When used in the LookupRecord processor this causes an error and the entire
flowfile is routed to the _failure_ relationship instead of routing the unfound
records to _unmatched_ and keep routing the found ones to _matched_.
The {{DatabaseReader}} has {{tryX}} methods that return an {{Optional}} instead
of throwing an exception when the IP is not found in the DB. All lookups should
use this variant.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)