apache/pulsar · error · RuntimeException
Unknown runtime ${runtime}
Error message
Unknown runtime ${runtime} What it means
FunctionActioner.getDownloadFileName maps a FunctionDetails runtime to the downloaded file extension (jar/py/go). Any runtime other than JAVA, PYTHON, or GO hits the default branch and a RuntimeException 'Unknown runtime <runtime>' is thrown.
Source
Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionActioner.java:635
}
String[] hierarchy = functionDetails.getClassName().split("\\.");
String fileName;
if (hierarchy.length <= 0) {
fileName = functionDetails.getClassName();
} else if (hierarchy.length == 1) {
fileName = hierarchy[0];
} else {
fileName = hierarchy[hierarchy.length - 2];
}
switch (functionDetails.getRuntime()) {
case JAVA:
return fileName + ".jar";
case PYTHON:
return fileName + ".py";
case GO:
return fileName + ".go";
default:
throw new RuntimeException("Unknown runtime " + functionDetails.getRuntime());
}
}
private void setupBatchSource(FunctionDetails functionDetails) {
if (isBatchSource(functionDetails)) {
String intermediateTopicName = SourceConfigUtils.computeBatchSourceIntermediateTopicName(
functionDetails.getTenant(), functionDetails.getNamespace(), functionDetails.getName()).toString();
String intermediateTopicSubscription = SourceConfigUtils.computeBatchSourceInstanceSubscriptionName(
functionDetails.getTenant(), functionDetails.getNamespace(), functionDetails.getName());
String fqfn = FunctionCommon.getFullyQualifiedName(
functionDetails.getTenant(), functionDetails.getNamespace(), functionDetails.getName());
try {
Actions.newBuilder()
.addAction(
Actions.Action.builder()
.actionName(String.format("Creating intermediate topic"View on GitHub (pinned to 820761864e)
Solutions
- Use JAVA, PYTHON, or GO as the function runtime
- Upgrade the Pulsar functions worker to a version that supports the runtime being submitted
- Inspect the submitted FunctionDetails protobuf for a corrupted runtime value
Example fix
// before FunctionDetails.newBuilder().setRuntime(FunctionDetails.Runtime.UNKNOWN) // after FunctionDetails.newBuilder().setRuntime(FunctionDetails.Runtime.JAVA)
Defensive patterns
Strategy: validation
Validate before calling
int rt = functionDetails.getRuntime();
if (rt != FunctionDetails.Runtime.JAVA_VALUE
&& rt != FunctionDetails.Runtime.PYTHON_VALUE
&& rt != FunctionDetails.Runtime.GO_VALUE) {
throw new IllegalArgumentException("unsupported runtime: " + rt);
} Type guard
boolean isSupportedRuntime(FunctionDetails fd) {
switch (fd.getRuntime()) {
case JAVA: case PYTHON: case GO: return true;
default: return false;
}
} Try / catch
try {
functionActioner.startFunction(...);
} catch (RuntimeException e) {
if (e.getMessage().startsWith("Unknown runtime")) {
// resubmit with JAVA/PYTHON/GO or upgrade the worker
} else { throw e; }
} Prevention
- Only submit functions with runtimes your worker version supports
- Keep client and worker Pulsar versions aligned
- Never hand-edit FunctionDetails protobuf values
When it happens
Trigger: Resolving the package file name for a function whose FunctionDetails.runtime is an unrecognized/unsupported runtime value (e.g. new runtime enum value used by a newer client against an older worker).
Common situations: Submitting functions built with a newer Pulsar client that supports runtimes the deployed worker doesn't know; corrupted/mis-serialized runtime field; custom runtime experiments.
Related errors
- Unsupported Runtime %s
- Log folder creation error
- Unsupported Runtime
- Thread Container only supports Java Runtime
- Function language runtime is either not set or cannot be det
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/a65027ef9bcf69a2.
Report an issue: GitHub.