OlegKashtanov opened a new issue, #3306:
URL: https://github.com/apache/bookkeeper/issues/3306

   **BUG REPORT**
   
   ***Describe the bug***
   Bookie image version: **apache/bookkeeper:4.15.0**
   The issue was found using Bookkeeper in Kubernetes. After restarting the 
Bookie pod, it will always be in the **CrashLoopBackOff** state due the cookies 
mismatch:
   ```
   09:15:54.921 [main] DEBUG org.apache.bookkeeper.zookeeper.ZooWorker - 
Stopped executing getData 
(/pravega/pravega/bookkeeper/ledgers/cookies/bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,
 watcher = null) after 1 attempts.
   09:15:54.921 [main] DEBUG org.apache.bookkeeper.zookeeper.ZooWorker - 
Stopped executing getData 
(/pravega/pravega/bookkeeper/ledgers/cookies/bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,
 watcher = false) after 1 attempts.
   09:15:54.978 [main] ERROR 
org.apache.bookkeeper.bookie.LegacyCookieValidation - Cookie for this bookie is 
not stored in metadata store. Bookie failing to come up
   09:15:54.979 [main] ERROR org.apache.bookkeeper.server.Main - Failed to 
build bookie server
   org.apache.bookkeeper.bookie.BookieException$InvalidCookieException:
           at 
org.apache.bookkeeper.bookie.LegacyCookieValidation.checkCookies(LegacyCookieValidation.java:122)
           at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:422)
           at org.apache.bookkeeper.server.Main.doMain(Main.java:272)
           at org.apache.bookkeeper.server.Main.main(Main.java:255)
   
   ```
   At the initial start Bookie uses the znode with **Bookie ID** for creating 
the cookie: 
   ```
   09:10:36.416 [main] DEBUG org.apache.bookkeeper.zookeeper.ZooWorker - 
Execute create 
(/pravega/pravega/bookkeeper/ledgers/cookies/bookkeeper-bookie-0-12842, acl = 
[31,s{'world,'anyone}], mode = PERSISTENT) at 0 retry attempt.
   ```
   After  the restart it tries to find the cookie using the znode with **Bookie 
hostname**, but it's the wrong znode:
   ```
   09:15:54.921 [main] DEBUG org.apache.bookkeeper.zookeeper.ZooWorker - 
Stopped executing getData 
(/pravega/pravega/bookkeeper/ledgers/cookies/bookkeeper-bookie-0.bookkeeper-bookie-headless.default.svc.cluster.local:3181,
 watcher = false) after 1 attempts.
   09:15:54.979 [main] ERROR org.apache.bookkeeper.server.Main - Failed to 
build bookie server
   org.apache.bookkeeper.bookie.BookieException$InvalidCookieException:
           at 
org.apache.bookkeeper.bookie.LegacyCookieValidation.checkCookies(LegacyCookieValidation.java:122)
           at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:422)
           at org.apache.bookkeeper.server.Main.doMain(Main.java:272)
           at org.apache.bookkeeper.server.Main.main(Main.java:255)
   ```
   
   
   
   ***To Reproduce***
   
   Steps to reproduce the behavior:
   1. Deploy bookkeeper cluster
   2. Restart one of the Bookie's Pods
   
   ***Expected behavior***
   
   Bookie should find the cookie and run
   
   ***Screenshots***
   
   If applicable, add screenshots to help explain your problem.
   
   ***Additional context***
   
   Add any other context about the problem here.
   


-- 
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]

Reply via email to