sumingsoftware opened a new issue #14241:
URL: https://github.com/apache/pulsar/issues/14241


   **Describe the bug**
   
   
   初始化集群的时候报(throw below exception when initialize pulsar cluster)
   19:07:45.000 [main-EventThread] INFO  
org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase - ZooKeeper client is 
connected now.
   19:07:45.138 [main-EventThread] INFO  org.apache.zookeeper.ClientCnxn - 
EventThread shut down for session: 0x10000099b690002
   19:07:45.138 [main] INFO  org.apache.zookeeper.ZooKeeper - Session: 
0x10000099b690002 closed
   Exception in thread "main" 
org.apache.pulsar.metadata.api.MetadataStoreException: 
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = 
ConnectionLoss
           at 
org.apache.pulsar.metadata.impl.ZKMetadataStore.<init>(ZKMetadataStore.java:81)
           at 
org.apache.pulsar.metadata.api.MetadataStoreFactory.create(MetadataStoreFactory.java:48)
           at 
org.apache.pulsar.metadata.api.extended.MetadataStoreExtended.create(MetadataStoreExtended.java:42)
           at 
org.apache.pulsar.PulsarClusterMetadataSetup.initMetadataStore(PulsarClusterMetadataSetup.java:354)
           at 
org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:194)
   Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: 
KeeperErrorCode = ConnectionLoss
           at 
org.apache.zookeeper.KeeperException.create(KeeperException.java:102)
           at 
org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase.waitForConnection(ZooKeeperWatcherBase.java:159)
           at 
org.apache.bookkeeper.zookeeper.ZooKeeperClient$Builder.build(ZooKeeperClient.java:260)
           at 
org.apache.pulsar.metadata.impl.ZKMetadataStore.<init>(ZKMetadataStore.java:78)
           ... 4 more
   
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. 启动外置zk
   2. 初始化pulsar集群
       bin/pulsar initialize-cluster-metadata \
     --cluster pulsar-cluster \
     --zookeeper 192.168.198.6:2181 \
     --configuration-store 192.168.198.6:2181 \
     --web-service-url 
http://192.168.198.6:8080,192.168.198.7:8080,192.168.198.8:8080 \
     --web-service-url-tls 
https://192.168.198.6:8443,192.168.198.7:8443,192.168.198.8:8443 \
     --broker-service-url 
pulsar://192.168.198.6:6650,192.168.198.7:6650,192.168.198.8:6650 \
     --broker-service-url-tls 
pulsar+ssl://192.168.198.6:6651,192.168.198.7:6651,192.168.198.8:6651
   
   3. See error
      19:07:04.388 [main] INFO  org.apache.zookeeper.ZooKeeper - Client 
environment:user.home=/home/admin
   19:07:04.388 [main] INFO  org.apache.zookeeper.ZooKeeper - Client 
environment:user.dir=/home/admin/pulsar/apache-pulsar-2.8.0
   19:07:04.388 [main] INFO  org.apache.zookeeper.ZooKeeper - Client 
environment:os.memory.free=1902MB
   19:07:04.388 [main] INFO  org.apache.zookeeper.ZooKeeper - Client 
environment:os.memory.max=2048MB
   19:07:04.388 [main] INFO  org.apache.zookeeper.ZooKeeper - Client 
environment:os.memory.total=2048MB
   19:07:04.435 [main] INFO  org.apache.zookeeper.ZooKeeper - Initiating client 
connection, connectString=192.168.198.6:2181 sessionTimeout=30000 
watcher=org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase@60db1c0e
   19:07:04.472 [main] INFO  org.apache.zookeeper.common.X509Util - Setting -D 
jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS 
renegotiation
   19:07:04.664 [main] INFO  org.apache.zookeeper.ClientCnxnSocket - 
jute.maxbuffer value is 10485760 Bytes
   19:07:04.762 [main] INFO  org.apache.zookeeper.ClientCnxn - 
zookeeper.request.timeout value is 0. feature enabled=false
   19:07:44.874 [main-SendThread(192.168.198.6:2181)] INFO  
org.apache.zookeeper.ClientCnxn - Opening socket connection to server 
192.168.198.6/192.168.198.6:2181.
   19:07:44.874 [main-SendThread(192.168.198.6:2181)] INFO  
org.apache.zookeeper.ClientCnxn - SASL config status: Will not attempt to 
authenticate using SASL (unknown error)
   19:07:44.887 [main-SendThread(192.168.198.6:2181)] INFO  
org.apache.zookeeper.ClientCnxn - Socket connection established, initiating 
session, client: /192.168.198.6:42408, server: 192.168.198.6/192.168.198.6:2181
   19:07:44.992 [main-SendThread(192.168.198.6:2181)] INFO  
org.apache.zookeeper.ClientCnxn - Session establishment complete on server 
192.168.198.6/192.168.198.6:2181, session id = 0x10000099b690002, negotiated 
timeout = 30000
   19:07:45.000 [main-EventThread] INFO  
org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase - ZooKeeper client is 
connected now.
   19:07:45.138 [main-EventThread] INFO  org.apache.zookeeper.ClientCnxn - 
EventThread shut down for session: 0x10000099b690002
   19:07:45.138 [main] INFO  org.apache.zookeeper.ZooKeeper - Session: 
0x10000099b690002 closed
   Exception in thread "main" 
org.apache.pulsar.metadata.api.MetadataStoreException: 
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = 
ConnectionLoss
           at 
org.apache.pulsar.metadata.impl.ZKMetadataStore.<init>(ZKMetadataStore.java:81)
           at 
org.apache.pulsar.metadata.api.MetadataStoreFactory.create(MetadataStoreFactory.java:48)
           at 
org.apache.pulsar.metadata.api.extended.MetadataStoreExtended.create(MetadataStoreExtended.java:42)
           at 
org.apache.pulsar.PulsarClusterMetadataSetup.initMetadataStore(PulsarClusterMetadataSetup.java:354)
           at 
org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:194)
   Caused by: org.apache.zookeeper.KeeperException$ConnectionLossException: 
KeeperErrorCode = ConnectionLoss
           at 
org.apache.zookeeper.KeeperException.create(KeeperException.java:102)
           at 
org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase.waitForConnection(ZooKeeperWatcherBase.java:159)
           at 
org.apache.bookkeeper.zookeeper.ZooKeeperClient$Builder.build(ZooKeeperClient.java:260)
           at 
org.apache.pulsar.metadata.impl.ZKMetadataStore.<init>(ZKMetadataStore.java:78)
           ... 4 more
   
   
   **Desktop (please complete the following information):**
    - OS: win10
    -zk version: 3.5.5
    -pulsar version: apache-pulsar-2.8.0
   
   


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