graylog2-server
graylog2-server copied to clipboard
Unable to process message <c3920140-70a2-11ea-a449-9e2895143dd6>: java.util.ConcurrentModificationException
#7389 ##description I added this file, Geolite2-City.mmdb, and configured the "Geo-Location Processor". But it says "Unable to process message <9fcbd510-70a2-11ea-a449-9e2895143dd6>: java. util. ConcurrentModificationException" in the code. Maybe the problem is from this part of code.
for (Map.Entry<String, Object> field : message.getFields().entrySet()) {
final String key = field.getKey();
if (!key.startsWith(Message.INTERNAL_FIELD_PREFIX)) {
final Optional<GeoLocationInformation> geoLocationInformation = extractGeoLocationInformation(field.getValue());
geoLocationInformation.ifPresent(locationInformation -> {
// We will store the coordinates as a "lat,long" string
message.addField(key + "_geolocation", locationInformation.latitude() + "," + locationInformation.longitude());
message.addField(key + "_country_code", locationInformation.countryIsoCode());
message.addField(key + "_city_name", locationInformation.cityName());
});
}
}
Hi!
That processor is no longer the recommended way to add geolocation information. Please refer to https://docs.graylog.org/en/3.2/pages/geolocation.html for the recommended way.
What you found is indeed a bug, so I'll leave this report open. Most likely the processor will be deprecated.
Thanks!
ok,thanks