{"record":{"id":"3a93215f2fb8093f","repo":"elastic/elasticsearch","slug":"unexpected-md5-response-from","errorCode":null,"errorMessage":"Unexpected md5 response from [{}]","messagePattern":"Unexpected md5 response from \\[(.+?)\\]","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"modules/ip-location/src/main/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloader.java","lineNumber":595,"sourceCode":"            return Strings.format(endpointPattern, internalName, suffix);\n        }\n\n        @Override\n        public Checksum checksum() throws IOException {\n            final String checksumJsonUrl = this.url(\"mmdb/checksums\"); // a minor abuse of the idea of a 'suffix', :shrug:\n            byte[] data = httpClient.getBytes(auth.get(), checksumJsonUrl); // this throws if the auth is bad\n            Map<String, Object> checksums;\n            try (XContentParser parser = XContentType.JSON.xContent().createParser(XContentParserConfiguration.EMPTY, data)) {\n                checksums = parser.map();\n            }\n            @SuppressWarnings(\"unchecked\")\n            String md5 = ((Map<String, String>) checksums.get(\"checksums\")).get(\"md5\");\n            logger.trace(\"checksum was [{}]\", md5);\n\n            var matcher = MD5_CHECKSUM_PATTERN.matcher(md5);\n            boolean match = matcher.matches();\n            if (match == false) {\n                throw new RuntimeException(\"Unexpected md5 response from [\" + checksumJsonUrl + \"]\");\n            }\n            return Checksum.md5(md5);\n        }\n\n        @Override\n        public CheckedSupplier<InputStream, IOException> download() {\n            final String mmdbUrl = this.url(\"mmdb\");\n            return () -> httpClient.get(auth.get(), mmdbUrl);\n        }\n\n        @Override\n        public void close() throws IOException {\n            if (auth != null) auth.close();\n        }\n    }\n\n    interface ProviderDownload extends Closeable {\n        // note: buildCredentials and url are inherently just implementation details of checksum() and download(),","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/ip-location/src/main/java/org/elasticsearch/ingest/geoip/EnterpriseGeoIpDownloader.java#L577-L613","documentation":"Thrown by IpinfoDownload.checksum() after fetching the checksums JSON from Ipinfo. The JSON's checksums.md5 value must match MD5_CHECKSUM_PATTERN = (\\w{32}); a missing md5 field, a null, or any non-32-hex value triggers this. It is a RuntimeException propagating out of checksum() and aborting the download.","triggerScenarios":"IpinfoDownload.checksum() -> httpClient.getBytes(auth, checksumJsonUrl) -> parse JSON -> extract checksums.md5 -> matcher.matches() == false. Common when the token is wrong and Ipinfo returns a 200 JSON error with no md5, or when Ipinfo changes its checksum schema.","commonSituations":"Invalid/expired Ipinfo token returning a JSON error body; Ipinfo schema change; corporate proxy returning an HTML error that fails JSON parsing earlier or yields a non-md5 string; NPE-style issue if md5 is null (matcher would NPE before this line in some cases).","solutions":["Manually fetch the checksumJsonUrl with the configured token to inspect the response body and confirm an md5 field is present.","Validate/regenerate the Ipinfo token in secure settings.","Confirm the Ipinfo endpoint base URL is correct and not redirected to a generic host.","If Ipinfo changed the schema, update MD5_CHECKSUM_PATTERN or the JSON field extraction (code change)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    Checksum cs = ipinfoDownload.checksum();\n} catch (RuntimeException e) {\n    // message starts with \"Unexpected md5 response from\"\n    // fetch the checksumJsonUrl manually, verify md5 field present, fix token/endpoint, retry next schedule\n    logger.error(\"ipinfo md5 body unparseable for [{}]\", checksumJsonUrl, e);\n}","preventionTips":["Keep the Ipinfo token valid.","Do not route Ipinfo traffic through a proxy that rewrites the JSON body.","If Ipinfo changes schema, update MD5_CHECKSUM_PATTERN or the field path.","Log the raw JSON body on failure for diagnostics."],"tags":["geoip","ipinfo","checksum","network","response-format"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T12:31:55.035Z"}