prestodb/presto · warning · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

%s is not supported in your OS

What it means

Presto's SecureRandomGeneration.getNonBlocking requests the OS-specific non-blocking SecureRandom algorithm (e.g. NativePRNGNonBlocking or Windows-PRNG). If the JVM reports NoSuchAlgorithmException for that algorithm, it throws PrestoException NOT_SUPPORTED stating the algorithm is not supported in your OS. This indicates a JVM/OS combination lacking the expected secure-random provider.

Source

Thrown at presto-main-base/src/main/java/com/facebook/presto/util/SecureRandomGeneration.java:46

    {
        String os = System.getProperty("os.name");
        return os.startsWith("Windows") ? "SHA1PRNG" : "NativePRNGNonBlocking";
    }

    /**
     * Return a non-blocking instance of SecureRandom, or throw PrestoException if not supported
     * <p>
     * With the exception of Windows machines, this uses the NativePRNGNonBlocking algorithm.
     * On Windows, this uses SHA1PRNG.
     */
    public static SecureRandom getNonBlocking()
    {
        String algorithm = getNonBlockingAlgorithmName();
        try {
            return SecureRandom.getInstance(algorithm);
        }
        catch (NoSuchAlgorithmException e) {
            throw new PrestoException(NOT_SUPPORTED, algorithm + " is not supported in your OS", e);
        }
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Run on a standard JVM/JRE that provides the platform non-blocking algorithm
  2. Ensure the SUN security provider is enabled in java.security
  3. Fall back to the default SecureRandom constructor instead of the non-blocking variant
  4. Upgrade the JDK to a version supporting the algorithm for your OS

Example fix

// before
SecureRandom random = SecureRandomGeneration.getNonBlocking(); // NOT_SUPPORTED on stripped JRE
// after
SecureRandom random = new SecureRandom(); // uses default, always available
Defensive patterns

Strategy: fallback

Try / catch

SecureRandom random;
try {
    random = SecureRandomGeneration.getNonBlocking();
} catch (PrestoException e) {
    if (NOT_SUPPORTED.equals(e.getErrorCode())) {
        random = new SecureRandom(); // portable fallback
    } else throw e;
}

Prevention

When it happens

Trigger: Running on a JVM/OS without the platform's non-blocking SecureRandom algorithm registered (unusual JRE, stripped security providers, exotic OS), when code calls getNonBlocking().

Common situations: Custom/minimal JRE builds (jlink images) missing security providers; overridden java.security settings removing providers; unusual platforms where NativePRNGNonBlocking is unavailable.

Understand the failure class

Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/e86a57c145d7e7f3. Report an issue: GitHub.