{"record":{"id":"db8132f838034304","repo":"elastic/elasticsearch","slug":"not-found","errorCode":null,"errorMessage":"{} not found","messagePattern":"(.+?) not found","errorType":"http","errorClass":"ResourceNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/ip-location/src/main/java/org/elasticsearch/ingest/geoip/HttpClient.java","lineNumber":118,"sourceCode":"\n                    // deal with redirections (including relative urls)\n                    final String location = conn.getHeaderField(\"Location\");\n                    final URL base = new URL(innerUrl);\n                    final URL next = new URL(base, location);\n                    innerUrl = next.toExternalForm();\n\n                    // compare the *original* authority and the next authority to determine whether to include auth details.\n                    // this means that the host and port (if it is provided explicitly) are considered. it also means that if we\n                    // were to ping-pong back to the original authority, then we'd start including the auth details again.\n                    final String nextAuthority = next.getAuthority();\n                    if (originalAuthority.equals(nextAuthority)) {\n                        conn = createConnection(auth, innerUrl);\n                    } else {\n                        conn = createConnection(NO_AUTH, innerUrl);\n                    }\n                    break;\n                case HTTP_NOT_FOUND:\n                    throw new ResourceNotFoundException(\"{} not found\", url);\n                default:\n                    int responseCode = conn.getResponseCode();\n                    throw new ElasticsearchStatusException(\"error during downloading {}\", RestStatus.fromCode(responseCode), url);\n            }\n        }\n    }\n\n    @SuppressForbidden(reason = \"we need socket connection to download data from internet\")\n    private static InputStream getInputStream(final HttpURLConnection conn) throws IOException {\n        return conn.getInputStream();\n    }\n\n    private static HttpURLConnection createConnection(final PasswordAuthentication auth, final String url) throws IOException {\n        final HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();\n        if (auth != NO_AUTH) {\n            conn.setAuthenticator(new Authenticator() {\n                protected PasswordAuthentication getPasswordAuthentication() {\n                    return auth;","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/ip-location/src/main/java/org/elasticsearch/ingest/geoip/HttpClient.java#L100-L136","documentation":"Thrown by HttpClient.get when the server returns HTTP 404 for the requested URL. It is a ResourceNotFoundException carrying the URL, surfaced during a geoip database or checksum download. Distinct from other HTTP errors (which become error during downloading) so callers can treat 404 as 'the resource does not exist right now'.","triggerScenarios":"HttpClient.get switch hits case HTTP_NOT_FOUND -> throw new ResourceNotFoundException(\"{} not found\", url). Happens for the tar.gz, tar.gz.sha256, mmdb, or checksums JSON URL when the provider has no such file.","commonSituations":"Database name typo in the configuration; the provider renamed or removed the edition; pointing at the wrong endpoint base; the edition is not entitled for the account; transient provider 404 during a publish window.","solutions":["Open the URL from the message in a browser/curl with the same credentials to confirm it is genuinely missing.","Correct the database name / edition in the configuration to a value the provider offers.","Confirm the endpoint base URL setting is correct for the provider.","Verify the account entitlement includes the requested edition; retry later if it may be a transient publish-window 404."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    byte[] b = httpClient.getBytes(auth, url);\n} catch (ResourceNotFoundException e) {\n    // url is genuinely missing: fix database name/edition, confirm entitlement, or retry later\n    logger.warn(\"geoip resource not found [{}]\", url);\n}","preventionTips":["Use exact database/edition names offered by the provider.","Confirm the endpoint base URL matches the provider.","Verify account entitlement includes the requested edition.","Retry after a provider publish window if 404 may be transient."],"tags":["geoip","http","not-found","network","download"],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}