{"record":{"id":"f80f90db815c69a1","repo":"aeron-io/aeron","slug":"expected-format-is-interface-name-or-interface-name-port-but","errorCode":null,"errorMessage":"expected format is '{interface_name}' or '{interface_name}:port', but got '{str}'","messagePattern":"expected format is '(.+?)' or '(.+?):port', but got '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aeron-driver/src/main/java/io/aeron/driver/media/NamedInterface.java","lineNumber":66,"sourceCode":"    {\n        for (final InterfaceAddress interfaceAddress : localInterface.getInterfaceAddresses())\n        {\n            final InetAddress address = interfaceAddress.getAddress();\n            if (getProtocolFamily(address) == protocolFamily)\n            {\n                return new InetSocketAddress(address, port);\n            }\n        }\n\n        throw new IllegalStateException(\n            \"no \" + protocolFamily + \" addresses found on interface \" + localInterface.getName());\n    }\n\n    static NamedInterface parse(final String str)\n    {\n        if (Strings.isEmpty(str) || str.charAt(0) != OPENING_CHAR)\n        {\n            throw parseException(str);\n        }\n\n        final int nameEnd = str.lastIndexOf('}');\n        if (nameEnd <= 1)\n        {\n            throw parseException(str);\n        }\n        final String name = str.substring(1, nameEnd);\n\n        int port = 0;\n        final int trailing = str.length() - nameEnd - 1;\n        if (trailing > 0)\n        {\n            if (trailing == 1 || str.charAt(nameEnd + 1) != ':')\n            {\n                throw parseException(str);\n            }\n","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/aeron-io/aeron/blob/6d60124e15e35c11b49ba2e3c2c2858a09a18803/aeron-driver/src/main/java/io/aeron/driver/media/NamedInterface.java#L48-L84","documentation":"NamedInterface.parse (Java driver media layer) parses an interface specification of the form '{interface_name}' or '{interface_name}:port'. If the string is empty or does not start with the opening '{' character, or has no closing '}' at a plausible position, it throws a parse exception with this message.","triggerScenarios":"Driver configuration properties such as aeron.driver.interfaces or UDP transport 'interface'/'control' endpoints containing a named-interface string that is missing the braces, empty, or malformed (e.g. 'eth0:40456' instead of '{eth0}:40456').","commonSituations":"Setting AERON_DRIVER_CONFIGURATION or driver properties with a bare NIC name or IP without the required '{...}' wrapper; copying a bind address format from another framework; shell escaping stripping braces; stray whitespace before the '{'.","solutions":["Wrap the interface name in curly braces: '{eth0}:40456' or '{eth0}'.","Trim surrounding whitespace and verify the value is non-empty and starts with '{' and contains '}'.","If you just want to bind by address, use a plain IP form (e.g. '192.168.1.10:40456') instead of the named-interface form."],"exampleFix":"// before (driver config)\nDatagramChannel: interface=eth0:40456\n// after\nDatagramChannel: interface={eth0}:40456","handlingStrategy":"validation","validationCode":"String trimmed = str == null ? \"\" : str.trim(); boolean ok = trimmed.startsWith(\"{\") && trimmed.indexOf('}') > 1; if (!ok) throw new IllegalArgumentException(\"use {name} or {name}:port, got: \" + str);","typeGuard":null,"tryCatchPattern":"try { NamedInterface.parse(value); } catch (IllegalArgumentException e) { log.warn(\"Bad interface spec, expected {name} or {name}:port: \" + value); }","preventionTips":["Always wrap named interfaces in curly braces: {eth0} or {eth0}:40456","Trim whitespace before parsing; leading spaces break the OPENING_CHAR check","Use plain IP:port form if you do not need interface-name resolution"],"tags":["aeron","java","driver","configuration","parse-error"],"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"}