aloyszhang edited a comment on issue #7476:
URL: https://github.com/apache/pulsar/issues/7476#issuecomment-656712253


   @sijie, 
   At the first time, I thoung it was  caused by session expires, by no 
SessionExpired related log can be found. 
   ```java
   localZkConnectionSvc.start(new ZookeeperSessionExpiredHandler() {
               @Override
               public void onSessionExpired() {
                   log.error("Shutting down ZK sessions: {}", -1);
               }
   
               @Override
               public void setWatcher(ZooKeeperSessionWatcher watcher) {
   
               }
           });
   
           this.localZkCache = new 
LocalZooKeeperCache(localZkConnectionSvc.getLocalZooKeeper(),
                   (int) 
TimeUnit.MILLISECONDS.toSeconds(zookeeperSessionTimeoutMs), 
this.orderedExecutor);
           localZkConnectionSvc.start(new ZookeeperSessionExpiredHandler() {
               @Override
               public void onSessionExpired() {
                   try {
                       localZkCache.getZooKeeper().close();
                   } catch (InterruptedException e) {
                       log.warn("Failed to shutdown ZooKeeper gracefully {}", 
e.getMessage(), e);
                   }
               }
   ```
   This problem has happended several time in our pulsar cluster.
   
   And , both `DiscoveryServiceServlet`  and `BrokerDiscoveryProvider ` will be 
started if run discovery service .


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to