coderzc opened a new issue, #16846:
URL: https://github.com/apache/pulsar/issues/16846

   **Describe the bug**
   
   Use standalone command can‘t start with multiple bookies.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   
   > bin/pulsar standalone --num-bookies 2 --bookkeeper-port 0
   ```
   2022-07-28T18:11:54,556+0800 [main] INFO  org.apache.pulsar.PulsarStandalone 
- Starting BK with RocksDb metadata store
   2022-07-28T18:11:55,808+0800 [main] INFO  
org.apache.pulsar.metadata.impl.RocksdbMetadataStore - new 
RocksdbMetadataStore,url=MetadataStoreConfig(sessionTimeoutMillis=30000, 
allowReadOnlyOperations=false, configFilePath=null, batchingEnabled=true, 
batchingMaxDelayMillis=5, batchingMaxOperations=1000, 
batchingMaxSizeKb=128),instanceId=12
   2022-07-28T18:11:55,819+0800 [main] INFO  
org.apache.pulsar.metadata.bookkeeper.PulsarRegistrationManager - Initializing 
metadata for new cluster, ledger root path: /ledgers
   2022-07-28T18:11:55,825+0800 [main] ERROR 
org.apache.pulsar.metadata.bookkeeper.PulsarRegistrationManager - Ledger root 
path: /ledgers already exists
   2022-07-28T18:11:55,843+0800 [main] INFO  
org.apache.pulsar.metadata.bookkeeper.BKCluster - Starting new bookie on port: 
49702
   2022-07-28T18:11:55,851+0800 [main] INFO  org.apache.bookkeeper.server.Main 
- Load lifecycle component : 
org.apache.bookkeeper.server.service.StatsProviderService
   2022-07-28T18:11:55,859+0800 [main] INFO  
org.apache.bookkeeper.meta.MetadataDrivers - BookKeeper metadata driver manager 
initialized
   2022-07-28T18:11:56,232+0800 [main] ERROR 
org.apache.pulsar.PulsarStandaloneStarter - Failed to start pulsar service.
   org.apache.bookkeeper.bookie.BookieException$InvalidCookieException: Cookie 
[4
   bookieHost: "127.0.0.1:49702"
   journalDir: "data/standalone/bookkeeper"
   ledgerDirs: "1\tdata/standalone/bookkeeper"
   instanceId: "3a96dbc4-269b-4310-a982-2c948b4f3585"
   ] is not matching with [4
   bookieHost: "127.0.0.1:3181"
   journalDir: "data/standalone/bookkeeper"
   ledgerDirs: "1\tdata/standalone/bookkeeper"
   instanceId: "3a96dbc4-269b-4310-a982-2c948b4f3585"
   ]
        at org.apache.bookkeeper.bookie.Cookie.verifyInternal(Cookie.java:138) 
~[org.apache.bookkeeper-bookkeeper-server-4.15.0.jar:4.15.0]
        at org.apache.bookkeeper.bookie.Cookie.verify(Cookie.java:149) 
~[org.apache.bookkeeper-bookkeeper-server-4.15.0.jar:4.15.0]
        at 
org.apache.bookkeeper.bookie.LegacyCookieValidation.verifyAndGetMissingDirs(LegacyCookieValidation.java:197)
 ~[org.apache.bookkeeper-bookkeeper-server-4.15.0.jar:4.15.0]
        at 
org.apache.bookkeeper.bookie.LegacyCookieValidation.checkCookies(LegacyCookieValidation.java:87)
 ~[org.apache.bookkeeper-bookkeeper-server-4.15.0.jar:4.15.0]
        at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:422) 
~[org.apache.bookkeeper-bookkeeper-server-4.15.0.jar:4.15.0]
        at 
org.apache.pulsar.metadata.bookkeeper.BKCluster.startBookie(BKCluster.java:274) 
~[org.apache.pulsar-pulsar-metadata-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at 
org.apache.pulsar.metadata.bookkeeper.BKCluster.startNewBookie(BKCluster.java:258)
 ~[org.apache.pulsar-pulsar-metadata-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at 
org.apache.pulsar.metadata.bookkeeper.BKCluster.startBKCluster(BKCluster.java:167)
 ~[org.apache.pulsar-pulsar-metadata-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at 
org.apache.pulsar.metadata.bookkeeper.BKCluster.<init>(BKCluster.java:120) 
~[org.apache.pulsar-pulsar-metadata-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at 
org.apache.pulsar.metadata.bookkeeper.BKCluster$BKClusterConf.build(BKCluster.java:99)
 ~[org.apache.pulsar-pulsar-metadata-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at 
org.apache.pulsar.PulsarStandalone.startBookieWithRocksDB(PulsarStandalone.java:446)
 ~[org.apache.pulsar-pulsar-broker-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:293) 
~[org.apache.pulsar-pulsar-broker-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
        at 
org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:128)
 ~[org.apache.pulsar-pulsar-broker-2.11.0-SNAPSHOT.jar:2.11.0-SNAPSHOT]
   ```
   
   **Expected behavior**
   Start Pulsar with multiple bookies in standalone mode.
   
   **Desktop (please complete the following information):**
    - OS: macOS 12.4
   
   **Additional context**
   Issues related to #16741
   


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