You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/09/08 15:34:19 UTC

[GitHub] [pulsar] sourabhaggrawal opened a new issue #11972: NPE while preparing racksandhost detail through RackawareEnsemblePlacementPolicyImpl

sourabhaggrawal opened a new issue #11972:
URL: https://github.com/apache/pulsar/issues/11972


   **Describe the bug**
   We are trying to configure rack-aware policy, when starting pulsar we get this error at RackAwareEnsemblePlacementPolicyImpl and then it end up using default-rack as per the logs.
   
   18:10:36.083 [pulsar-ordered-OrderedExecutor-0-0] ERROR org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Failed to initialize DNS Resolver org.apache.pulsar.zookeeper.ZkBookieRackAffinityMapping, used default subnet resolver : java.lang.RuntimeException: java.lang.NullPointerException java.lang.NullPointerException
   18:10:36.087 [pulsar-ordered-OrderedExecutor-0-0] INFO  org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicyImpl - Initialize rackaware ensemble placement policy @ <Bookie:192.168.1.7:0> @ /default-rack : org.apache.bookkeeper.client.TopologyAwareEnsemblePlacementPolicy$DefaultResolver.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Enable bookkeeperClientRackawarePolicyEnabled in pulsar broker.conf
   2. Configure ensemblePlacementPolicy=org.apache.bookkeeper.client.RackawareEnsemblePlacementPolicy in bookkeeper.conf
   3. configure racks
   4. start zookeeper, bookkeeper  & pulsar
   
   **Expected behavior**
   Expected RackawareEnsemblePlacementPolicyImpl to initialise racks with given rack info and its bookies as per the implementation of ZKBookieRackAffinityMapping.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   **Desktop (please complete the following information):**
    - OS: iOS
    - Pulsar 2.8.0
    - Bookkeeper 4.14.1
   
   **Additional context**
   While troubleshooting we found, during initialisation of RackAwareEnsemblePlacementPolicy it creates new instance of dnsResolver as below at line https://github.com/apache/bookkeeper/blob/97818f5123999396e66f5246420d3c7e3d25f53d/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/RackawareEnsemblePlacementPolicyImpl.java#L262
   
                   dnsResolver = ReflectionUtils.newInstance(dnsResolverName, DNSToSwitchMapping.class);
                   if (dnsResolver instanceof Configurable) {
                       ((Configurable) dnsResolver).setConf(conf);
                   }
   setConf is then triggered on ZKBookieRackAffinityMapping which throws NullPointer at https://github.com/apache/pulsar/blob/89ac98e4af363b09f2fe8e309539b0e35243aaee/pulsar-zookeeper-utils/src/main/java/org/apache/pulsar/zookeeper/ZkBookieRackAffinityMapping.java#L97 while prepare rack with its host information.
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] casuallc commented on issue #11972: NPE while preparing racksandhost detail through RackawareEnsemblePlacementPolicyImpl

Posted by GitBox <gi...@apache.org>.
casuallc commented on issue #11972:
URL: https://github.com/apache/pulsar/issues/11972#issuecomment-918729383


   Same proble in https://github.com/apache/bookkeeper/pull/2788.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on issue #11972: NPE while preparing racksandhost detail through RackawareEnsemblePlacementPolicyImpl

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #11972:
URL: https://github.com/apache/pulsar/issues/11972#issuecomment-1057583499


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


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org