Member since
01-04-2016
55
Posts
100
Kudos Received
14
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1629 | 03-15-2017 06:42 AM | |
1382 | 09-26-2016 04:30 PM | |
2173 | 09-21-2016 04:04 PM | |
1344 | 09-20-2016 04:34 PM | |
8559 | 08-10-2016 07:16 PM |
08-08-2016
05:51 PM
4 Kudos
@Deepak k : There are times when the customer needs services beyond the HDP stack available. In such scenarios, he may choose to have custom services. I found an interesting one here : https://github.com/hortonworks-gallery/ambari-vnc-service It says it is : An Ambari Stack service package for VNC Server with the ability to install developer tools like Eclipse/IntelliJ/Maven as well to 'remote desktop' to the sandbox and quickly start developing on HDP Hadoop Like you can see, it gives a lot of flexibility to the customer to write custom code on top of HDP code to help his individual use case. Keeping hadoop as open as possible 🙂
... View more
08-06-2016
02:42 AM
2 Kudos
@Zach Kirsch 1) I don't know what you mean by AMBARI_HOST? Is it where your ambari server is installed? From any of the agent hosts, you can find the server host from : /etc/ambari-agent/conf/ambari-agent.ini. Look for the entry [server]
hostname=$SERVER_HOST 2) Are you ok using API? You can get the cluster name by running : curl --user admin:admin http://$AMBARI_HOST:8080/api/v1/clusters/ This will return you a response of the type : { "href" : "http://$AMBARI_HOST:8080/api/v1/clusters/", "items" : [ { "href" : "http://$AMBARI_HOST:8080/api/v1/clusters/clustername", "Clusters" : { "cluster_name" : "clustername", "version" : "version" } } ]} You may then extract the cluster name. Hope this helps!
... View more
08-05-2016
11:40 PM
6 Kudos
Most frequently there are questions on how to add/delete groups/users from Ambari. This document describes how to add/delete ambari's local users and groups (Delete applies to LDAP users/groups as well). This document should give a consolidated list of rest calls to manage users/groups. Following are the steps for end-to-end creation/updating users/groups using ambari REST API. 1) Creating a user : curl -iv -u admin:admin -H "X-Requested-By: ambari" -X POST -d '{"Users/user_name":"{USER}","Users/password":"{PASSWORD}","Users/active":"{ISACTIVE}","Users/admin":"{ISADMIN}"}' http://ambari-server:8080/api/v1/users 2) Change password of user : curl -iv -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"Users/password":"{UPDATED_PASSWORD}"}' http://ambari-server:8080/api/v1/users/{USER} 3) Toggle user's admin status: curl -iv -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"Users/admin":"{true/false}"}' http://ambari-server:8080/api/v1/users/{USER} 4) Creating a group : curl -iv -u admin:admin -H "X-Requested-By: ambari"-X POST -d '{"Groups/group_name":"{GROUP_NAME}"}' http://ambari-server:8080/api/v1/groups 5) Adding a user to a (new) group : curl -iv -u admin:admin -H "X-Requested-By: ambari"-X PUT -d '[{"MemberInfo/user_name":"{USER_NAME}","MemberInfo/group_name":"{GROUP_NAME}"}]' http://ambari-server:8080/api/v1/groups/{GROUP_NAME}/members This will delete users from the group if the group exists. 6) Adding user to the users list in a group : curl -iv -u admin:admin -H "X-Requested-By: ambari"-X POST -d '[{"MemberInfo/user_name":"{USER_NAME}","MemberInfo/group_name":"{GROUP_NAME}"}]' http://ambari-server:8080/api/v1/groups/{GROUP_NAME}/members 7) Get all users : curl -iv -u admin:admin -X GET http://ambari-server:8080/api/v1/users 😎 Get all groups : curl -iv -u admin:admin -X GET http://ambari-server:8080/api/v1/groups 9) Get members of a group : curl -iv -u admin:admin -X GET http://ambari-server:8080/api/v1/groups/{GROUP_NAME}/members 10) Get user info : curl -iv -u admin:admin -X GET http://ambari-server:8080/api/v1/groups/{GROUP_NAME} 11) Get group info : curl -iv -u admin:admin -X GET http://ambari-server:8080/api/v1/users/{USER_NAME} 12) Removing a user from the users list in a group : To remove a user from a group, request a PUT with request body having a list of users that should be included in the group (Exclude ones that need to be deleted) curl -iv -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '[{"MemberInfo/user_name":"{USER_NAME1}","MemberInfo/group_name":"{GROUP_NAME}"},{"MemberInfo/user_name":"{USER_NAME2}","MemberInfo/group_name":"{GROUP_NAME}"}]' http://ambari-server:8080/api/v1/groups/{GROUP_NAME}/members 13) 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_NAME} 14) 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_NAME}
... View more
Labels:
08-05-2016
12:55 PM
1 Kudo
My assumption was this was a new group. Yes, POST would work for existing groups.
... View more
08-05-2016
11:34 AM
1 Kudo
Sorry about that. I have updated the answer with the right URI to add user to groups : http://ambari-server:8080/api/v1/groups/{GROUP_NAME}/members
... View more
08-05-2016
11:25 AM
2 Kudos
Hi @Savanna Endicott : Like most people suggested in the post, this looks like a network issue. I faced the exact same issue today and it looked like my VM had problems connecting to the proxy. It had nothing to do with the ambari repo (I disabled ambari repo and still faced the same issue). What helped was to disable proxy and try running yum clean all; yum update. To bypass your proxy, follow the post : https://community.hortonworks.com/questions/26872/forbidden-403-error-on-hdp-24-installation.html At the same time, you can talk to your IT folks to check why proxy settings are not working on your node. (May be iptables, selinux services etc are misconfigured) Hope this helps!
... View more
08-05-2016
09:53 AM
2 Kudos
Hi @marko, You may add the user to a group using the following steps : 1) add a user using API : curl -iv -u admin:admin -H "X-Requested-By: ambari" -X POST -d '{"Users/user_name":"{USER}","Users/password":"{PASSWORD}","Users/active":"{ISACTIVE}","Users/admin":"{ISADMIN}"}' http://ambari-server:8080/api/v1/users 2) add a group using API : curl -iv -u admin:admin -H "X-Requested-By: ambari" -X POST -d '{"Groups/group_name":"{GROUP_NAME}"}' http://ambari-server:8080/api/v1/groups 3) add the user to the group : curl -iv -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '[{"MemberInfo/user_name":"{USER_NAME}","MemberInfo/group_name":"{GROUP_NAME}"}]' http://ambari-server:8080/api/v1/groups/{GROUP_NAME}/members Change {USER_NAME} to the user name you want and {GROUP_NAME} to the group you want Hope this helps!
... View more
08-05-2016
06:39 AM
2 Kudos
@Muthukumar S : The issue is with the double quotes you used around X-Requested-By: ambari. When I tried copy pasting the url you have pasted, I got the same issue as you. I tried with single quotes like : curl -u admin:admin -H 'X-Requested-By: ambari' -X DELETE -d ‘{“RequestInfo”:{“state”:”INSTALL_FAILED”}}’ http://172.22.127.69:8080/api/v1/clusters/cl1/services/HIVE and it worked. Have you used an editor which does a formatting because it looks like the quotes you used were special quotes which lead to the header not being read by curl. Here is a link on how to delete a service. You will not be able to delete the service if it has components installed. The link has commands to delete components as well : https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+components+on+a+host PS : Make sure when you copy/paste, you replace the double quotes in the terminal or a reliable editor.
... View more
08-05-2016
06:16 AM
2 Kudos
Hi @Kumar Veerappan, You can find namenode via command line using : dfsadmin -report or <code>hadoop getconf -namenodes ( you can use this to get secondary namenode/backup node etc)
From ambari, you can go to services page, get to the service whose admin you want and click on the component link to find the component host. For eg, to find the namenode go to HDFS service page and click on the link for namenode : Else, move to the hosts page and search for the component : screen-shot-2016-08-05-at-114146-am.png Based on the version you are using, the filter page may vary. But every version has a filter for component type which will give you host name. Hope this helps!
... View more
08-04-2016
04:27 PM
2 Kudos
@Dinesh E Here is an article on why this could happen. It explains why and steps to take when such a scenario occurs : https://community.hortonworks.com/articles/18088/ambari-shows-hdp-services-to-be-down-whereas-they.html Hope this helps!
... View more
- « Previous
-
- 1
- 2
- Next »