aeron-io/aeron · error · AeronException

ERROR

ERROR

Error message

unable to create SecureRandom for algorithm=${secureRandomAlgorithm}

What it means

Archive's secureRandomSupplier obtains a java.security.SecureRandom via SecureRandom.getInstance(algorithm). If the JVM provider does not support the configured algorithm, NoSuchAlgorithmException is caught and rethrown as an AeronException with error code ERROR. This is a fatal configuration/JVM-provider mismatch.

Solutions

  1. Use a widely supported algorithm name such as 'SHA1PRNG' or 'NativePRNG', or null to use the default SecureRandom constructor.
  2. Check available algorithms via Security.getProviders() / java.security to pick a supported one.
  3. Install a security provider that implements the desired algorithm before archive startup.

Example fix

// before
ctx.secureRandomAlgorithm("Windows-PRNG"); // on Linux JVM
// after
ctx.secureRandomAlgorithm("SHA1PRNG");
Defensive patterns

Strategy: validation

Validate before calling

try {
    SecureRandom.getInstance(secureRandomAlgorithm);
} catch (NoSuchAlgorithmException e) {
    throw new IllegalArgumentException("Unsupported SecureRandom algorithm: " + secureRandomAlgorithm, e);
}

Try / catch

try {
    Archive.launch(ctx);
} catch (AeronException e) {
    if (e.getMessage().startsWith("unable to create SecureRandom")) {
        ctx.secureRandomAlgorithm("SHA1PRNG"); // fall back to a widely supported algorithm
    }
}

Prevention

When it happens

Trigger: Setting Archive.Context.secureRandomAlgorithm(...) (or a custom secureRandomSupplier path) to an algorithm name unavailable in the JDK's security providers, e.g. a platform-specific name.

Common situations: Running on a trimmed JVM or FIPS environment where the default provider set differs; copying an algorithm name from different JDK documentation.

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/bb4f532b076fbac8. Report an issue: GitHub.

Appendix: source

Thrown at aeron-archive/src/main/java/io/aeron/archive/Archive.java:3654

         * @return instance of SecureRandom
         * @throws AeronException if there is a problem resolving the algorithm
         */
        public SecureRandom secureRandom()
        {
            try
            {
                if ("strong".equalsIgnoreCase(secureRandomAlgorithm))
                {
                    return SecureRandom.getInstanceStrong();
                }
                else
                {
                    return SecureRandom.getInstance(secureRandomAlgorithm);
                }
            }
            catch (final NoSuchAlgorithmException ex)
            {
                throw new AeronException(
                    "unable to create SecureRandom for algorithm=" + secureRandomAlgorithm, ex, ERROR);
            }
        }

        CountDownLatch abortLatch()
        {
            return abortLatch;
        }

        void concludeRecordChecksum()
        {
            if (null == recordChecksum)
            {
                final String checksumClass = Configuration.recordChecksum();
                if (!Strings.isEmpty(checksumClass))
                {
                    recordChecksum = Checksums.newInstance(checksumClass);
                }

View on GitHub (pinned to 6d60124e15)