apache/cassandra · critical · IllegalArgumentException

Can not initialize CMS without any seeds

Error message

Can not initialize CMS without any seeds

What it means

During CMS (Cluster Metadata Service) initialization mode selection, a node booting without existing ClusterMetadata must have seed endpoints configured; if the seed list is empty and no unsafe boot-with-clustermetadata override is set, it throws IllegalArgumentException because there is no way to discover or seed cluster metadata.

Source

Thrown at src/java/org/apache/cassandra/tcm/Startup.java:801

        /**
         * Node is starting for the first time, and is a designated first CMS node and can become a first CMS
         * node upon boot.
         */
        FIRST_CMS,
        /**
         * Node has to pick Cluster Metadata from the specified file. Used for testing and for (improbable) disaster recovery.
         */
        BOOT_WITH_CLUSTERMETADATA;

        static StartupMode get(Set<InetAddressAndPort> seeds)
        {
            if (CassandraRelevantProperties.TCM_UNSAFE_BOOT_WITH_CLUSTERMETADATA.isPresent())
            {
                logger.warn("Booting with ClusterMetadata from file: " + CassandraRelevantProperties.TCM_UNSAFE_BOOT_WITH_CLUSTERMETADATA.getString());
                return BOOT_WITH_CLUSTERMETADATA;
            }
            if (seeds.isEmpty())
                throw new IllegalArgumentException("Can not initialize CMS without any seeds");
            boolean hasAnyEpoch = SystemKeyspaceStorage.hasAnyEpoch();

            // For CCM and local dev clusters
            boolean isOnlySeed = DatabaseDescriptor.getSeeds().size() == 1
                                 && DatabaseDescriptor.getSeeds().contains(FBUtilities.getBroadcastAddressAndPort())
                                 && DatabaseDescriptor.getSeeds().iterator().next().getAddress().isLoopbackAddress();
            boolean hasBootedBefore = SystemKeyspace.getLocalHostId() != null;
            logger.info("hasAnyEpoch = {}, hasBootedBefore = {}", hasAnyEpoch, hasBootedBefore);
            if (!hasAnyEpoch && hasBootedBefore &&
                // Atomic long processor currently does not support upgrades
                !CassandraRelevantProperties.TCM_USE_ATOMIC_LONG_PROCESSOR.getBoolean())
                return UPGRADE;
            else if (hasAnyEpoch)
                return NORMAL;
            else if (isOnlySeed)
                return FIRST_CMS;
            else
                return VOTE;

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Set cassandra.seed_provider class_name SimpleSeedProvider and seeds list in cassandra.yaml to at least one running node
  2. For dev/CCM-only, optionally set TCM_UNSAFE_BOOT_WITH_CLUSTERMETADATA to boot with metadata from file (unsafe, dev only)
  3. Restart the node after fixing seeds
  4. Validate the effective config (system log prints seeds at startup) to confirm the list is populated

Example fix

// before (cassandra.yaml)
seed_provider:
  - class_name: SimpleSeedProvider
    seeds: []
// after
seed_provider:
  - class_name: SimpleSeedProvider
    seeds: ["10.0.0.1:7000"]
Defensive patterns

Strategy: validation

Validate before calling

if (DatabaseDescriptor.getSeeds().isEmpty())
    throw new IllegalArgumentException("cassandra.seed_provider seeds must be non-empty");

Prevention

When it happens

Trigger: Startup with empty cassandra.seed_provider seeds list on a node that must select a CMS discovery mode (no boot-with-clustermetadata property present).

Common situations: Fresh install where seeds were never set in cassandra.yaml; templating/config-management rendered an empty seeds value; copying a config that expects env-var substitution that didn't happen.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/63bbaab86791cb19. Report an issue: GitHub.