apache/pulsar · error · RestException
Replicator not found
Error message
Replicator not found
What it means
Admin API sentinel used when a topic's replicator lookup fails: getReplicatorReference throws (or returns null triggering this error) because no replicator with the given remote cluster name exists on the persistent topic — typically the cluster was never configured as a replication cluster for the namespace, or the replicator was deleted.
Source
Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:4766
if (ex != null || createdSubscription == null) {
throw new RestException(Status.NOT_FOUND,
getSubNotFoundErrorMessage(topicName.toString(), subName));
}
return createdSubscription;
});
});
}
/**
* Get the Replicator object reference from the Topic reference.
*/
private PersistentReplicator getReplicatorReference(String replName, PersistentTopic topic) {
try {
String remoteCluster = PersistentReplicator.getRemoteCluster(replName);
PersistentReplicator repl = (PersistentReplicator) topic.getPersistentReplicator(remoteCluster);
return checkNotNull(repl);
} catch (Exception e) {
throw new RestException(Status.NOT_FOUND, "Replicator not found");
}
}
// as described at : (PR: #836) CPP-client old client lib should not be allowed to connect on partitioned-topic.
// So, all requests from old-cpp-client (< v1.21) must be rejected.
// Pulsar client-java lib always passes user-agent as X-Java-$version.
// However, cpp-client older than v1.20 (PR #765) never used to pass it.
// So, request without user-agent and Pulsar-CPP-vX (X < 1.21) must be rejected
protected CompletableFuture<Void> internalValidateClientVersionAsync() {
if (!pulsar().getConfiguration().isClientLibraryVersionCheckEnabled()) {
return CompletableFuture.completedFuture(null);
}
final String userAgent = httpRequest.getHeader("User-Agent");
if (StringUtils.isBlank(userAgent)) {
return FutureUtil.failedFuture(new RestException(Status.METHOD_NOT_ALLOWED,
"Client lib is not compatible to"
+ " access partitioned metadata: version in user-agent is not present"));
}View on GitHub (pinned to 820761864e)
Solutions
- Verify the cluster is in the namespace's replicationClusters
- Check the replication producer/replicator state in topic stats before operating on it
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:4766 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/cc6217685b00c3d3.
Report an issue: GitHub.