{"record":{"id":"101ca6cfe072bd0a","repo":"apache/cassandra","slug":"unable-to-read-cassandra-topology-properties","errorCode":null,"errorMessage":"Unable to read cassandra-topology.properties","messagePattern":"Unable to read cassandra-topology\\.properties","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"critical","filePath":"src/java/org/apache/cassandra/locator/TopologyFileLocationProvider.java","lineNumber":104,"sourceCode":"        {\n            return new Location(DEFAULT_DC, DEFAULT_RACK);\n        }\n        else\n        {\n            return new Location(parts[0].trim(), parts[1].trim());\n        }\n    }\n\n    private Location loadConfiguration() throws ConfigurationException\n    {\n        Properties properties = new Properties();\n        try (InputStream stream = getClass().getClassLoader().getResourceAsStream(PROPERTIES_FILENAME))\n        {\n            properties.load(stream);\n        }\n        catch (Exception e)\n        {\n            throw new ConfigurationException(\"Unable to read \" + PROPERTIES_FILENAME, e);\n        }\n\n        Location local = null;\n        InetAddressAndPort broadcastAddress = FBUtilities.getBroadcastAddressAndPort();\n        for (Map.Entry<Object, Object> entry : properties.entrySet())\n        {\n            String key = (String) entry.getKey();\n            String value = (String) entry.getValue();\n            if (DEFAULT_PROPERTY.equals(key))\n                continue;\n\n            String hostString = StringUtils.remove(key, '/');\n            try\n            {\n                InetAddressAndPort host = InetAddressAndPort.getByName(hostString);\n                if (host.equals(broadcastAddress))\n                {\n                    local = makeLocation(value);","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/locator/TopologyFileLocationProvider.java#L86-L122","documentation":"TopologyFileLocationProvider reads cassandra-topology.properties from the classpath to map node IPs to datacenter/rack locations. If the properties stream cannot be opened or loaded, loadConfiguration wraps the underlying exception in a ConfigurationException with this message, aborting node startup since location resolution is mandatory.","triggerScenarios":"Starting a node with a file-based topology snitch where cassandra-topology.properties is missing from the classpath, unreadable, or malformed (properties.load throws).","commonSituations":"File absent in conf/ or not on the classpath; wrong file permissions; syntax errors in the properties file; running in a container where the config volume was not mounted.","solutions":["Place a valid cassandra-topology.properties in conf/ and ensure it is on the classpath","Fix file permissions/syntax errors in the file (check the wrapped cause in the log)","Set the correct config path (e.g. via cassandra-topology.properties system property / -Dcassandra.config) and restart"],"exampleFix":"// before (cassandra-topology.properties missing from conf/)\nls conf/cassandra-topology.properties -> No such file\n// after\n# conf/cassandra-topology.properties\n192.168.0.1=dc1:rack1\n192.168.0.2=dc1:rack1","handlingStrategy":"validation","validationCode":"java.io.File f = new File(\"conf/cassandra-topology.properties\");\nif (!f.isFile() || !f.canRead()) throw new IllegalStateException(\"cassandra-topology.properties missing or unreadable\");\ntry (InputStream in = new FileInputStream(f)) { new Properties().load(in); }","typeGuard":null,"tryCatchPattern":"try { startNode(); }\ncatch (ConfigurationException e) { if (e.getMessage().contains(\"Unable to read cassandra-topology.properties\")) { /* inspect cause, repair file/classpath, restart */ } }","preventionTips":["Ship cassandra-topology.properties with every node image/package","Verify config file presence and readability in the startup entrypoint","Keep topology property syntax validated in CI"],"tags":["configuration","snitch","properties-file"],"backgroundTag":"config-file-not-found","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}