Member since
03-14-2016
4721
Posts
1111
Kudos Received
874
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 2823 | 04-27-2020 03:48 AM | |
| 5475 | 04-26-2020 06:18 PM | |
| 4647 | 04-26-2020 06:05 PM | |
| 3699 | 04-13-2020 08:53 PM | |
| 5602 | 03-31-2020 02:10 AM |
04-27-2020
03:48 AM
1 Kudo
@mike_bronson7 You can achieve it in a similar way described on the following thread: https://community.cloudera.com/t5/Support-Questions/AMBARI-how-to-set-value-in-json-REST-API/td-p/290385 Example: AMBARI_FQDN=newhwx1.example.com
CLUSTER_NAME=NewCluster
DATANODES=newhwx1.example.com,newhwx2.example.com,newhwx3.example.com,newhwx5.example.com
# curl -s -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop DataNodes","operation_level":{"level":"SERVICE","cluster_name":"'"$CLUSTER_NAME"'"},"query":"HostRoles/component_name=DATANODE&HostRoles/host_name.in('$DATANODES')&HostRoles/maintenance_state=OFF"},"Body":{"HostRoles":{"state":"INSTALLED"}}}' "http://$AMBARI_FQDN:8080/api/v1/clusters/$CLUSTER_NAME/host_components" . .
... View more
04-26-2020
06:18 PM
2 Kudos
@mike_bronson7 This like talks about the command link options to Stop various HDP components manually using CLI. (Including HS2 and Hive Metastore) https://docs.cloudera.com/HDPDocuments/HDP2/HDP-2.6.5/bk_reference/content/stopping_hdp_services.html
... View more
04-26-2020
06:05 PM
1 Kudo
@mike_bronson7 If you want to get the HA Status (Active/Standby) for ResourceManager then you can make the following call: # curl -s -u admin:admin -H "X-Requested-By: ambari" -X GET "h ttp://$AMBARI_FQDN:8080/api/v1/clusters/$CLUSTER_NAME/host_components?HostRoles/component_name=RESOURCEMANAGER&HostRoles/ha_state.in(ACTIVE,STANDBY)" If you just want to know that which host the ResourceManager is in Active State then: # curl -s -u admin:admin -H "X-Requested-By: ambari" -X GET "h ttp://$AMBARI_FQDN:8080/api/v1/clusters/$CLUSTER_NAME/host_components?HostRoles/component_name=RESOURCEMANAGER&HostRoles/ha_state=ACTIVE" .
... View more
04-13-2020
08:53 PM
1 Kudo
@sarm What is your HDFS version? Is it Hadoop 2.8.0, 3.0.0-alpha1 or higher? # hadoop version Quick check on what the JAR contains? # javap -cp /usr/hdp/3.1.0.0-78/hadoop/client/hadoop-hdfs-client.jar org.apache.hadoop.hdfs.web.resources.PutOpParam.Op | grep -i ALLOW
public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op ALLOWSNAPSHOT;
public static final org.apache.hadoop.hdfs.web.resources.PutOpParam$Op DISALLOWSNAPSHOT; For example i am able to use the same WebHDFS API call without any issue as following: # curl -i -X PUT "http://kerlatest1.example.com:50070/webhdfs/v1/tmp/aaaa_bbbb?op=DISALLOWSNAPSHOT&user.name=hdfs"
HTTP/1.1 200 OK
Date: Tue, 14 Apr 2020 03:45:24 GMT
Cache-Control: no-cache
Expires: Tue, 14 Apr 2020 03:45:24 GMT
Date: Tue, 14 Apr 2020 03:45:24 GMT
Pragma: no-cache
X-FRAME-OPTIONS: SAMEORIGIN
Set-Cookie: hadoop.auth="u=hdfs&p=hdfs&t=simple&e=1586871924286&s=xxxxxxxx/yyyyyyyyy="; Path=/; HttpOnly
Content-Type: application/octet-stream
Content-Length: 0 Please refer to the following JIRA to verify if you are using the correct version (like 2.8.0, 3.0.0-alpha1 or higher) of HDFS where this option is available? Reference: https://issues.apache.org/jira/browse/HDFS-9057 https://cwiki.apache.org/confluence/display/HADOOP/Hadoop+2.8.0+Release (look for HDFS-9057)
... View more
03-31-2020
02:10 AM
1 Kudo
@mike_bronson7 A good explanation for some delay is mentioned in JIRA AMBARI-20220: The ambari-server start and ambari-server restart commands are currently hard coded to wait a maximum of 50 seconds for the Jetty server to bind to port 8080 (or whatever the configured port is). Under normal circumstances, this value should be fine. However, since Jetty loads classes from views, the more views which are installed increases the total load time before Jetty binds to the server port. There could be few other reasons like a slightly high system resource utilisation when ambari was restarting could also cause little delay in opening the ambari api port. So you should try the following to fix this: - Edit the "/etc/ambari-server/conf/ambari.properties" and increase the following property value to 120 or 150 seconds. server.startup.web.timeout=120 - Then restart the ambari-server again. # ambari-server restart Reference: 1. https://issues.apache.org/jira/browse/AMBARI-20220 2. https://community.cloudera.com/t5/Support-Questions/change-the-port-for-ambari-server/m-p/214911#M176823
... View more
03-11-2020
04:02 AM
2 Kudos
@Gaurang1 Good to know that after enabling Port forwarding for 7180 port you are able to access the http://localhost:7180 properly and it is working fine. Regarding your SSH issue , i think you should map the port 22 to something else because your Laptop where you are running virtual Box also might be using that default port 22 If you still face a SSH port access issue while using VirtualBox then it can be discussed as part of. separate thread as the Original issue which you posted in the original thread is resolved. If your original is answered then, Please make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.
... View more
03-10-2020
07:27 PM
@Gaurang1 As you are using VirtualBox to CM so can you please chck if you have configured Port Forwarding in VirtualBox in order to be able to access the port 7180 running inside the VM to outside of VirtualBox? Reference: (from google search) https://www.simplified.guide/virtualbox/port-forwarding https://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/
... View more
02-27-2020
07:40 PM
1 Kudo
@mike_bronson7 In addition to my previous comment: Ambari provides option to "Rolling Restart Kafka Brokers" (one by one). In the ambari UI when you click on Ambari UI --> Kafka --> Service Actions (drop down) --> "Restart Kafka Brokers" Then it basically shows the Rolling restart Settings like. You can decide how much time in your env one Kafka Broker full restart taks and then after how much time do you want other Kafka broker restart will be scheduled by Ambari. It can also be achieved using the API call as following: # curl -iskH "X-Requested-By: ambari" -u admin:admin -X POST -d '[{"RequestSchedule":{"batch":[{"requests":[{"order_id":1,"type":"POST","uri":"/clusters/NewCluster/requests","RequestBodyInfo":{"RequestInfo":{"context":"_PARSE_.ROLLING-RESTART.KAFKA_BROKER.1.3","command":"RESTART"},"Requests/resource_filters":[{"service_name":"KAFKA","component_name":"KAFKA_BROKER","hosts":"testnode2.example.com"}]}},{"order_id":2,"type":"POST","uri":"/clusters/NewCluster/requests","RequestBodyInfo":{"RequestInfo":{"context":"_PARSE_.ROLLING-RESTART.KAFKA_BROKER.2.3","command":"RESTART"},"Requests/resource_filters":[{"service_name":"KAFKA","component_name":"KAFKA_BROKER","hosts":"testnode3.example.com"}]}},{"order_id":3,"type":"POST","uri":"/clusters/NewCluster/requests","RequestBodyInfo":{"RequestInfo":{"context":"_PARSE_.ROLLING-RESTART.KAFKA_BROKER.3.3","command":"RESTART"},"Requests/resource_filters":[{"service_name":"KAFKA","component_name":"KAFKA_BROKER","hosts":"testnode5.example.com"}]}}]},{"batch_settings":{"batch_separation_in_seconds":"121","task_failure_tolerance":1}}]}}]' ttp://testnode1.example.com:8080/api/v1/clusters/NewCluster/request_schedules .
... View more
02-27-2020
07:34 PM
@mike_bronson7 Looks like you have asked a very similar query on the other thread : https://community.cloudera.com/t5/Support-Questions/amari-rest-API-how-to-stop-service-on-specific-host/m-p/290651
... View more
02-27-2020
04:34 PM
2 Kudos
@mike_bronson7 Error says : hostname=kafka01. Host not found So please check if the Hostname is correct (i means fully qualified hostnmae) Please compare it with the hostname listed in the following API call response. Just try to open this URL in the browser to see which hostname ambari is expecting: http://ambari_server_hostname:8080/api/v1/clusters/$CLUSTER_NAME/hosts/ .
... View more