ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fay Wang <faywang...@yahoo.com>
Subject can not start service after kerberos
Date Thu, 03 Mar 2016 21:05:21 GMT
Hi,    We got a very weird problem and desparetely need help!    We want to start services
after kerberos is enabled. The following API failed with "Missing KDC administrator credentials":

(1) curl -k  -H 'X-Requested-By:ambari' -u admin:$ADMINPASS -i -X PUT -d '{"ServiceInfo":
{"state" : "STARTED"}}' $AMBARI_SERVER_HOST_PORT/api/v1/clusters/$CLUSTER_NAME/services

HTTP/1.1 400 Bad Request
User: admin
Set-Cookie: AMBARISESSIONID=1shytw5f5fos61st0se0xmh2di;Path=/;Secure;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 460
Server: Jetty(8.1.17.v20150415)

{
  "status" : 400,
  "message" : "java.lang.IllegalArgumentException: Missing KDC administrator credentials.\nThe
KDC administrator credentials must be set in session by updating the relevant Cluster resource.This
may be done by issuing a PUT to the api/v1/clusters/(cluster name) API entry point with the
following payload:\n{\n  \"session_attributes\" : {\n    \"kerberos_admin\" : {\"principal\"
: \"(PRINCIPAL)\", \"password\" : \"(PASSWORD)\"}\n  }\n}"

(2) We then provided KDC administrator credential:
curl -k  -H 'X-Requested-By:ambari' -u admin:$ADMINPASS -i -X PUT -d @/tmp/start_services.json 
$AMBARI_SERVER_HOST_PORT/api/v1/clusters/$CLUSTER_NAME/services

The content of /tmp/start_services.json is:
{
  "ServiceInfo": {"state" : "STARTED"},
  "session_attributes" : {
    "kerberos_admin" : {
      "principal" : "admin/admin@EXAMPLE.COM",
      "password" : "P@ssw0rd"
    }
  }
}

It again failed with "unsupported properties":

curl: (3) [globbing] nested braces not supported at pos 17

HTTP/1.1 400 Bad Request
User: admin
Set-Cookie: AMBARISESSIONID=1hchd4u8p7xza1tsvcdh6kvj5a;Path=/;Secure;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 299
Server: Jetty(8.1.17.v20150415)

{
  "status" : 400,
  "message" : "org.apache.ambari.server.controller.spi.UnsupportedPropertyException: The
properties [session_attributes/kerberos_admin/principal, session_attributes/kerberos_admin/password]
specified in the request or predicate are not supported for the resource type Service."
}
Please let us know how to make it work...Any help is highly appreciated...
-fay









Mime
View raw message