apache/pulsar · error · PulsarAdminException
Error offloading: ${lastError}
Error message
Error offloading: ${lastError} What it means
During tiered-storage offload, the CLI polls offload status; if the status is ERROR, it prints 'Error in offload' and throws PulsarAdminException with the broker-reported lastError. The offload to the configured storage provider failed server-side.
Source
Thrown at pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java:1465
while (wait && status.getStatus() == LongRunningProcessStatus.Status.RUNNING) {
Thread.sleep(1000);
status = getTopics().offloadStatus(persistentTopic);
}
switch (status.getStatus()) {
case NOT_RUN:
System.out.println("Offload has not been run for " + persistentTopic
+ " since broker startup");
break;
case RUNNING:
System.out.println("Offload is currently running");
break;
case SUCCESS:
System.out.println("Offload was a success");
break;
case ERROR:
System.out.println("Error in offload");
throw new PulsarAdminException("Error offloading: " + status.getLastError());
}
} catch (InterruptedException e) {
throw new PulsarAdminException(e);
}
}
}
@Command(description = "get the last commit message id of topic")
private class GetLastMessageId extends CliCommand {
@Parameters(description = "persistent://tenant/namespace/topic", arity = "1")
private String topicName;
@Override
void run() throws PulsarAdminException {
String persistentTopic = validatePersistentTopic(topicName);
print(getTopics().getLastMessageId(persistentTopic));
}
}View on GitHub (pinned to 820761864e)
Solutions
- Read the ${lastError} suffix and broker logs for the provider-specific cause
- Verify the offloader driver is installed and configured (offloaders dir, driver config, bucket/region/credentials)
- Test cloud storage connectivity/permissions from the broker host
- Fix configuration and re-run the offload command
Example fix
// before pulsar-admin topics offload persistent://my-tenant/my-ns/my-topic --size-threshold 10M # Error offloading: ... // after # after fixing offloader config/credentials pulsar-admin topics offload persistent://my-tenant/my-ns/my-topic --size-threshold 10M
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate offload config before invoking: driver installed, bucket/credentials set
OffloadPolicies policies = ...;
if (policies == null || policies.getBucket() == null) {
throw new IllegalStateException("Offloader/bucket not configured");
} Try / catch
try {
admin.topics().triggerOffload(topic, messageId);
admin.topics().offloadStatus(topic).waitForCompletion();
} catch (org.apache.pulsar.client.admin.PulsarAdminException e) {
log.error("Offload failed server-side: {}", e.getMessage(), e);
// check broker logs, offloader install, cloud credentials
} Prevention
- Install the offloader drivers in the broker's offloaders directory
- Validate cloud storage credentials, bucket, and region before offloading
- Confirm network egress from brokers to the storage provider
- Check offload status instead of assuming success
When it happens
Trigger: Running `pulsar-admin topics offload <topic> --size-threshold <bytes>` when the broker cannot offload ledgers — misconfigured offloader driver, unreachable S3/GCS/Azure endpoint, bad credentials, or bucket permissions.
Common situations: Missing or wrong offloader configuration (offloaders not installed in the broker's ./offloaders directory); invalid cloud credentials; nonexistent bucket/container; network egress blocked from brokers.
Related errors
- The '${offloaderName}' offloader does not provide an offload
- Class ${factoryClass} does not implement interface ${interfa
- The driver %s is not supported, (Possible values: %s).
- The driver ${driver} is not supported, (Possible values: ${d
- Either s3ManagedLedgerOffloadRegion or s3ManagedLedgerOffloa
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/88b74e36014fc01f.
Report an issue: GitHub.