Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-22517

NPE during Ambari schema upgrade while updating Hive configs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.6.1
    • ambari-server
    • None

    Description

      NPE trace
      24 Nov 2017 08:27:21,310  INFO [main] UpgradeCatalog260:820 - Removing ssl.client.truststore.alias from ams-ssl-client
      24 Nov 2017 08:27:21,316  INFO [main] AbstractUpgradeCatalog:573 - Applying configuration with tag 'version1511512041310' and configType 'ams-ssl-client' to cluster 'cl1'
      24 Nov 2017 08:27:21,365  INFO [main] AbstractUpgradeCatalog:595 - cluster 'cl1' changed by: 'ambari-upgrade'; type='ams-ssl-client' tag='version1511512041310' from='TOPOLOGY_RESOLVED'
      24 Nov 2017 08:27:21,368 ERROR [main] SchemaUpgradeHelper:233 - Upgrade failed.
      java.lang.NullPointerException
              at org.apache.ambari.server.upgrade.UpgradeCatalog260.updateHiveConfigs(UpgradeCatalog260.java:778)
              at org.apache.ambari.server.upgrade.UpgradeCatalog260.executeDMLUpdates(UpgradeCatalog260.java:515)
              at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:938)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:231)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:424)
      24 Nov 2017 08:27:21,371 ERROR [main] SchemaUpgradeHelper:437 - Exception occurred during upgrade, failed
      org.apache.ambari.server.AmbariException
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:234)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:424)
      Caused by: java.lang.NullPointerException
              at org.apache.ambari.server.upgrade.UpgradeCatalog260.updateHiveConfigs(UpgradeCatalog260.java:778)
              at org.apache.ambari.server.upgrade.UpgradeCatalog260.executeDMLUpdates(UpgradeCatalog260.java:515)
              at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:938)
              at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:231)
              ... 1 more
      24 Nov 2017 08:27:23,019  INFO [main] Configuration:3048 - Reading password from existing file
      24 Nov 2017 08:27:23,031  INFO [main] Configuration:3542 - Hosts Mapping File null
      

      Error Line : https://github.com/hortonworks/ambari/commit/af5c8d9d22c64039f35ff959a7a6bc4b48a7f97b#diff-d64149d54be0b8bef5315a5f8844379cR778

      Reason:
      As part of AMBARI-22472, a null check was missing, which caused NPE here.

      Fix: Added NULL check.

      Attachments

        1. AMBARI-22517.patch
          4 kB
          Swapan Shridhar

        Activity

          People

            swapanshridhar Swapan Shridhar
            swapanshridhar Swapan Shridhar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: