{"record":{"id":"92895ff314438028","repo":"aeron-io/aeron","slug":"logchannel-must-not-contain-initialtermid-param-name","errorCode":null,"errorMessage":"logChannel must not contain: <initialTermId param name>","messagePattern":"logChannel must not contain: <initialTermId param name>","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java","lineNumber":4614,"sourceCode":"                    0,\n                    findNextPositivePowerOfTwo(\n                        clusterClock.timeUnit().convert(wheelTickResolutionNs, TimeUnit.NANOSECONDS)),\n                    ticksPerWheel);\n            }\n            else if (PriorityHeapTimerServiceSupplier.class.getName().equals(timeServiceClassName))\n            {\n                return new PriorityHeapTimerServiceSupplier();\n            }\n\n            throw new ClusterException(\"invalid TimerServiceSupplier: \" + timeServiceClassName);\n        }\n\n        private void validateLogChannel()\n        {\n            final ChannelUri logChannelUri = parse(logChannel);\n            if (logChannelUri.containsKey(INITIAL_TERM_ID_PARAM_NAME))\n            {\n                throw new ConfigurationException(\"logChannel must not contain: \" + INITIAL_TERM_ID_PARAM_NAME);\n            }\n            if (logChannelUri.containsKey(TERM_ID_PARAM_NAME))\n            {\n                throw new ConfigurationException(\"logChannel must not contain: \" + TERM_ID_PARAM_NAME);\n            }\n            if (logChannelUri.containsKey(TERM_OFFSET_PARAM_NAME))\n            {\n                throw new ConfigurationException(\"logChannel must not contain: \" + TERM_OFFSET_PARAM_NAME);\n            }\n        }\n\n        /**\n         * {@inheritDoc}\n         */\n        @Override\n        public String toString()\n        {\n            return \"ConsensusModule.Context\" +","sourceCodeStart":4596,"sourceCodeEnd":4632,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-cluster/src/main/java/io/aeron/cluster/ConsensusModule.java#L4596-L4632","documentation":"validateLogChannel() parses the configured logChannel URI and rejects parameters like initialTermId, because the cluster must control log buffer term positioning to keep all members' logs identical. A ConfigurationException is thrown naming the offending parameter.","triggerScenarios":"Configuring ConsensusModule.Context.logChannel(...) (or the log channel property) with a URI containing initialTermId, e.g. 'aeron:udp?endpoint=...|initialTermId=0'.","commonSituations":"Reusing a publication/subscription channel URI that was tuned for a plain Aeron stream; copying channel strings from other Aeron components where initial term params are legal.","solutions":["Remove initialTermId from the logChannel URI.","Let the cluster elect/reset term parameters itself; do not pin log buffer positions.","Keep only allowed params (endpoint, control-mode, etc.) in the log channel."],"exampleFix":"// before\nctx.logChannel(\"aeron:udp?endpoint=localhost:20000|initialTermId=0\");\n// after\nctx.logChannel(\"aeron:udp?endpoint=localhost:20000\");","handlingStrategy":"validation","validationCode":"ChannelUri uri = ChannelUri.parse(logChannel);\nif (uri.containsKey(\"initialTermId\")) {\n    throw new IllegalArgumentException(\"logChannel must not contain initialTermId\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep term-positioning params out of cluster channel URIs","Reuse only cluster-sample channel templates","Validate channel URIs in config unit tests"],"tags":["aeron-cluster","configuration","channel-uri","log-channel"],"backgroundTag":"invalid-config-value","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-19T12:17:13.211Z"}