Support Questions

Find answers, ask questions, and share your expertise

ambari user management view missing

avatar
Expert Contributor

When I logon to Ambari as admin, I no longer see the manage ambari link. I need to create users. What could be wrong ?

1 ACCEPTED SOLUTION

avatar
Master Mentor

The problem of Manage Ambari option resolved this is what I did !

Logged on the Ambari node where the MySQL database is running. Switch to the Ambari database and deleted the entry in adminprivlege with privilege id 9 I just guessed that id 1 was created first for the ambari Admin which was a correct assumption

# ambari-server stop 
# ambari-server start

But prior to deleting the above entry I run these 2 API's

Delete a user using REST API

curl -iv -u admin:admin -H "X-Requested-By: ambari"-X DELETE http://ambari-server:8080/api/v1/users/{user} 

Delete a group using REST API :

curl -iv -u admin:admin -H "X-Requested-By: ambari"-X DELETE http://ambari-server:8080/api/v1/groups/{group}

Hope that helps someone


ambari-admin-issues-resolution.png

View solution in original post

11 REPLIES 11

avatar
Master Mentor

The problem of Manage Ambari option resolved this is what I did !

Logged on the Ambari node where the MySQL database is running. Switch to the Ambari database and deleted the entry in adminprivlege with privilege id 9 I just guessed that id 1 was created first for the ambari Admin which was a correct assumption

# ambari-server stop 
# ambari-server start

But prior to deleting the above entry I run these 2 API's

Delete a user using REST API

curl -iv -u admin:admin -H "X-Requested-By: ambari"-X DELETE http://ambari-server:8080/api/v1/users/{user} 

Delete a group using REST API :

curl -iv -u admin:admin -H "X-Requested-By: ambari"-X DELETE http://ambari-server:8080/api/v1/groups/{group}

Hope that helps someone


ambari-admin-issues-resolution.png

avatar

I had pretty much the same issue. Upgraded from Ambari 2.1.0 to 2.2.2. Performed the steps to upgrade the Ambari server database and everything worked except the Manage Ambari view was missing. If I used the URI

http://server:8080/views/ADMIN_VIEW/2.2.1.1/INSTANCE/#/

I could access the view, and it would start showing up on my menu, but would be missing again when I next logged in.

Followed the suggestion to look for permissions in the Ambari database and look for additional ones. In my scenario, there admin permissions looked like this.

select * from adminprivilege where principal_id = 1;

privilege_id | permission_id | resource_id | principal_id

--------------+---------------+-------------+--------------

1 | 1 | 1 | 1

52 | 3 | 9 | 1

From querying various tables I found that adminpermissions shows the properties for the permission_id, and the adminresource and adminresourcetype tables combine to show the resource_id properties.

In my case the 2 permissions listed are:

AMBARI.ADMIN permission on the AMBARI resource (the 1 1 1 1 adminprivilege row)

CLUSTER.OPERATE permission on the CLUSTER resource (the 52 3 9 1 adminprivilege row).

If I delete the CLUSTER.OPERATION permission (privilege_id = 52) from the adminprivilege table and restart ambari-server I can see the Manage Ambari permission again and admin seems to work properly.

If I look at the backup I took of the Postgres database that I made before performing the upgrade, I can see that both of the permissions were there before the upgrade. It appears that the new version of Ambari (2.2.0 in my case) doesn't handle this combination of privileges properly.

Just thought I would add some more detail as this looks like it could be an Ambari bug, and ideally, I'm assuming it isn't a normal thing to have to go into the Ambari database and manually delete rows in tables as I assume that making a mistake could likely corrupt the Ambari database.