{"record":{"id":"3f41c067b83a5fb3","repo":"aeron-io/aeron","slug":"address-port-is-required-for-ipv6","errorCode":null,"errorMessage":"[address]:port is required for ipv6: ","messagePattern":"\\[address\\]:port is required for ipv6: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/media/SocketAddressParser.java","lineNumber":240,"sourceCode":"\n                case PORT:\n                    if (c < '0' || '9' < c)\n                    {\n                        return null;\n                    }\n                    break;\n            }\n        }\n\n        if (-1 != portIndex && 1 < length - portIndex)\n        {\n            final String hostname = str.substring(1, scopeIndex != -1 ? scopeIndex : portIndex - 1);\n            portIndex++;\n            final int port = AsciiEncoding.parseIntAscii(str, portIndex, length - portIndex);\n            return new ParseResult(hostname, port);\n        }\n\n        throw new IllegalArgumentException(\"[address]:port is required for ipv6: \" + str);\n    }\n\n    private static final class ParseResult\n    {\n        final String host;\n        final int port;\n\n        private ParseResult(final String host, final int port)\n        {\n            this.host = host;\n            this.port = port;\n        }\n    }\n}\n","sourceCodeStart":222,"sourceCodeEnd":255,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/media/SocketAddressParser.java#L222-L255","documentation":"tryParseIpV6 throws IllegalArgumentException('[address]:port is required for ipv6: ' + str) when an IPv6 string is missing the mandatory [address]:port bracket structure. IPv6 contains ':' characters itself, so Aeron requires square brackets to disambiguate the address from the port, and rejects strings not matching that shape.","triggerScenarios":"Passing '::1' or 'fe80::1' without brackets, '[::1]' without a port, or a bracketed form whose port portion is absent/non-numeric into tryParseIpV6 (via parse or isMulticastAddress).","commonSituations":"IPv6 endpoints written without brackets in aeron:udp URIs; forgetting the port after the bracket; OS-generated link-local strings like fe80::1%eth0 pasted without the [host]:port wrapper.","solutions":["Wrap the IPv6 address in square brackets and append the port: endpoint=[::1]:40456","Include a numeric port after the closing bracket — '[fe80::1%eth0]:40456' is valid, '[fe80::1%eth0]' is not","If possible use IPv4 endpoints to avoid bracket-syntax pitfalls in generated configuration"],"exampleFix":"// before\n\"aeron:udp?endpoint=::1:40456\"\n// after\n\"aeron:udp?endpoint=[::1]:40456\"","handlingStrategy":"validation","validationCode":"static boolean isValidIpv6Endpoint(String s) {\n    return s != null && s.matches(\"\\[[0-9a-fA-F:.%]+\\]:\\d+\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always wrap IPv6 literals in square brackets with a trailing :port","Watch for link-local scope ids (%eth0) — keep them inside the brackets","Prefer bracketed form in all generated configuration and docs"],"tags":["parsing","uri","ipv6"],"backgroundTag":"invalid-argument-format","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"}