aeron-io/aeron · error · AsciiNumberFormatException

Property = is not a number

Error message

Property ${STREAM_SESSION_LIMIT_PROP_NAME}=${streamSessionLimitString} is not a number

What it means

The driver configuration reads the stream session limit property (aeron.driver.stream.session.limit) and parses it as an int. If the property string is non-empty but not a valid integer, Integer.parseInt throws NumberFormatException, which is rethrown as AsciiNumberFormatException naming the property and its offending value so the driver fails fast at startup rather than using a garbage value.

Solutions

  1. Set the property to a plain integer, e.g. -Daeron.driver.stream.session.limit=100
  2. Remove the property entirely to use STREAM_SESSION_LIMIT_DEFAULT
  3. Check the driver properties file (aeron.driver.properties) for typos, whitespace, or quotes in the value

Example fix

// before
-Daeron.driver.stream.session.limit="100"
// after
-Daeron.driver.stream.session.limit=100
Defensive patterns

Strategy: validation

Validate before calling

String v = System.getProperty("aeron.driver.stream.session.limit");
if (v != null && !v.isBlank()) { Integer.parseInt(v.trim()); } // throws early with your own message

Type guard

boolean isValidIntConfig(String s) { if (s == null || s.isBlank()) return true; try { Integer.parseInt(s.trim()); return true; } catch (NumberFormatException e) { return false; } }

Try / catch

try { startDriver(cfg); } catch (AsciiNumberFormatException e) { log.fatal("bad driver config: " + e.getMessage()); System.exit(1); }

Prevention

When it happens

Trigger: Setting the system property aeron.driver.stream.session.limit (or the corresponding context value) to a non-numeric string like "ten", "10x", or "" with surrounding junk characters when Configuration.streamSessionLimit() is invoked.

Common situations: Typo in a driver properties file, quoting mistakes in JVM -D flags, or environment-derived values interpolated as strings into numeric config.

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 aeron-io/aeron@6d60124e15 (2026-09-12). Data as JSON: /api/errors/ddd4bb23d86b9ae5. Report an issue: GitHub.

Appendix: source

Thrown at aeron-driver/src/main/java/io/aeron/driver/Configuration.java:2420

    /**
     * Get the configured limit for the number of streams per session.
     *
     * @return configured session limit
     * @throws AsciiNumberFormatException if the property referenced by {@link #STREAM_SESSION_LIMIT_PROP_NAME} is not
     *                                    a valid number
     */
    public static int streamSessionLimit()
    {
        final String streamSessionLimitString = getProperty(STREAM_SESSION_LIMIT_PROP_NAME);
        try
        {
            return Strings.isEmpty(streamSessionLimitString) ?
                STREAM_SESSION_LIMIT_DEFAULT : Integer.parseInt(streamSessionLimitString);
        }
        catch (final NumberFormatException ex)
        {
            throw new AsciiNumberFormatException(
                "Property " + STREAM_SESSION_LIMIT_PROP_NAME + "=" + streamSessionLimitString + " is not a number");
        }
    }

    /**
     * Validate that the initial window length is greater than MTU.
     *
     * @param initialWindowLength to be validated.
     * @param mtuLength           against which to validate.
     */
    public static void validateInitialWindowLength(final int initialWindowLength, final int mtuLength)
    {
        if (mtuLength > initialWindowLength)
        {
            throw new ConfigurationException(
                "mtuLength=" + mtuLength + " > initialWindowLength=" + initialWindowLength);
        }
    }

View on GitHub (pinned to 6d60124e15)