apache/cassandra · warning

Cassandra server running in degraded mode.

Error message

Cassandra server running in degraded mode. 

What it means

The checkSystemCheck startup check inspects OS-level settings via FBUtilities.getSystemInfo().isDegraded(). When the host's kernel settings are below Cassandra's recommendations (e.g. vm.max_map_count, fs.file-max, somaxconn, swappiness-related knobs exposed by SystemInfo), it logs a warning listing the degradations; otherwise it logs an informational 'optimal performance' message. Startup continues either way.

Source

Thrown at src/java/org/apache/cassandra/service/StartupChecks.java:685

                throw new StartupException(StartupException.ERR_WRONG_MACHINE_STATE, "The native library could not be initialized properly. ");
        }
    };

    public static final StartupCheck checkProcessEnvironment = new StartupCheck()
    {
        @Override
        public String name()
        {
            return "process_environment";
        }

        @Override
        public void execute(StartupChecksConfiguration configuration)
        {
            Optional<String> degradations = FBUtilities.getSystemInfo().isDegraded();

            if (degradations.isPresent())
                logger.warn("Cassandra server running in degraded mode. " + degradations.get());
            else
                logger.info("Checked OS settings and found them configured for optimal performance.");
        }
    };

    public static final StartupCheck checkReadAheadKbSetting = new StartupCheck()
    {
        @Override
        public String name()
        {
            return "read_ahead_kb_setting";
        }

        // This value is in KB.
        private static final long MAX_RECOMMENDED_READ_AHEAD_KB_SETTING = 128;

        /**
         * Function to get the block device system path(Example: /dev/sda) from the

View on GitHub (pinned to 88fd0f6a0e)

Solutions

  1. Read the appended degradation detail in the log line; it names each failing setting.
  2. Apply the recommended sysctl values in /etc/sysctl.d/ (e.g. vm.max_map_count=1048575, fs.file-max, net.core.somaxconn) and re-run sysctl --system.
  3. In containers, set the sysctls in the container runtime/Kubernetes securityContext (where allowed) or on the host.
  4. Re-start Cassandra and confirm the 'Checked OS settings and found them configured for optimal performance.' info message.

Example fix

# before
cat /proc/sys/vm/max_map_count  -> 65530
# after
echo 'vm.max_map_count=1048575' > /etc/sysctl.d/99-cassandra.conf && sysctl --system
Defensive patterns

Strategy: validation

Validate before calling

#!/bin/sh
# prestart sysctl guard
for kv in "vm.max_map_count:1048575" "fs.file-max:100000" "net.core.somaxconn:4096"; do
  k=${kv%%:*}; need=${kv##*:}; have=$(cat /proc/sys/$k 2>/dev/null || echo 0);
  [ "$have" -ge "$need" ] || echo "DEGRADED: $k=$have (want >= $need)";
done

Prevention

When it happens

Trigger: Starting Cassandra on a host whose kernel parameters (sysctl) are below required thresholds, so FBUtilities.getSystemInfo().isDegraded() returns a non-empty Optional.

Common situations: Bare-metal hosts or containers where sysctls were never tuned, Kubernetes pods with restricted /proc/sys, shared hosts where another admin lowered limits, fresh VM images without cassandra sysctl tuning.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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