mrtworo commented on issue #4596:
URL: https://github.com/apache/bookkeeper/issues/4596#issuecomment-2826998475
@StevenLuMT
I've tried, but seems like the ledger is long gone.:
```shell
kubectl exec -n pulsar pod/pulsar-bookie-4 -- /pulsar/bin/bookkeeper shell
readlog 1884 > ./1884_meta.log
# there are 7005 entries
❯ grep Lid 1884_meta.log | cut -d" " -f8,9 | wc -l
7005
# all for the same ledger 17772
❯ grep Lid 1884_meta.log | cut -d" " -f8,9 | grep Lid=17772 | wc -l
7005
# entries start at 0 till 7004
❯ grep Lid 1884_meta.log | cut -d" " -f8,9 | grep Lid=17772 | head
Lid=17772, Eid=0,
Lid=17772, Eid=1,
Lid=17772, Eid=2,
Lid=17772, Eid=3,
Lid=17772, Eid=4,
Lid=17772, Eid=5,
Lid=17772, Eid=6,
Lid=17772, Eid=7,
Lid=17772, Eid=8,
Lid=17772, Eid=9,
❯ grep Lid 1884_meta.log | cut -d" " -f8,9 | grep Lid=17772 | tail
Lid=17772, Eid=6995,
Lid=17772, Eid=6996,
Lid=17772, Eid=6997,
Lid=17772, Eid=6998,
Lid=17772, Eid=6999,
Lid=17772, Eid=7000,
Lid=17772, Eid=7001,
Lid=17772, Eid=7002,
Lid=17772, Eid=7003,
Lid=17772, Eid=7004,
# reading the ledger 17772 entries from 0 to 7004 for bookie 4
kubectl exec -n pulsar pod/pulsar-bookie-4 -- /pulsar/bin/bookkeeper shell
readledger -l 17772 -fe 0 -le 7005 -b
pulsar-bookie-4.pulsar-bookie.pulsar.svc.cluster.local:3181 >
./1884_entrylog_ledger_17772_data.log
```
>2025-04-24T09:13:31,724+0000 [BookieClientScheduler-OrderedExecutor-0-0]
ERROR org.apache.bookkeeper.tools.cli.commands.bookie.ReadLedgerCommand -
Failed to read entry 0 -- No such ledger exists on Bookies
2025-04-24T09:13:31,729+0000 [main] ERROR
org.apache.bookkeeper.tools.cli.commands.bookie.ReadLedgerCommand - Error
future.get while reading entries from ledger 17772
java.util.concurrent.ExecutionException:
org.apache.bookkeeper.client.BKException$BKNoSuchLedgerExistsException: No such
ledger exists on Bookies
at
java.base/java.util.concurrent.CompletableFuture.reportGet(Unknown Source)
~[?:?]
...
2025-04-24T09:13:38,371+0000 [BookieClientScheduler-OrderedExecutor-0-0]
ERROR org.apache.bookkeeper.tools.cli.commands.bookie.ReadLedgerCommand -
Failed to read entry 7004 -- No such ledger exists on Bookies
2025-04-24T09:13:38,371+0000 [main] ERROR
org.apache.bookkeeper.tools.cli.commands.bookie.ReadLedgerCommand - Error
future.get while reading entries from ledger 17772
java.util.concurrent.ExecutionException:
org.apache.bookkeeper.client.BKException$BKNoSuchLedgerExistsException: No such
ledger exists on Bookies
If I don't specify bookie to read from like:
```shell
/pulsar/bin/bookkeeper shell readledger -l 17772 -fe 0 -le 7005
```
it still fails:
>Caused by:
org.apache.bookkeeper.client.BKException$BKNoSuchLedgerExistsOnMetadataServerException:
No such ledger exists on Metadata Server
```shell
# additional I've tried to read the entrylog file with message body
kubectl exec -n pulsar pod/pulsar-bookie-4 -- /pulsar/bin/bookkeeper shell
readlog 1884 -m > ./1884_meta_with_message.log
# when filtering out sensitive data and metadata there were no traces of any
errors
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]