Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3457

NPE when NodeManager.serviceInit fails and stopRecoveryStore called

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      When NodeManager service init fails during stopRecoveryStore null pointer exception is thrown

       @Override
        protected void serviceInit(Configuration conf) throws Exception {
         ..
        try {
            exec.init();
          } catch (IOException e) {
            throw new YarnRuntimeException("Failed to initialize container executor", e);
          }    
      
      this.context = createNMContext(containerTokenSecretManager,
              nmTokenSecretManager, nmStore);
          
      

      context is null when service init fails

        private void stopRecoveryStore() throws IOException {
          nmStore.stop();
          if (context.getDecommissioned() && nmStore.canRecover()) {
         ..
          }
        }
      

      Null pointer exception thrown

      015-04-07 17:31:45,807 WARN org.apache.hadoop.service.AbstractService: When stopping the service NodeManager : java.lang.NullPointerException
      java.lang.NullPointerException
      at org.apache.hadoop.yarn.server.nodemanager.NodeManager.stopRecoveryStore(NodeManager.java:168)
      at org.apache.hadoop.yarn.server.nodemanager.NodeManager.serviceStop(NodeManager.java:280)
      at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
      at org.apache.hadoop.service.ServiceOperations.stop(ServiceOperations.java:52)
      at org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:80)
      at org.apache.hadoop.service.AbstractService.init(AbstractService.java:171)
      at org.apache.hadoop.yarn.server.nodemanager.NodeManager.initAndStartNodeManager(NodeManager.java:484)
      at org.apache.hadoop.yarn.server.nodemanager.NodeManager.main(NodeManager.java:534)

      Attachments

        1. YARN-3457.001.patch
          2 kB
          Bibin Chundatt

        Issue Links

          Activity

            People

              bibinchundatt Bibin Chundatt
              bibinchundatt Bibin Chundatt
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: