{"record":{"id":"97553254c3e9381e","repo":"aeron-io/aeron","slug":"multicast-data-address-must-be-odd","errorCode":null,"errorMessage":"multicast data address must be odd","messagePattern":"multicast data address must be odd","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/media/UdpChannel.java","lineNumber":1067,"sourceCode":"            address = SocketAddressParser.parse(\n                controlValue, MDC_CONTROL_PARAM_NAME, false, nameResolver);\n\n            if (address.isUnresolved())\n            {\n                throw new UnknownHostException(\n                    \"unresolved - \" + MDC_CONTROL_PARAM_NAME + \"=\" + controlValue +\n                    \", name-resolver=\" + nameResolver.getClass().getName());\n            }\n        }\n\n        return address;\n    }\n\n    private static void validateDataAddress(final byte[] addressAsBytes)\n    {\n        if (BitUtil.isEven(addressAsBytes[addressAsBytes.length - 1]))\n        {\n            throw new IllegalArgumentException(\"multicast data address must be odd\");\n        }\n    }\n\n    private static void validateConfiguration(final ChannelUri uri)\n    {\n        validateMedia(uri);\n    }\n\n    private static void validateMedia(final ChannelUri uri)\n    {\n        if (!uri.isUdp())\n        {\n            throw new IllegalArgumentException(\"UdpChannel only supports UDP media: \" + uri);\n        }\n    }\n\n    static final class Context\n    {","sourceCodeStart":1049,"sourceCodeEnd":1085,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/media/UdpChannel.java#L1049-L1085","documentation":"For multicast (MDC) data channels, Aeron requires the multicast data address's last byte to be odd, per IP multicast addressing conventions (even last octet is not a valid host-group assignment in Aeron's scheme). validateDataAddress throws IllegalArgumentException when the final byte of the endpoint address is even.","triggerScenarios":"Configuring a UdpChannel with a multicast endpoint address whose last octet is even, e.g. endpoint=239.255.0.2, then parsing the channel via UdpChannel.parse.","commonSituations":"Administrators copying even-numbered multicast group addresses from documentation or other middleware; generating addresses programmatically by incrementing and landing on an even octet.","solutions":["Change the multicast data address so its last octet is odd (e.g. 239.255.0.2 -> 239.255.0.3).","Generate/allocate multicast addresses programmatically with an odd final byte.","Document your multicast allocation plan so even addresses are never assigned to data channels."],"exampleFix":"// before\n\"aeron:udp?endpoint=239.255.0.2:40456\"\n// after\n\"aeron:udp?endpoint=239.255.0.3:40456\"","handlingStrategy":"validation","validationCode":"byte last = (byte) InetAddresses.coerceToInteger(InetAddress.getByName(mcastAddr));\n// check last octet before building URI\nif ((InetAddress.getByName(mcastAddr).getAddress()[3] & 0xFF) % 2 == 0) {\n    throw new IllegalArgumentException(\"multicast data address must be odd\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Allocate multicast addresses with odd final octets only","Centralize multicast address generation in one utility","Validate addresses in config CI checks"],"tags":["network","multicast","configuration","validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"6d60124e15e35c11b49ba2e3c2c2858a09a18803","analyzedAt":"2026-09-12T11:17:07.683Z","contentChangedAt":"2026-09-12T11:17:07.683Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}