{"record":{"id":"89af7fd752c15441","repo":"apache/cassandra","slug":"configured-configname-intf-could-not-be-fo","errorCode":null,"errorMessage":"Configured ${configName} \"${intf}\" could not be found","messagePattern":"Configured (.+?) \"(.+?)\" could not be found","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/config/DatabaseDescriptor.java","lineNumber":542,"sourceCode":"                                     : FBUtilities.construct(loaderClass, \"configuration loading\", ConfigurationLoader.class);\n        Config config = loader.loadConfig();\n\n        if (!hasLoggedConfig)\n        {\n            hasLoggedConfig = true;\n            Config.log(config);\n        }\n\n        return config;\n    }\n\n    private static InetAddress getNetworkInterfaceAddress(String intf, String configName, boolean preferIPv6) throws ConfigurationException\n    {\n        try\n        {\n            NetworkInterface ni = NetworkInterface.getByName(intf);\n            if (ni == null)\n                throw new ConfigurationException(\"Configured \" + configName + \" \\\"\" + intf + \"\\\" could not be found\", false);\n            Enumeration<InetAddress> addrs = ni.getInetAddresses();\n            if (!addrs.hasMoreElements())\n                throw new ConfigurationException(\"Configured \" + configName + \" \\\"\" + intf + \"\\\" was found, but had no addresses\", false);\n\n            /*\n             * Try to return the first address of the preferred type, otherwise return the first address\n             */\n            InetAddress retval = null;\n            while (addrs.hasMoreElements())\n            {\n                InetAddress temp = addrs.nextElement();\n                if (preferIPv6 && temp instanceof Inet6Address) return temp;\n                if (!preferIPv6 && temp instanceof Inet4Address) return temp;\n                if (retval == null) retval = temp;\n            }\n            return retval;\n        }\n        catch (SocketException e)","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/DatabaseDescriptor.java#L524-L560","documentation":"DatabaseDescriptor.getNetworkInterfaceAddress resolves a configured interface name (for listen/broadcast/rpc addresses) via java.net.NetworkInterface.getByName. If no interface with that name exists on the host, a ConfigurationException is thrown before Cassandra can bind.","triggerScenarios":"cassandra.yaml sets listen_interface, broadcast_interface, or rpc_interface to a name (e.g. eth1, en0) that does not exist on the machine; DatabaseDescriptor.applyAddressConfig calls this during daemon initialization.","commonSituations":"Copying cassandra.yaml from another machine or VM with different NIC names, container/host network interface renaming (eth0 vs ens5), or typos in the interface name.","solutions":["Run 'ip link' (Linux) or 'ifconfig -a' to list actual interface names and fix cassandra.yaml","Use listen_address with an explicit IP instead of listen_interface if the interface name is unstable","For containers/VMs, verify the interface exists inside the environment Cassandra runs in"],"exampleFix":"# before (cassandra.yaml)\nlisten_interface: eth1\n# after\nlisten_interface: eth0\n# or explicit address\nlisten_address: 10.0.0.5","handlingStrategy":"validation","validationCode":"boolean exists = Collections.list(NetworkInterface.getNetworkInterfaces()).stream().anyMatch(ni -> ni.getName().equals(configuredIntf)); if (!exists) throw new IllegalStateException(\"interface not found: \" + configuredIntf);","typeGuard":null,"tryCatchPattern":"try { DatabaseDescriptor.daemonInitialization(); } catch (ConfigurationException e) { log.error(\"startup config error: {}\", e.getMessage()); System.exit(1); }","preventionTips":["Match interface names per-host rather than copying yaml between machines","Prefer explicit listen_address IPs in containers where NIC names vary","Verify with 'ip link' before deploying new hardware/VM images"],"tags":["cassandra","config","network","startup"],"backgroundTag":"resource-not-found","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"}