apache/pulsar · error · RestException
%s %s doesn't exist
Error message
%s %s doesn't exist
What it means
Thrown by deregisterFunction when the Functions worker's FunctionMetaDataManager has no record of a component with the given tenant/namespace/name. The worker treats any unknown component as NOT_FOUND, prefixed with the component type (Function, Sink, Source) resolved from the requested componentType. It is a server-side 404 surfaced as a RestException.
Source
Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java:474
try {
validateDeregisterRequestParams(tenant, namespace, componentName, componentType);
} catch (IllegalArgumentException e) {
log.error().attr("componentType", ComponentTypeUtils.toString(componentType)).attr("tenant", tenant)
.attr("namespace", namespace).attr("componentName", componentName).exception(e)
.log("Invalid deregister request @ / / /");
throw new RestException(Status.BAD_REQUEST, e.getMessage());
}
FunctionMetaDataManager functionMetaDataManager = worker().getFunctionMetaDataManager();
if (!functionMetaDataManager.containsFunction(tenant, namespace, componentName)) {
log.error().attr("componentType", ComponentTypeUtils.toString(componentType)).attr("tenant", tenant)
.attr("namespace", namespace).attr("componentName", componentName)
.log("to deregister does not exist @ / / /");
throw new RestException(Status.NOT_FOUND,
String.format("%s %s doesn't exist", ComponentTypeUtils.toString(componentType), componentName));
}
FunctionMetaData functionMetaData =
functionMetaDataManager.getFunctionMetaData(tenant, namespace, componentName);
if (!InstanceUtils.calculateSubjectType(functionMetaData.getFunctionDetails()).equals(componentType)) {
log.error().attr("tenant", tenant).attr("namespace", namespace).attr("componentName", componentName)
.attr("componentType", ComponentTypeUtils.toString(componentType)).log("/ / is not a");
throw new RestException(Status.NOT_FOUND,
String.format("%s %s doesn't exist", ComponentTypeUtils.toString(componentType), componentName));
}
FunctionMetaData newVersionedMetaData =
FunctionMetaDataUtils.incrMetadataVersion(functionMetaData, functionMetaData);
internalProcessFunctionRequest(newVersionedMetaData.getFunctionDetails().getTenant(),
newVersionedMetaData.getFunctionDetails().getNamespace(),
newVersionedMetaData.getFunctionDetails().getName(),View on GitHub (pinned to 820761864e)
Solutions
- Verify the function exists first: GET /admin/v3/functions/{tenant}/{namespace}/{functionName} and confirm the exact tenant/namespace/name used in the delete call.
- Correct typos in tenant, namespace, or componentName in the request path.
- Retry after the metadata has propagated; if hitting a worker that lacks the record, retry against another worker or wait for the function metadata topic to sync.
- Treat HTTP 404 as idempotent success in automation that deletes functions.
Example fix
// before
delFunction(tenant, namespace, fn); // throws 404 if already gone
// after
if (admin.functions().getFunction(tenant, namespace, fn) != null) {
delFunction(tenant, namespace, fn);
} // or catch NotFoundException and treat as success Defensive patterns
Strategy: validation
Validate before calling
boolean exists = admin.functions().getFunctions(tenant, namespace).contains(functionName);
if (!exists) { /* skip delete or log-and-continue */ } Try / catch
try { admin.functions().deleteFunction(t, n, fn); }
catch (PulsarAdminException.NotFoundException e) { log.info("already deleted: {}", fn); } Prevention
- List functions for the namespace before deleting by name.
- Make delete idempotent: treat 404 as success in cleanup jobs.
- Single-source tenant/namespace/name constants instead of hand-typed paths.
When it happens
Trigger: Calling DELETE /admin/v3/functions/{tenant}/{namespace}/{functionName} (or sink/source equivalents) when functionMetaDataManager.containsFunction(tenant, namespace, componentName) returns false — i.e. the function was never registered, already deleted, or the request hit a worker that hasn't yet synced the function metadata topic.
Common situations: Typo in the function name or tenant/namespace path; deleting a function twice; delete racing with another worker's metadata-topic replication delay; cluster where the function exists only on another cluster's workers; cleanup scripts firing after an operator already removed the function.
Related errors
- <componentType> %s doesn't exist
- Function %s doesn't exist
- %s %s doesn't exist
- %s %s doesn't exist
- %s %s doesn't exist
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/8527a30ae8f5903c.
Report an issue: GitHub.