{"record":{"id":"3eb5b24ae950a4f9","repo":"apache/cassandra","slug":"listen-address-cannot-be-a-wildcard-address","errorCode":null,"errorMessage":"listen_address cannot be a wildcard address (","messagePattern":"listen_address cannot be a wildcard address \\(","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":1521,"sourceCode":"\n        /* Local IP, hostname or interface to bind services to */\n        if (config.listen_address != null && config.listen_interface != null)\n        {\n            throw new ConfigurationException(\"Set listen_address OR listen_interface, not both\", false);\n        }\n        else if (config.listen_address != null)\n        {\n            try\n            {\n                listenAddress = InetAddress.getByName(config.listen_address);\n            }\n            catch (UnknownHostException e)\n            {\n                throw new ConfigurationException(\"Unknown listen_address '\" + config.listen_address + '\\'', false);\n            }\n\n            if (listenAddress.isAnyLocalAddress())\n                throw new ConfigurationException(\"listen_address cannot be a wildcard address (\" + config.listen_address + \")!\", false);\n        }\n        else if (config.listen_interface != null)\n        {\n            listenAddress = getNetworkInterfaceAddress(config.listen_interface, \"listen_interface\", config.listen_interface_prefer_ipv6);\n        }\n\n        /* Gossip Address to broadcast */\n        if (config.broadcast_address != null)\n        {\n            try\n            {\n                broadcastAddress = InetAddress.getByName(config.broadcast_address);\n            }\n            catch (UnknownHostException e)\n            {\n                throw new ConfigurationException(\"Unknown broadcast_address '\" + config.broadcast_address + '\\'', false);\n            }\n","sourceCodeStart":1503,"sourceCodeEnd":1539,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L1503-L1539","documentation":"After successfully resolving listen_address, Cassandra rejects wildcard (0.0.0.0 / ::) values. A node's listen address must be a specific interface address so gossip can identify it; binding to all interfaces is not a valid node identity and throws this ConfigurationException.","triggerScenarios":"config.listen_address resolves to InetAddress.isAnyLocalAddress() == true, e.g. listen_address: 0.0.0.0 or :: in cassandra.yaml.","commonSituations":"Copying rpc_address: 0.0.0.0 style configs into listen_address; misunderstanding that 0.0.0.0 is only acceptable for rpc_address; cloud templates that default listen_address to 0.0.0.0.","solutions":["Set listen_address to the node's specific IP (e.g. 10.0.0.5) in cassandra.yaml.","Use listen_interface: eth0 instead if you want automatic interface detection.","Remember 0.0.0.0 is only valid for rpc_address/broadcast settings semantics, never listen_address or broadcast_address."],"exampleFix":"# before (cassandra.yaml)\nlisten_address: 0.0.0.0\n# after\nlisten_address: 10.0.0.5","handlingStrategy":"validation","validationCode":"addr = yaml['listen_address']\nraise 'listen_address cannot be a wildcard address' if %w[0.0.0.0 ::].include?(addr)","typeGuard":null,"tryCatchPattern":"catch (ConfigurationException e) { logger.error(\"listen_address is wildcard: {}\", e.getMessage()); System.exit(2); }","preventionTips":["Never template listen_address as 0.0.0.0","Use listen_interface for auto-detection of a specific NIC","Document that wildcards are only acceptable for rpc_address"],"tags":["configuration","network","wildcard-address","cassandra"],"backgroundTag":"invalid-argument-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}