Skip to content

Conversation

@joegallo
Copy link
Contributor

@joegallo joegallo commented Oct 31, 2025

If you attempt to use the ip_location processor on v9.2.0 of Elasticsearch, you'll get an illegal access exception like this one:

illegal_access_exception: class com.maxmind.db.Decoder (in module com.maxmind.db) 
cannot access class org.elasticsearch.ingest.geoip.IpinfoIpDataLookups$PrivacyDetectionResult 
(in module org.elasticsearch.ingest.geoip) because module org.elasticsearch.ingest.geoip 
does not export org.elasticsearch.ingest.geoip to module com.maxmind.db

The issue is that our IpinfoIpDataLookups is not being correctly exposed to the MaxMind-DB-Reader-java library that Elasticsearch uses for interacting with MMDB files (i.e. it's a modules/permissions issue).

#132595, which shipped in 9.2.0 accidentally broke IPinfo database access because it removed the module access that allows things to work. This PR adds the module access back, so the fix is the dozen-ish characters added in module-info.java.

The rest of the PR is overhead to first make there be a failing test that shows that there's even a problem (and which then passes once the problem has been fixed). That is, while #132595 introduced the breakage, the real issue is that this module dependency wasn't correctly exercised by our tests, and this PR fixes that more important issue.

edit: Of course there are plenty of other tests for this code, just none that explicitly relied on the module behavior in the right way the same as it works at runtime as it turns out.

Because I added another database to the fixtures, the old (unchanged)
tests don't work with this new code anymore. We might be able to get
out of this situation long term by rewriting the tests or backporting
some of these changes, but for now I think it's most expedient to
'just' disable them.
@joegallo joegallo requested a review from masseyke October 31, 2025 20:02
@joegallo joegallo added >bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v9.2.1 v9.3.0 labels Oct 31, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @joegallo, I've created a changelog YAML for you.

Copy link
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joegallo joegallo added the auto-backport Automatically create backport pull requests when merged label Oct 31, 2025
@joegallo joegallo merged commit 6c979d9 into elastic:main Nov 3, 2025
34 checks passed
@joegallo joegallo deleted the fix-ipinfo-module-access branch November 3, 2025 20:50
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.2

joegallo added a commit to joegallo/elasticsearch that referenced this pull request Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP Team:Data Management Meta label for data/management team v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants