You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Karthik Palaniappan (JIRA)" <ji...@apache.org> on 2016/03/07 06:33:40 UTC

[jira] [Created] (AMBARI-15313) Cannot install Ranger after deploying kerberized cluster through cluster creation template

Karthik Palaniappan created AMBARI-15313:
--------------------------------------------

             Summary: Cannot install Ranger after deploying kerberized cluster through cluster creation template
                 Key: AMBARI-15313
                 URL: https://issues.apache.org/jira/browse/AMBARI-15313
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server, ambari-web
    Affects Versions: 2.2.0
         Environment: $ uname -a
Linux VNODE0602 2.6.32-504.30.3.el6.centos.plus.x86_64 #1 SMP Wed Jul 15 00:52:19 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

$ java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (rhel-2.6.4.0.el6_7-x86_64 u95-b00)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

$ python --version
Python 2.6.6

This is a one node virtual cluster.
            Reporter: Karthik Palaniappan


I deployed a kerberized cluster using a cluster creation template (which is an awesome feature btw). The deploy was successful. Then, I tried to add ranger using the wizard. I followed the instructions on this document: https://github.com/abajwa-hw/security-workshops/blob/master/Setup-ranger-23.md in setting up the MySQL database, executing `ambari-server setup`, etc. 

Then, when hitting the "deploy" button on step 6, I got this error messsage:

{quote}
org.apache.ambari.server.controller.spi.NoSuchResourceException: The requested resource doesn't exist: Artifact not found, Artifacts/artifact_name=kerberos_descriptor AND Artifacts/cluster_name=Hello
{quote}

And in the javascript console:
{quote}
PUT http://ambariserver:8080/api/v1/clusters/Hello/artifacts/kerberos_descriptor 404 (Not Found) vendor.js:127
{quote}

>From what I understand, if you use a blueprint or cluster creation template it is optional to specify a kerberos_descriptor. If none is specified, the stack default (http://ambariserver:8080/api/v1/clusters/Hello/artifacts/kerberos_descriptor) is used. However, the Ranger wizard wasn't correctly falling back to the stack default.

I first wasn't sure what to post to the endpoint http://ambariserver:8080/api/v1/clusters/Hello/artifacts/kerberos_descriptor, so I gave it an empty body, and hit a NullPointerException. Ambari should return a much better error message.

{quote}
06 Mar 2016 20:59:08,014 ERROR [qtp-ambari-client-963] BaseManagementHandler:66 - Caught a runtime exception while attempting to create a resource: null
java.lang.NullPointerException
	at org.apache.ambari.server.controller.internal.ArtifactResourceProvider.toEntity(ArtifactResourceProvider.java:473)
...
{quote}

Then, I figured I could just copy the stack kerberos_descriptor, and POSTing that worked. 

At this point, the RANGER service was in the UNKNOWN state, and I couldn't use the API to set it to INSTALLED. I used the API to delete RANGER, and walked through the wizard again. This time, since I did have the kerberos_descriptor, it worked perfectly.

So tl;dr there are three bugs here:
- The Ranger wizard does not fall back to the stack default kerberos_descriptor
- RANGER can get into an unrecoverable UNKNOWN state
- POSTing an empty body to kerberos_descriptor generates a NullPointerException on the server, and a 500 to the client



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)