Member since
03-14-2016
4721
Posts
1111
Kudos Received
874
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2825 | 04-27-2020 03:48 AM | |
| 5479 | 04-26-2020 06:18 PM | |
| 4661 | 04-26-2020 06:05 PM | |
| 3702 | 04-13-2020 08:53 PM | |
| 5604 | 03-31-2020 02:10 AM |
01-21-2019
05:54 AM
@Michael Bronson You can make use of the Ambari API call: http://hdfcluster1.example.com:8080/api/v1/clusters/TestCluster/host_components?HostRoles/component_name=NAMENODE&metrics/dfs/FSNamesystem/HAState=active
... View more
01-15-2019
11:51 AM
1 Kudo
@Michael Bronson Step1). You can get all the Hostnames where the DataNode is present using the following API call: # curl --user admin:admin -H 'X-Requested-By: ambari' -X GET "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name" | grep host_name | awk '{print $NF}' | awk -F'"' '{print $2}'
. Step2). Once you have the list of the hosts where the Datanode is installed (using above API call) then you can use it to make the following API call using some shell script to replace the $HOST with the hostname. # curl --user admin:admin -H 'X-Requested-By: ambari' -X POST -d '{"RequestInfo":{"command":"RESTART","context":"Restart all components on $HOST","operation_level":{"level":"HOST","cluster_name":"NewCluster"}},"Requests/resource_filters":[{"service_name":"HDFS","component_name":"DATANODE","hosts":"$HOST"}, {"service_name":"YARN","component_name":"NODEMANAGER","hosts":"$HOST"}, {"service_name":"AMBARI_METRICS","component_name":"METRICS_MONITOR","hosts":"$HOST"} ]}' http://ambariserver.example.com:8080/api/v1/clusters/NewCluster/requests . NOTE: In the above call please make sure to replace the $HOST with the hostname one by one (using some shell script Loop iteration) which we retrieved from the previous API call. Also please replace the "NewCluster" with your own cluster name. Also please replace "ambariserver.example.com" with your ambari hostname and credentials accordingly.
... View more
01-15-2019
07:17 AM
@abbas mohammadnejad 1. How are you updating the blueprint? 2. After upgrading the blueprint where actually checking the values for "cluster-env" ? Usually we export the blueprint setting of an existing cluster with the following API call. # curl --user admin:admin -i -H 'X-Requested-By: ambari' -X GET "http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME?format=blueprint" -o /tmp/cluster_blueprint.json . In the exported blueprint "/tmp/cluster_blueprint.json" you will find the current cluster information. Also you will find the "cluster-env" properties there inside the same "/tmp/cluster_blueprint.json" file. So if you want to make any changes to the blueprint then you can either edit the same "/tmp/cluster_blueprint.json" file with your own values as you mentioned above. and then use the ambari API call to POST the same edited blueprint back to ambari. NOTE: However the blueprint will be used to create a new cluster. It is not used to modify the settings/configurations of an existing cluster. The other option will be to make the changes in "cluster-env" settings of your current cluster usijng utilities like "config.py" and then export the blueprint freshly using the same API call. # curl --user admin:admin -i -H 'X-Requested-By: ambari' -X GET "http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME?format=blueprint" -o /tmp/cluster_blueprint_new.json . Making changes in cluster-env using config.py then exporting blueprint: You can make the changes in the "cluster-env" configuration of current cluster using the following kind of commands from ambari server host: # /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=KerLatest --config-type=cluster-env -k "recovery_lifetime_max_count" -v "1024"
#
/var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=KerLatest --config-type=cluster-env -k "recovery_enabled" -v "true" NOTE: Please make sure to change the cluster name "CLUSTER_NAME" (example: KerLatest is my cluster name) here to your existing clustername. Then export the blueprint of this cluster again.
# curl --user admin:admin -i -H 'X-Requested-By: ambari' -X GET "http://$AMBARI_HOST:8080/api/v1/clusters/$CLUSTER_NAME?format=blueprint" -o /tmp/cluster_blueprint_new_1.json .
... View more
01-15-2019
04:51 AM
@Magical Jelly Good to know that the issue is resolved. It will be wonderful if you can mark this HCC thread as Answered by clicking on the "Accept" link then other HCC users can quickly find the answered threads.
... View more
01-14-2019
10:34 AM
1 Kudo
@Magical Jelly Please let us know which ambari version are you using? There seems to be some issue reported for Ambari 2.6 and prior version of Ambari Widgets where the Widget formula contained "Subtract" operator. Something similar you can find here: https://issues.apache.org/jira/browse/AMBARI-23309 Code Changes: https://github.com/apache/ambari/pull/738/files So if you can make the same changes as mentioned in the Pull request inside the "/usr/lib/ambari-server/web/javascripts/app.js" (after taking a backup of this file) then it should start working after hard reset of browser. . Or try the same in Ambari 2.7.0 or later and then see if it works.
... View more
01-14-2019
08:24 AM
1 Kudo
@Enrique Benito Casado Yes, if any other process is using port 8080 then Sandbox provided Ambari will not able to use the same port. So the best option will be to find the process which is using Port 8080 and then either stop that (Or change the port of that process) then restart the Sandbox. Example: Some of the following command you can use to find the PID which tomcat and using port 8080 # ps -ef | grep -i tomcat
# netstat -tnlpa | grep 8080 .
... View more
01-13-2019
10:11 PM
1 Kudo
@Enrique Benito Casado It might be possible that you might be running some other services on your laptop like Oracle Database or some other tomcat server thats why it might be consuming the port 8080 which is supposed to be used by Ambari. So please run the netstat command on your Laptop (local machine) to findout if port 8080 is being utilized by any other process or not? The other wayt to quickly verify the same will be to "Stop the Sandbox" instance and then try to access port 8080 to see if you are still able to access the "Apache Tomcat/ 9.0.8" page? If yes then that means that page is coming from some process running on your local machine instead of sandbox (because Sandbox is not running currently). .
... View more
01-10-2019
08:56 PM
@Kunal Kumar As you are getting the following error: NetUtil.py:96 - [Errno 8] _ssl.c:504: EOF occurred in violation of protocol . To solve this problem simply configure the Ambari Agent to use TLSv1.2 when communicating with the Ambari Server by editing each Ambari Agent’s /etc/ambari-agent/conf/ambari-agent.ini file and adding the following configuration property to the security section: [security]
force_https_protocol=PROTOCOL_TLSv1_2 . Refer to a detailed explanation on this flag in the following article: https://community.hortonworks.com/articles/188269/javapython-updates-and-ambari-agent-tls-settings.html . Regarding your query "how to find /python/cert-verificatin.cfg" ? There is no need to set the verify=disable for this issue . However if you want to do it then you will have to manually create the mentioned file with the verify=disable.
... View more
01-09-2019
10:04 PM
@Lokesh Mukku Means Ranger DB test connection passed however Ranger Admin component could not come up hence the Curl Call to http://nn.hadoop.com:6080/login.jsp URL is failing. So please check the Ranger Admin logs to find any error.
... View more
01-09-2019
09:24 PM
1 Kudo
@Lokesh Mukku Your error indicates that the user ranger '@'% does not have access to 'mysql' DB. Hence you will need to properly grant the user. SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'ranger'@'%' to database 'mysql' ErrorCode: 1044 Have you already performed the MySQL DB side prerequisite before using Ranger with MySQL? Like giving proper grant to "ranger" user ? CREATE USER 'ranger'@'localhost' IDENTIFIED BY 'ranger';
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost';
CREATE USER 'ranger'@'%' IDENTIFIED BY 'ranger';
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES; . Please refer to the following doc for more information: https://docs.hortonworks.com/HDPDocuments/Ambari-2.7.3.0/bk_ambari-installation/content/configuring_mysql_for_ranger.html For validating what kind of grants the user has, you can run the following SQL query on your mysql db mysql> SELECT user, host FROM user WHERE user like 'range%' ; .
... View more