{"record":{"id":"e86a57c145d7e7f3","repo":"prestodb/presto","slug":"not-supported-e86a57","errorCode":"NOT_SUPPORTED","errorMessage":"%s is not supported in your OS","messagePattern":"(.+?) is not supported in your OS","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"warning","filePath":"presto-main-base/src/main/java/com/facebook/presto/util/SecureRandomGeneration.java","lineNumber":46,"sourceCode":"    {\n        String os = System.getProperty(\"os.name\");\n        return os.startsWith(\"Windows\") ? \"SHA1PRNG\" : \"NativePRNGNonBlocking\";\n    }\n\n    /**\n     * Return a non-blocking instance of SecureRandom, or throw PrestoException if not supported\n     * <p>\n     * With the exception of Windows machines, this uses the NativePRNGNonBlocking algorithm.\n     * On Windows, this uses SHA1PRNG.\n     */\n    public static SecureRandom getNonBlocking()\n    {\n        String algorithm = getNonBlockingAlgorithmName();\n        try {\n            return SecureRandom.getInstance(algorithm);\n        }\n        catch (NoSuchAlgorithmException e) {\n            throw new PrestoException(NOT_SUPPORTED, algorithm + \" is not supported in your OS\", e);\n        }\n    }\n}\n","sourceCodeStart":28,"sourceCodeEnd":50,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main-base/src/main/java/com/facebook/presto/util/SecureRandomGeneration.java#L28-L50","documentation":"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.","triggerScenarios":"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().","commonSituations":"Custom/minimal JRE builds (jlink images) missing security providers; overridden java.security settings removing providers; unusual platforms where NativePRNGNonBlocking is unavailable.","solutions":["Run on a standard JVM/JRE that provides the platform non-blocking algorithm","Ensure the SUN security provider is enabled in java.security","Fall back to the default SecureRandom constructor instead of the non-blocking variant","Upgrade the JDK to a version supporting the algorithm for your OS"],"exampleFix":"// before\nSecureRandom random = SecureRandomGeneration.getNonBlocking(); // NOT_SUPPORTED on stripped JRE\n// after\nSecureRandom random = new SecureRandom(); // uses default, always available","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"SecureRandom random;\ntry {\n    random = SecureRandomGeneration.getNonBlocking();\n} catch (PrestoException e) {\n    if (NOT_SUPPORTED.equals(e.getErrorCode())) {\n        random = new SecureRandom(); // portable fallback\n    } else throw e;\n}","preventionTips":["Test on the exact JRE image you deploy (especially jlink/minimal images)","Do not strip the SUN security provider from java.security","Pin to a standard JDK distribution","Prefer default SecureRandom unless non-blocking behavior is required"],"tags":["security","random","os-compatibility","not-supported"],"backgroundTag":"algorithm-not-supported","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}