Closed yaauie closed 2 months ago
The fix for this is set to ship in the next patch release (8.14.2) and in the next minor (8.15.0).
If all instances of the geoip
filter are instantiated with database_path
pointing to a self-managed mmdb database file on disk, they will not use the Geoip Database Manager and not hit this bug.
The licensing of the geoip databases from Maxmind require that updates be consumed within 30 days. The database manager polls for updates every xpack.geoip.downloader.poll.interval
(default: 24h
[24 hours]), and either marks the current database as still-valid or updates it if an update is available. Checking daily ensures that we have many chances to get updates, even if some of them fail due to network glitches or transient failures.
By setting this to a higher value (like 7d
[7 days]), we can reduce the frequency with which we hit this bug, but we also increase the risk of falling out of sync. If the poll interval is set too high, failure to check for updates for 30 consecutive days can result in either:
[NOTE: the suffix of time-value settings is very important: h
for hours, d
for days]
Logstash information:
Please include the following information:
8.12.x
8.13.x
8.14.0
-8.14.1
Plugins installed: (
bin/logstash-plugin list --verbose
)logstash-filter-geoip
JVM (e.g.
java -version
):LS_JAVA_HOME
environment variable if set: N/AOS version (
uname -a
if on a Unix-like system): ANYDescription of the problem including expected versus actual behavior:
When a geoip filter is initialized after the geoip database management has updated its databases, it is possible that the newly-initialized filter can receive a database path that is no longer on disk.
The GeoIP filter crashes when it is given a path that does not exist on disk.
_[NOTE: only the
geoip
filter is affected; theelastic_integration
filter, which also uses Logstash's Geoip Database Management feature, is NOT affected by this issue.]_Steps to reproduce:
Please include a minimal but complete recreation of the problem, including (e.g.) pipeline definition(s), settings, locale, etc. The easier you make for us to reproduce it, the more likely that somebody will take the time to look at it.
database_path
directive, withxpack.geoip.downloader.enabled: true
inlogstash.yml
)id
of a pluginProvide logs (if relevant):
Database manager updates its database and correctly notifies the plugin instances in all currently-running plugins correctly, before deleting the stale databases:
Reload of the pipeline causes a new instance of the plugin to pick up the stale path and crash: