This message was deleted.
# general
s
This message was deleted.
d
The files using most of the space are in /home/pulsar/data/bookkeeper/ledgers/current
I renamed the Pulsar bin dir so the services wouldn’t start, rebooted the machine. Then I wiped journal/ ledgers/ from bookkeeper/ and kept only myid in zookeeper/. Renamed pulsar bin back.
Started zk and it didn’t log any errors or anything. I started the bookie expecting it to re-join but it fails with:
Copy code
There are directories without a cookie, and this is neither a new environment, nor is storage expansion enabled.
Empty directories are [/home/pulsar/data/bookkeeper/journal/current, /home/pulsar/data/bookkeeper/ledgers/current]
2023-07-31T12:49:06,811+0000 [main] ERROR org.apache.bookkeeper.server.Main - Failed to build bookie server
I thought I was replicating replacement of a broken server and it would just sort itself out. So what do I do now?
d
You can format the local filesystem data on a bookie using the
bookieformat
command, e.g.
$ bin/bookkeeper shell bookieformat
If your
metadataServiceUri
is pointing to the correct ZK cluster, then it should re-fetch the cookieID and join the cluster.
d
Aha. I already did a decom of the dead bookie on one of the other nodes: bin/bookkeeper shell decommissionbookie -bookieid xxx That is going to take quite some more time (10 hours+) to complete. Should I kill that and do as you suggest or let it run?
d
The decom process is offloading the data to maintain the replica count requirement, hence the 10+ hour duration. I would let it continue to run, as it is the preferred method for removing a node.
d
And then I can just start up the old bookie with empty journal and ledgers and it should come back? Or should I then do the bookieformat? Tx for the help.
d
In theory yes. And the auto recovery process should handle the under replicated segments for you
d
The machine running the decom crashed so I thought I would try the bookieformat. It doesn’t seem to do much (don’t see any files, it just makes the directories): $ bin/bookkeeper shell bookieformat 2023-07-31T192127,655+0000 [main] INFO org.apache.bookkeeper.bookie.Bookie - Bookie format completed successfully $ find data/bookkeeper/ data/bookkeeper/ data/bookkeeper/journal data/bookkeeper/ledgers
d
Are there any messages in the bookie log? Specifically ones indicating that it is connecting to the ZK cluster and registering itself as a node in the cluster?
d
I tried to start it up and it complained about the missing cookie again.
d
Does the bookie show up in the list of bookies if you run
bin/bookkeeper shell listbookies
?
Also try using the --force flag, e.g.
bin/bookkeeper shell bookieformat --force
d
Yes it does show up for listbookies, both on the dead node only running zk and on the others. I have the decom running again.
I had a look at the Bookkeeper source and bookieformat just wipes out / creates the directories (BookieImpl.format). I don’t see anything there fetching cookies from zk.
🤔 1
d
It should fetch the cookie after you start the bookie.
d
Aha. The decom finished and deleted the cookie. The old bookie started successfully and is replication ledgers. Thanks for all the help.
d
Glad to help
r
hello @David Tinker i too am facing this
There are directories without a cookie, and this is neither a new environment,
in my openshift cluster where i am trying to install pulsar i dont have any data for now that i want in persistent volume. so should i delete the old PVs or run the decom u mentioned?(could u also tell what this demon is) thanks in advance😄
d
Hmm I am not an expert on this .. I just decom’ed:
Copy code
bin/bookkeeper shell decommissionbookie -bookieid 10.0.0.61:3181
On one of the working bookies. The bookieid there is the dead one.
r
how did u know the bookieid is it this command
bin/bookkeeper shell bookieformat --force
? and where should i run it if so. inside any pod or ..?
d
We are running on bare metal so the bookie ID is in the config files.
r
okayy, i am not familier with that . 1 last doubt, could u tell me what this issue means? like old BK had created some PV, and bcoz of that new BK cant be installed?
d
In our case the machine ran out of space so we wiped the data expecting it to replicate ledgers. But the bookie expects to find the cookie and won’t start. Maybe your bookie has started with a new PV for some reason?
r
yes, i had deleted the old BK because it was failing for some reason
now when i install this , this error comes