streamnative / pulsar-archived

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org
Apache License 2.0
72 stars 25 forks source link

ISSUE-14241: 初始化pulsar集群报org.apache.pulsar.metadata.api.MetadataStoreException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss #3731

Open sijie opened 2 years ago

sijie commented 2 years ago

Original Issue: apache/pulsar#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.(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.(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: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.(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.(ZKMetadataStore.java:78) ... 4 more

Desktop (please complete the following information):

github-actions[bot] commented 2 years ago

The issue had no activity for 30 days, mark with Stale label.