[
https://issues.apache.org/jira/browse/AMBARI-18623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Onischuk reopened AMBARI-18623:
--------------------------------------
> NPE when a non-existent host is provided as part of the host filter
> -------------------------------------------------------------------
>
> Key: AMBARI-18623
> URL: https://issues.apache.org/jira/browse/AMBARI-18623
> Project: Ambari
> Issue Type: Bug
> Reporter: Andrew Onischuk
> Assignee: Andrew Onischuk
> Fix For: 2.5.0
>
> Attachments: AMBARI-18623.patch
>
>
> 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)
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)