You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by "Gour Saha (JIRA)" <ji...@apache.org> on 2014/08/04 23:56:12 UTC

[jira] [Created] (SLIDER-282) No error indication in JSON response for invalid hostname in heartbeat request

Gour Saha created SLIDER-282:
--------------------------------

             Summary: No error indication in JSON response for invalid hostname in heartbeat request
                 Key: SLIDER-282
                 URL: https://issues.apache.org/jira/browse/SLIDER-282
             Project: Slider
          Issue Type: Bug
          Components: appmaster, Web & REST
            Reporter: Gour Saha


When an invalid hostname is provided in the JSON data when agent heartbeats to Application Master, the AM does not indicate this in the JSON response. An appropriate error is logged in the AM log though.

JSON request data with invalid hostname -
{"nodeStatus": {"status": "HEALTHY", "cause": "NONE"}, "timestamp": 1407177977626, "hostname": "container_1406931682142_0009_01_000003___{color:red}junk{color}", "responseId": 28, "fqdn": "c6408.ambari.apache.org", "reports": []}

Full request/response -
{noformat}
curl -i -k -X POST -H "Content-Type: application/json" -d '{"nodeStatus": {"status": "HEALTHY", "cause": "NONE"}, "timestamp": 1407177977626, "hostname": "container_1406931682142_0009_01_000003___junk", "responseId": 28, "fqdn": "c6408.ambari.apache.org", "reports": []}' https://c6408.ambari.apache.org:38092/ws/v1/slider/agents/container_1406931682142_0009_01_000003___HBASE_REGIONSERVER/heartbeat
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.26)

{"hasMappedComponents":false,"executionCommands":[],"statusCommands":[],"restartAgent":false,"responseId":29}
{noformat}

Error in AM log -
{noformat}
Error in AM log -
14/08/04 21:31:14 ERROR agent.AgentProviderService: role.script is unavailable for junk. Commands will not be sent.
{noformat}





--
This message was sent by Atlassian JIRA
(v6.2#6252)