apache/pulsar · critical · RuntimeException
Failed to refresh self owner info.
Error message
Failed to refresh self owner info.
What it means
NamespaceService.initialize refreshes the broker's own ownership entry in the ownership cache at startup. If refreshSelfOwnerInfo() returns false the broker cannot confirm its own ownership record, and initialize throws RuntimeException 'Failed to refresh self owner info.', failing broker startup.
Source
Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/namespace/NamespaceService.java:209
this.config = pulsar.getConfiguration();
this.loadManager = pulsar.getLoadManager();
this.bundleFactory = new NamespaceBundleFactory(pulsar, Hashing.crc32());
this.ownershipCache = new OwnershipCache(pulsar, this);
this.bundleOwnershipListeners = new CopyOnWriteArrayList<>();
this.bundleSplitListeners = new CopyOnWriteArrayList<>();
this.localBrokerDataCache = pulsar.getLocalMetadataStore().getMetadataCache(LocalBrokerData.class);
this.redirectManagerForLoadManagerMigration = new RedirectManagerForLoadManagerMigration(pulsar);
this.lookupLatencyHistogram = pulsar.getOpenTelemetry().getMeter()
.histogramBuilder(LOOKUP_REQUEST_DURATION_METRIC_NAME)
.setDescription("The duration of topic lookup requests (either binary or HTTP)")
.setUnit("s")
.build();
}
public void initialize() {
if (!getOwnershipCache().refreshSelfOwnerInfo()) {
throw new RuntimeException("Failed to refresh self owner info.");
}
}
public CompletableFuture<Optional<LookupResult>> getBrokerServiceUrlAsync(TopicName topic, LookupOptions options) {
long startTime = System.nanoTime();
CompletableFuture<Optional<LookupResult>> future = getBundleAsync(topic)
.thenCompose(bundle -> {
// Do redirection if the cluster is in rollback or deploying.
return redirectIfLoadBalancerOnBrokerIsNotExpected(bundle, options).thenCompose(
optResult -> {
if (optResult.isPresent()) {
log.info()
.attr("brokerId", pulsar.getBrokerId())
.attr("redirect", optResult.get())
.attr("topic", topic)
.log("Redirect lookup request");
return CompletableFuture.completedFuture(optResult);View on GitHub (pinned to 820761864e)
Solutions
- Check broker startup logs and metadata-store connectivity (configurationStoreUrl/brokerServiceUrl, ZK quorum health) and restart the broker once the store is reachable.
- Verify the metadata store session/ACLs allow the broker to write under the ownership namespace path.
- Clean stale ownership znodes/records for this broker if a prior crashed instance left them behind.
- Check for clock/network issues that keep failing the ownership refresh; ensure the metadata store quorum has quiesced after a partition.
Example fix
# before (broker.conf, store down) configurationStoreServers=zk1:2181 # unreachable # after configurationStoreServers=zk1:2181,zk2:2181,zk3:2181 # healthy quorum
Defensive patterns
Strategy: try-catch
Validate before calling
// before broker startup, verify metadata store reachability CuratorFramework zkc = ...; zkc.getZookeeperClient().blockUntilConnectedOrTimedOut(); // fail fast with clear message
Try / catch
try {
namespaceService.initialize();
} catch (RuntimeException e) {
if (e.getMessage().contains("Failed to refresh self owner info")) {
log.error("Metadata store unavailable/misconfigured; aborting broker start", e);
throw e; // fail startup rather than run half-initialized
}
throw e;
} Prevention
- Verify configurationStoreServers/zookeeper connectivity as a startup preflight check.
- Confirm metadata-store ACLs allow brokers to write ownership paths.
- Clean stale ownership records after unclean broker crashes.
- Monitor metadata-store session expirations and quorum health.
When it happens
Trigger: Broker startup calls NamespaceService.initialize and the ownership cache cannot write/refresh the self entry in the metadata store (store unavailable, permission denied, stale conflicting record).
Common situations: Metadata store (ZooKeeper/etcd/rocksdb) unreachable or misconfigured connection string at boot; leftover ownership nodes from a crashed broker; ACL/kerberos issues writing to the store; split-brain after network partitions.
Related errors
- Failed to start zookeeper :${e.getMessage()}
- Metadata store address argument is required (--metadata-stor
- Failed to validate global cluster configuration : ns=%s ems
- Interrupted when connecting to zookeeper server
- Neither METADATA_STORE_INSTANCE configuration set in the BK
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/72b0e3105690fc9d.
Report an issue: GitHub.