{"record":{"id":"8ec605c067f3939c","repo":"elastic/elasticsearch","slug":"supports-only-as-method","errorCode":null,"errorMessage":"supports only [{}] as method","messagePattern":"supports only \\[(.+?)\\] as method","errorType":"exception","errorClass":"NoSuchAlgorithmException","httpStatus":null,"severity":"error","filePath":"modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/FingerprintProcessor.java","lineNumber":330,"sourceCode":"\n        @Override\n        public String getAlgorithm() {\n            return md.getAlgorithm();\n        }\n    }\n\n    static class MurmurHasher implements Hasher {\n\n        public static final String METHOD = Murmur3Hasher.METHOD;\n        private final Murmur3Hasher mh;\n\n        private MurmurHasher() {\n            this.mh = new Murmur3Hasher(0);\n        }\n\n        static Hasher getInstance(String method) throws NoSuchAlgorithmException {\n            if (method.equalsIgnoreCase(METHOD) == false) {\n                throw new NoSuchAlgorithmException(\"supports only [\" + METHOD + \"] as method\");\n            }\n            return new MurmurHasher();\n        }\n\n        @Override\n        public void reset() {\n            mh.reset();\n        }\n\n        @Override\n        public void update(byte[] input) {\n            mh.update(input);\n        }\n\n        @Override\n        public byte[] digest() {\n            return mh.digest();\n        }","sourceCodeStart":312,"sourceCodeEnd":348,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/FingerprintProcessor.java#L312-L348","documentation":"Thrown by FingerprintProcessor.MurmurHasher.getInstance when the requested hash method does not equal Murmur3Hasher.METHOD. MurmurHasher is a delegating wrapper that ONLY supports the Murmur3 method string, so any other algorithm name is rejected at factory time. This is a NoSuchAlgorithmException, surfaced as a configuration error in the fingerprint processor.","triggerScenarios":"Configuring a fingerprint processor with method set to anything other than the Murmur3 constant (e.g. \"sha256\", \"md5\", or a typo) and the factory routes to MurmurHasher instead of the SHA-based DigestHasher. The check is method.equalsIgnoreCase(METHOD) == false.","commonSituations":"User sets \"method\": \"murmur3\" vs \"MURMUR3\" casing issues are tolerated (equalsIgnoreCase), but \"murmur\" or \"sha1\" routed wrong, or a custom/older documented method name that the version no longer maps to MurmurHasher.","solutions":["Set the fingerprint processor method to exactly the Murmur3 method constant (the value of Murmur3Hasher.METHOD, typically \"Murmur3\") when you want MurmurHasher.","If you need SHA-family hashing, ensure the factory selects DigestHasher with a supported algorithm (e.g. \"SHA-256\") instead of MurmurHasher.","Check the ingest processor definition in your pipeline for typos in the method field."],"exampleFix":"// before\n{\"fingerprint\": {\"fields\": [\"ip\"], \"method\": \"murmur\"}}\n// after\n{\"fingerprint\": {\"fields\": [\"ip\"], \"method\": \"Murmur3\"}}","handlingStrategy":"validation","validationCode":"// before constructing MurmurHasher, validate the method string\nString method = config.get(\"method\");\nif (\"Murmur3\".equalsIgnoreCase(method) == false\n    && Arrays.asList(\"SHA-1\",\"SHA-256\",\"SHA-512\",\"MD5\").contains(method) == false) {\n    throw new IllegalArgumentException(\"Unsupported fingerprint method: \" + method);\n}\n// only then call FingerprintProcessor.Factory.create","typeGuard":"static boolean isSupportedFingerprintMethod(String m) {\n    if (m == null) return false;\n    return \"Murmur3\".equalsIgnoreCase(m)\n        || java.util.Arrays.asList(\"SHA-1\",\"SHA-256\",\"SHA-512\",\"MD5\").contains(m);\n}","tryCatchPattern":"try {\n    Hasher h = MurmurHasher.getInstance(method);\n} catch (NoSuchAlgorithmException e) {\n    // surface to pipeline validation: unsupported method\n    throw new IllegalArgumentException(\"Fingerprint method [\" + method + \"] not supported\", e);\n}","preventionTips":["Validate the fingerprint method against the supported set in pipeline create-time validation.","Document only the canonical method strings (Murmur3, SHA-1, SHA-256, SHA-512, MD5) in user docs.","Add an integration test that asserts each supported method string produces a working processor."],"tags":["ingest","fingerprint","configuration","hash"],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T06:17:24.410Z"}