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

NPE when a non-existent host is provided as part of the host filter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.5.0
    • None
    • None

    Description

      When a non-existent host is provided as part of the host filter then server
      throws an NPE.

      API call

      curl -u admin:admin -H "X-Requested-By: ambari" -X POST -d '{"RequestInfo":

      {"context":"YARN Service Check","command":"YARN_SERVICE_CHECK"}

      ,"Requests/resource_filters":[

      {"service_name":"YARN","hosts":"hn0-d7d2bf.hdinsight.net"}

      ]}' http://localhost:8080/api/v1/clusters/jeezraspark2zeppelin18/requests

      { "status": 500, "message": "Server Error" }

      15 Oct 2016 01:10:28,655 INFO [ambari-client-thread-1378] AmbariManagementControllerImpl:3762 - Received action execution request, clusterName=jeezraspark2zeppelin18, request=isCommand :true, action :null, command :YARN_SERVICE_CHECK, inputs :{}, resourceFilters: [RequestResourceFilter

      {serviceName='YARN', componentName='null', hostNames=[hn0-d7d2bf.hdinsight.net]}

      ], exclusive: false, clusterName :jeezraspark2zeppelin18
      15 Oct 2016 01:10:28,658 ERROR [ambari-client-thread-1378] BaseManagementHandler:71 - Caught a runtime exception while attempting to create a resource: null
      java.lang.NullPointerException
      at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.findHostAndAddServiceCheckAction(AmbariCustomCommandExecutionHelper.java:557)
      at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addExecutionCommandsToStage(AmbariCustomCommandExecutionHelper.java:997)
      at org.apache.ambari.server.controller.AmbariManagementControllerImpl.createAction(AmbariManagementControllerImpl.java:3818)

      Attachments

        1. AMBARI-18623.patch
          1 kB
          Andrew Onischuk

        Issue Links

          Activity

            People

              aonishuk Andrew Onischuk
              aonishuk Andrew Onischuk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: