Wallace Peng
04/21/2024, 5:34 AMbin/pulsar-admin topics stats-internal <persistent://pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/healthcheck>
No such ledger exists on Metadata Server
Reason: No such ledger exists on Metadata ServerYu Wei Sung
04/21/2024, 10:45 PMWallacepeng
04/21/2024, 10:48 PMYu Wei Sung
04/21/2024, 10:51 PMWallace Peng
04/21/2024, 10:52 PMWallace Peng
04/22/2024, 6:18 PMKen
04/23/2024, 7:58 PMDavid K
04/23/2024, 8:06 PMWallace Peng
04/23/2024, 8:10 PMDavid K
04/23/2024, 8:11 PMWallace Peng
04/23/2024, 8:12 PMDavid K
04/23/2024, 8:12 PMDavid K
04/23/2024, 8:14 PMWallace Peng
04/23/2024, 8:16 PMDavid K
04/23/2024, 8:17 PMDavid K
04/23/2024, 8:18 PMWallace Peng
04/23/2024, 8:19 PMAbstractZkLedgerManager - Ledger node does not exist in ZooKeeper: ledgerId=3596046. Returning success.Wallace Peng
04/23/2024, 8:23 PM[healthcheck]
[zk: localhost:2181(CONNECTED) 7] ls /managed-ledgers/pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/persistent/healthcheck
[]
the folder is empty .
this is a special topic, i tried to unload but it does not seem help as well.Wallace Peng
04/23/2024, 8:23 PM[<persistent://pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/healthcheck>] [null] Could not get connection to broker: org.apache.pulsar.client.api.PulsarClientException: {"errorMsg":"org.apache.pulsar.broker.service.schema.exceptions.SchemaException: No such ledger exists on Metadata Server - ledger=3596046 - operation=Failed to open ledger caused by org.apache.pulsar.broker.service.schema.exceptions.SchemaException: No such ledger exists on Metadata Server - ledger=3596046 - operation=Failed to open ledger","reqId":3411430584494320639, "remote":"pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local/172.20.197.45:6650", "local":"/172.20.197.45:45554"} -- Will try again in 4.715 s
ERROR org.apache.pulsar.client.impl.ProducerImpl - [<persistent://pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/healthcheck>] [null] Failed to create producer: {"errorMsg":"org.apache.pulsar.broker.service.schema.exceptions.SchemaException: No such ledger exists on Metadata Server - ledger=3596046 - operation=Failed to open ledger caused by org.apache.pulsar.broker.service.schema.exceptions.SchemaException: No such ledger exists on Metadata Server - ledger=3596046 - operation=Failed to open ledger","reqId":3411430584494320639, "remote":"pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local/172.20.197.45:6650", "local":"/172.20.197.45:45554"}Wallace Peng
04/23/2024, 8:27 PMtopics stats but i cannot use topics stats-internal i also tried to delete the topic but it does not workDavid K
04/23/2024, 8:29 PMWallace Peng
04/23/2024, 8:30 PMWallace Peng
04/23/2024, 8:31 PMDavid K
04/23/2024, 8:33 PMWallace Peng
04/23/2024, 8:34 PMDavid K
04/23/2024, 8:35 PMls /managed-ledgers/pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/persistent ?Wallace Peng
04/23/2024, 8:39 PMls /managed-ledgers/pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/persistent
[healthcheck]
it just has healthcheckWallace Peng
04/23/2024, 9:04 PMbin/pulsar-managed-ledger-admin delete-managed-ledger-ids --zkServer pulsar-zookeeper:2181 --managedLedgerPath /managed-ledgers/pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/persistent --ledgerIds 3596046
and
bin/pulsar-managed-ledger-admin delete-managed-ledger-ids --zkServer pulsar-zookeeper:2181 --managedLedgerPath /managed-ledgers/pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/persistent/healthcheck --ledgerIds 3596046
return no Node found as it seems empty there.Wallace Peng
04/24/2024, 5:23 AMbin/pulsar-admin schemas get <persistent://pulsar/pulsar/pulsar-broker-0.pulsar-broker.pulsar.svc.cluster.local:8080/healthcheck>
--- An unexpected error occurred in the server ---
Message: org.apache.pulsar.broker.service.schema.exceptions.SchemaException: No such ledger exists on Metadata Server - ledger=3596046 - operation=Failed to open ledger
Stacktrace:
java.util.concurrent.CompletionException: org.apache.pulsar.broker.service.schema.exceptions.SchemaException: No such ledger exists on Metadata Server - ledger=3596046 - operation=Failed to open ledger
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1099)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
at org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage.readSchemaEntry(BookkeeperSchemaStorage.java:527)
at org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage.lambda$getSchema$10(BookkeeperSchemaStorage.java:254)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:1106)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2235)
at org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage.lambda$getSchema$11(BookkeeperSchemaStorage.java:244)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
at org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage.getSchema(BookkeeperSchemaStorage.java:240)
at org.apache.pulsar.broker.service.schema.BookkeeperSchemaStorage.get(BookkeeperSchemaStorage.java:162)
at org.apache.pulsar.broker.service.schema.SchemaRegistryServiceImpl.getSchema(SchemaRegistryServiceImpl.java:99)
at org.apache.pulsar.broker.service.schema.SchemaRegistryServiceImpl.getSchema(SchemaRegistryServiceImpl.java:85)
at org.apache.pulsar.broker.service.schema.validator.SchemaRegistryServiceWithSchemaDataValidator.getSchema(SchemaRegistryServiceWithSchemaDataValidator.java:52)
at org.apache.pulsar.broker.admin.impl.SchemasResourceBase.getSchema(SchemasResourceBase.java:89)
at org.apache.pulsar.broker.admin.v1.SchemasResource.getSchema(SchemasResource.java:84)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:159)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:475)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:397)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:255)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680)
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)Wallace Peng
04/24/2024, 5:37 AMWallace Peng
04/24/2024, 5:38 AMprivate CompletableFuture<Optional<LocatorEntry>> getSchemaLocator(String schema) {
return locatorEntryCache.getWithStats(schema)
.thenApply(o ->
o.map(r -> new LocatorEntry(r.getValue(), r.getStat().getVersion())));
}
it calls this method to return the schema locator that has a position referencing the non-existing ledger. i dont know how to flush this cacheDavid K
04/24/2024, 4:16 PMWallace Peng
04/24/2024, 9:00 PMWallace Peng
04/24/2024, 9:00 PMthis.pulsar = pulsar;
this.store = pulsar.getLocalMetadataStore();
this.config = pulsar.getConfiguration();
this.locatorEntryCache = store.getMetadataCache(new MetadataSerde<SchemaStorageFormat.SchemaLocator>() {
@Override
public byte[] serialize(String path, SchemaStorageFormat.SchemaLocator value) {
return value.toByteArray();
}
@Override
public SchemaStorageFormat.SchemaLocator deserialize(String path, byte[] content, Stat stat)
throws IOException {
return SchemaStorageFormat.SchemaLocator.parseFrom(content);
}
});Wallace Peng
04/24/2024, 9:02 PMreturn new ZKMetadataStore(metadataURL, metadataStoreConfig, enableSessionWatcher);David K
04/24/2024, 9:08 PMWallace Peng
04/26/2024, 1:24 AMWallace Peng
04/26/2024, 2:27 AM