ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fay Wang <>
Subject Re: another Kerberos issue
Date Tue, 23 Feb 2016 18:13:56 GMT
Hi Rob,   I got confusing result:(1) 
curl -k -H "X-Requested-By:ambari" -u admin:admin -i -X GET https://localhost:8443/api/v1/clusters/MyCluster/configurations?type=kerberos-env

HTTP/1.1 200 OK
User: admin
Set-Cookie: AMBARISESSIONID=2z7yntlt934j1gimc52473i30;Path=/;Secure;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Vary: Accept-Encoding, User-Agent
Content-Length: 433
Server: Jetty(8.1.17.v20150415)

  "href" : "https://localhost:8443/api/v1/clusters/MyCluster/configurations?type=kerberos-env",
  "items" : [
      "href" : "https://localhost:8443/api/v1/clusters/MyCluster/configurations?type=kerberos-env&tag=version1",
      "tag" : "version1",
      "type" : "kerberos-env",
      "version" : 1,
      "Config" : {
        "cluster_name" : "MyCluster",
        "stack_id" : "BigInsights-4.1"
(2) /var/lib/ambari-server/resources/scripts/ -u admin -p admin -port 8443 get
localhost MyCluster kerberos-env
[ERROR] "kerberos-env" not found in server response.
[ERROR] Output of `curl -s -u admin:admin "http://localhost:8443/api/v1/clusters/MyCluster?fields=Clusters/desired_configs"`

Please note that in the curl command in (2) is still using http, instead of https. This may
explain the error.Please let me know how to set the flag to use https.
(3) The result from find / -name kerberos-env.xml:

Please advise.


    On Tuesday, February 23, 2016 6:56 AM, Robert Levas <> wrote:

 Hi Fay…
This can happen if the Kerberos service config data becomes corrupted.  If you do the following
API call, you do get any data back?

GET /api/v1/clusters/MyCluster/configurations?type=kerberos-env

In my cluster I don’t have Kerberos installed, so I get the following response:

{  "href" : "http://c6501:8080/api/v1/clusters/c1/configurations?type=kerberos-env",  "items"
: [ ]}

If you get this, this is the issue and you will need to recreate the kerberos-env config manually.
 If you get a set of configuration versions back, then we need to figure out what property
of the current version is making the UI upset. 
A better way to get the configs is to use the script on the Ambari server host:

/var/lib/ambari-server/resources/scripts/ -u admin -p admin -port 8080 get localhost
c1 kerberos-env

If you get the following error, the kerberos-env config was lost somehow:

[ERROR] "kerberos-env" not found in server response.

Else if configuration data comes back, we can figure out what might be the offending property
or properties.

From: Fay Wang <>
Reply-To: "" <>, Fay Wang <>
Date: Tuesday, February 23, 2016 at 1:58 AM
To: "" <>, Fay Wang <>
Subject: Re: another Kerberos issue

Kerberization is successful. All services are up and service checks pass. Ambari version is
(1) POST http://localhost:8080/api/v1/clusters/MyCluster/services/KERBEROS
(2) POST http://localhost:8080/api/v1/clusters/MyCluster/services/KERBEROS/components/KERBEROS_CLIENT
(3) PUT -d @/tmp/kerberos_config.json http://localhost:8080/api/v1/clusters/MyCluster(4) POST
-d '{"host_components" : [{"HostRoles" : {"component_name":"KERBEROS_CLIENT"}}]}'http://localhost:8080/api/v1/clusters/MyCluster/hosts?Hosts/host_name=$host(5)
PUT -d '{"ServiceInfo": {"state" : "INSTALLED"}}'http://localhost:8080/api/v1/clusters/MyCluster/services/KERBEROS
(6) POST -d @/tmp/kerberos_descriptor.json http://localhost:8080/api/v1/clusters/MyCluster/artifacts/kerberos_descriptor
(7) PUT -d @/tmp/kerberos_enable.json http://localhost:8080/api/v1/clusters/MyCluster

Not sure why the page (Ambari UI -> Admin -> Kerberos) is not loaded. Please help...

On Monday, February 22, 2016 10:26 PM, Fay Wang <> wrote:

Hi,    Another issue with automated kerberos via REST API is that after kerberization,
on Ambari UI -> Admin -> Kerberos -> The page does not load. It must be something
to do with the value not been set/ or not been retrieved correctly. There is nothing special
in ambari-server.log. Any help is highly appreciated....

View raw message