You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Leon Li (JIRA)" <ji...@apache.org> on 2017/10/10 22:10:00 UTC

[jira] [Created] (AMBARI-22195) Ambari create cluster API requests outputs invalid JSON

Leon Li created AMBARI-22195:
--------------------------------

             Summary: Ambari create cluster API requests outputs invalid JSON
                 Key: AMBARI-22195
                 URL: https://issues.apache.org/jira/browse/AMBARI-22195
             Project: Ambari
          Issue Type: Bug
          Components: ambari-sever
    Affects Versions: 2.5.0
         Environment: RedHat 7
But likely no related to OS
            Reporter: Leon Li
            Priority: Minor


The Ambari cluster creation request status API outputs invalid JSON.

curl -u admin:admin http://ambari:8080/api/v1/clusters/clustername/requests/1

Output:

{
        "cache_control": "no-store", 
        "changed": false, 
        "connection": "close", 
        "content": {color:red}"{color}{
			"href" : "http://ambari:8080/api/v1/clusters/clustername/requests/1",
			"Requests" : {
			"id" : 1,
			"status" : 
			"Accepted"
			}
			}{color:red}"{color}, 
        "content_type": "text/plain", 
        "expires": "Thu, 01 Jan 1970 00:00:00 GMT", 
        "msg": "OK (unknown bytes)", 
        "pragma": "no-cache", 
        "redirected": false, 
        "server": "Jetty(8.1.19.v20160209)", 
        "set_cookie": "AMBARISESSIONID=qaf5s3s9epkdjl823y7zx5f9g57;Path=/;HttpOnly", 
        "status": 202, 
        "url": "http://ambari:8080/api/v1/clusters/clustername", 
        "user": "admin", 
        "vary": "Accept-Encoding, User-Agent", 
        "x_content_type_options": "nosniff", 
        "x_frame_options": "DENY", 
        "x_xss_protection": "1; mode=block"
    }

The content field value should not be enclosed in quotes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)