Member since
03-14-2016
4721
Posts
1111
Kudos Received
874
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2712 | 04-27-2020 03:48 AM | |
| 5269 | 04-26-2020 06:18 PM | |
| 4440 | 04-26-2020 06:05 PM | |
| 3558 | 04-13-2020 08:53 PM | |
| 5364 | 03-31-2020 02:10 AM |
04-06-2017
03:56 PM
1 Kudo
@rajdip chaudhuri You can use Ranger Rest API to be invoked using simple "curl" commands in order to disable/enable various ranger policies. 1. Get the List of Policies using Rest API: http://localhost:6080/service/plugins/policies
For example you want to disable the policy ID = 14 (Example "HDFS Global Allow") The do the following: Using Ranger API get the policy data: curl -i -u admin:admin -H "Content-Type: application/json" -X GET http://localhost:6080/service/plugins/policies/14
2. Then you get some JSON output like following: {"id":14,"guid":"eb167192-29a5-490c-9655-8be40c2363eb","isEnabled":true,"createdBy":"Admin","updatedBy":"Admin","createTime":1473764849000,"updateTime":1473764849000,"version":1,"service":"Sandbox_hadoop","name":"HDFS Global Allow","policyType":0,"description":"This policy gives global permission for all users. Disable this to test Apache Ranger","resourceSignature":"6be1f1907223a25472365fea64a3d450","isAuditEnabled":true,"resources":{"path":{"values":["/","/*"],"isExcludes":false,"isRecursive":true}},"policyItems":[{"accesses":[{"type":"read","isAllowed":true},{"type":"write","isAllowed":true},{"type":"execute","isAllowed":true}],"users":[],"groups":["public"],"conditions":[],"delegateAdmin":true}],"denyPolicyItems":[],"allowExceptions":[],"denyExceptions":[],"dataMaskPolicyItems":[],"rowFilterPolicyItems":[]}
Notice it has ["isEnabled":true] 3. Now Paste the output to a file "/tmp/14.json", then change it to ["isEnabled":false] and then PUT the data using curl. Content of "14.json" file as following: {"id":14,"guid":"eb167192-29a5-490c-9655-8be40c2363eb","isEnabled":false,"createdBy":"Admin","updatedBy":"Admin","createTime":1473764849000,"updateTime":1473764849000,"version":1,"service":"Sandbox_hadoop","name":"HDFS Global Allow","policyType":0,"description":"This policy gives global permission for all users. Disable this to test Apache Ranger","resourceSignature":"6be1f1907223a25472365fea64a3d450","isAuditEnabled":true,"resources":{"path":{"values":["/","/*"],"isExcludes":false,"isRecursive":true}},"policyItems":[{"accesses":[{"type":"read","isAllowed":true},{"type":"write","isAllowed":true},{"type":"execute","isAllowed":true}],"users":[],"groups":["public"],"conditions":[],"delegateAdmin":true}],"denyPolicyItems":[],"allowExceptions":[],"denyExceptions":[],"dataMaskPolicyItems":[],"rowFilterPolicyItems":[]}
4. Now run the following curl command: curl -i -u admin:admin -H "Content-Type: application/json" -X PUT -d@/tmp/14.json http://localhost:6080/service/plugins/policies/14
More details: https://cwiki.apache.org/confluence/display/RANGER/REST+APIs+for+Policy+Management .
... View more
04-06-2017
02:59 PM
1 Kudo
@shi cheng I will try to change the "1.1.0-SNAPSHOT" from file : https://github.com/apache/ambari/blob/trunk/ambari-metrics/ambari-metrics-storm-sink/pom.xml#L33-L35 <properties>
<storm.version>1.1.0-SNAPSHOT</storm.version>
</properties> . Try changing the "1.1.0-SNAPSHOT" to "1.1.0" as i see that this is available in the repo: http://repo.hortonworks.com/content/groups/public/org/apache/storm/storm-core/1.1.0/ Looks like the storm support was added from ambari 2.4 recently [1] and now the 1.1.0-SNAPSHOT is not present in the repo so try changing it to 1.1.0 [1] https://issues.apache.org/jira/browse/AMBARI-17080 [2] https://github.com/apache/ambari/commit/57fccc039c00b301836cf74c15016734fedd64ca (Search for 1.1.0-SNAPSHOT) .
... View more
04-06-2017
01:16 PM
@Banshidhar Sahoo Please see the release notes of ambari 2.5.0.3 it is recently released and supported. http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-release-notes/content/ch_relnotes-ambari-2.5.0.3.html . You can also find the ambari support matrices here: http://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.0/bk_support-matrices/content/ch_matrices-ambari.html
... View more
04-06-2017
11:43 AM
@Banshidhar Sahoo Ambari 2.4.2 was there for quite a long time and was being used by many users. However i would suggest you to go for Ambari 2.5 which is recently release and has many Fixes / Great features. So definitely you should go with 2.5.0.3 http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-release-notes/content/ch_relnotes-ambari-2.5.0.3.html It really has a very long list of fixes which you would like to see in your Ambari: http://docs.hortonworks.com/HDPDocuments/Ambari-2.5.0.3/bk_ambari-release-notes/content/ambari_relnotes-2.5.0.3-fixed-issues.html .
... View more
04-06-2017
02:33 AM
@Rahul Jain Additionally as you mentioned that you tried installing ambari agents manually so please check the "/etc/ambari-agent/conf/ambari-agent.ini" file to see if you have entered correct port information's there: [server]
hostname=sandbox.hortonworks.com
url_port=8440
secured_url_port=8441
[agent]
logdir=/var/log/ambari-agent
piddir=/var/run/ambari-agent
prefix=/var/lib/ambari-agent/data
;loglevel=(DEBUG/INFO)
loglevel=INFO
data_cleanup_interval=86400
data_cleanup_max_age=2592000
data_cleanup_max_size_MB = 100
ping_port=8670 . For Example the default ping port should be "ping_port=8670" , "url_port=8440", "secured_url_port=8441" Ambari agents communicates to the ambari server using these ports. So make sure that these ports are not blocked. -> https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-reference/content/default_network_port_numbers_-_ambari.html .
... View more
04-06-2017
02:29 AM
1 Kudo
@Rahul Jain In your error stack i see the following entry: Host registration aborted. Ambari Agent host cannot reach Ambari Server 'ns2.dns2go.com:8080'. Please check the network connectivity between the Ambari Agent host and the Ambari Server . Can you please make sure that the hostnames are correctly used and every agent host machine and ambari host machine is returning the correct hostname (FQDN) in the following commands output? # hostname -f . From the ambari agent machine try to access the ambari server's 8080 port to see if there is no firewall restriction. # telnet ns2.dns2go.com 8080 - If you are not able to connect then there may be a firewall or Network issue between the ambari server & agent machine. If IP Tables is enabled on ambari then try disabling it. - Make sue that the "/etc/hosts" file of ambari agent hosts as well as ambari server has the entries of all the cluster members in it. Example: following kind of entries exist on every cluster member machine so that they can resolve each other. 10.10.20.120 ns2.dns2go.com
10.10.20.130 agent1.dns2go.com
10.10.20.140 agent2.dns2go.com
10.10.20.150 agent3.dns2go.com .
... View more
04-05-2017
02:21 PM
@Manikandan Jeyabal
Also can you please share your "~/.m2/settings.xml" file? Or if you are passing any other custom file to define your custom local repository then please share that. Or if you are using any custom settings file as following: mvn clean install -s /PATH/TO/your/settings.xml
... View more
04-05-2017
01:53 PM
@Manikandan Jeyabal
The Blog that you are referring is too Old (2014/08/26): https://gauravkohli.com/2014/08/26/apache-oozie-installation-on-hadoop-2-4-1/
So it is quite possible that those old artiifacts might not be present in the repositories (Maven central). So better get new version of oozie and then try to build it.. If you really want to build oozie then i will suggest you to clone the oozie from here: https://github.com/apache/oozie # git clone https://github.com/apache/oozie.git .
... View more
04-05-2017
01:51 PM
@Manikandan Jeyabal
Yes, you should get those errors because in the mentioned repositories the exact oozie-core.4.0.0 version of artifact is not available. Example: In http://repo.hortonworks.com/content/repositories/releases/org/apache/oozie/oozie-core/ you will find the following version. 4.0.0.2.0.10.0-1
So you will need to change the verison in your "pom.xml" in order to get this unresolved dependency.
... View more
04-05-2017
01:07 PM
@Manikandan Jeyabal In your logs we see that it is referring to "http://repo1.maven.org/maven2" Could not resolve dependencies for project org.apache.oozie:oozie-core:jar:4.0.0: Failure to find org.apache.oozie:oozie-hbase:jar:0.98.8.oozie-4.0.0 in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] . Can you check the following repo and retry the build: http://repo.hortonworks.com/content/repositories/releases/org/apache/oozie/oozie-core/
OR
http://repo.hortonworks.com/content/groups/public/org/apache/oozie/oozie-core/
Please see: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.2/bk_installing_manually_book/content/ch01s13.html
... View more