apache/cassandra · error · ConfigurationException
No metadata server could be found in lease file.
Error message
No metadata server could be found in lease file.
What it means
CloudstackSnitch reads the Apache CloudStack lease file (typically /var/lib/cloudstack/data/leasefile) to discover the metadata server. If the file exists but contains no usable endpoint after parsing, CloudstackLocationProvider throws this ConfigurationException at startup, since the snitch cannot determine the node's datacenter/rack without it.
Source
Thrown at src/java/org/apache/cassandra/locator/CloudstackLocationProvider.java:130
while ((line = reader.readLine()) != null)
{
Matcher matcher = identifierPattern.matcher(line);
if (matcher.find())
{
endpoint = matcher.group(1);
break;
}
}
}
catch (Exception e)
{
throw new ConfigurationException("CloudstackSnitch cannot access lease file.");
}
if (endpoint == null)
{
throw new ConfigurationException("No metadata server could be found in lease file.");
}
return "http://" + endpoint;
}
}
View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Verify the lease file contains a valid server entry (e.g. 'server=192.168.1.1') and fix or regenerate it via CloudStack
- Confirm cassandra.yaml points cloudkit/lease_file (via cloud-storage-location config) at the real CloudStack lease file path
- If the host is not actually in CloudStack, switch to a different snitch (e.g. GossipingPropertyFileSnitch) in cassandra.yaml
- Restart the CloudStack agent so the lease file is repopulated, then restart Cassandra
Example fix
// before (cassandra.yaml) endpoint_snitch: CloudstackSnitch // after endpoint_snitch: GossipingPropertyFileSnitch
Defensive patterns
Strategy: try-catch
Validate before calling
File f = new File(leaseFilePath);
boolean ok = f.exists() && new String(Files.readAllBytes(f.toPath())).contains("server="); Try / catch
try { DatabaseDescriptor.createEndpointSnitch(...); }
catch (ConfigurationException e) { logger.error("CloudStack lease file unusable: {}", e.getMessage()); throw e; } Prevention
- Assert the lease file exists and contains a server= line before starting Cassandra
- Only use CloudstackSnitch on actual CloudStack instances
- Pin the correct lease file path in cassandra.yaml
When it happens
Trigger: csEndpointFromLease parses the lease file line-by-line expecting an 'server=<ip>' style entry; csMetadataEndpoint calls it and the returned endpoint is null — i.e. the lease file exists but has no recognizable server entry.
Common situations: Empty or malformed lease file on a CloudStack VM; running the snitch on a non-CloudStack host where the file exists but has unrelated content; CloudStack management server not having written its lease entry yet.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Configuration must specify either node_proximity and initial
- Snitch metadata service URL '%s' is invalid. Please review s
- %s as value of %s is invalid duration! %s
- Initial location provider rejected registration location, pl
- %s has authorization enabled which requires %s to enable aut
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/2e28934407207e80.
Report an issue: GitHub.