apache/pulsar · error · RuntimeException

Unsupported Runtime

Error message

Unsupported Runtime 

What it means

ProcessRuntimeFactory.createContainer() switches on the function's declared runtime (FunctionDetails.Runtime) to pick the instance file; GO is intentionally a no-op here, but any other/unmapped runtime value (e.g. unknown enum from a newer client or a corrupted FunctionDetails) reaches default and throws RuntimeException('Unsupported Runtime ' + runtime).

Source

Thrown at pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/process/ProcessRuntimeFactory.java:213

    @Override
    public ProcessRuntime createContainer(InstanceConfig instanceConfig, String codeFile,
                                          String originalCodeFileName,
                                          String transformFunctionFile,
                                          String originalTransformFunctionFileName,
                                          Long expectedHealthCheckInterval) throws Exception {
        String instanceFile = null;
        switch (instanceConfig.getFunctionDetails().getRuntime()) {
            case JAVA:
                instanceFile = javaInstanceJarFile;
                break;
            case PYTHON:
                instanceFile = pythonInstanceFile;
                break;
            case GO:
                break;
            default:
                throw new RuntimeException("Unsupported Runtime " + instanceConfig.getFunctionDetails().getRuntime());
        }

        // configure auth if necessary
        if (authenticationEnabled) {
            authProvider
                    .ifPresent(functionAuthProvider -> functionAuthProvider.configureAuthenticationConfig(authConfig,
                            Optional.ofNullable(getFunctionAuthData(
                                    Optional.ofNullable(instanceConfig.getFunctionAuthenticationSpec())))));
        }

        return new ProcessRuntime(
            instanceConfig,
            instanceFile,
            extraDependenciesDir,
            narExtractionDirectory,
            logDirectory,
            codeFile,
            transformFunctionFile,

View on GitHub (pinned to 820761864e)

Solutions

  1. Upgrade the function worker to a version that recognizes the function's runtime value.
  2. Verify the function was built/submitted with the runtime field set to JAVA, PYTHON, or GO only.
  3. Re-submit the function with a corrected runtime if a bad FunctionDetails was uploaded.
  4. Align client and cluster versions during rolling upgrades to avoid enum skew.

Example fix

// before (submitted with unsupported/unknown runtime)
FunctionDetails.newBuilder().setRuntime(runtime)
// after
FunctionDetails.newBuilder().setRuntime(FunctionDetails.Runtime.JAVA) // JAVA | PYTHON | GO only
Defensive patterns

Strategy: validation

Validate before calling

FunctionDetails.Runtime rt = instanceConfig.getFunctionDetails().getRuntime();
if (rt != FunctionDetails.Runtime.JAVA && rt != FunctionDetails.Runtime.PYTHON && rt != FunctionDetails.Runtime.GO) {
    throw new IllegalArgumentException("Runtime not supported by this worker: " + rt);
}

Type guard

boolean isSupportedRuntime(FunctionDetails.Runtime rt) {
    return rt == FunctionDetails.Runtime.JAVA
        || rt == FunctionDetails.Runtime.PYTHON
        || rt == FunctionDetails.Runtime.GO;
}

Try / catch

try {
    container = factory.createContainer(instanceConfig, ...);
} catch (RuntimeException e) {
    if (e.getMessage() != null && e.getMessage().startsWith("Unsupported Runtime")) {
        // upgrade worker or resubmit function with a supported runtime
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling createContainer for a function whose FunctionDetails.runtime is not JAVA, PYTHON, or GO as known by this worker version — typically a runtime enum value introduced by a newer Pulsar client/worker or a malformed submitted FunctionDetails.

Common situations: Submitting functions built with a newer Pulsar client to an older function worker; a PROTO/unknown runtime value sneaking into FunctionDetails; running GO functions on a setup where the switch was left empty and a fallback path misroutes; version-skew during rolling upgrades.

Related errors


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/fb59a4ad3bfbc9fa. Report an issue: GitHub.