I want to resolve an Amazon EMR cluster that has a blank Ganglia overview page.
Note: This is a known issue that affects Amazon EMR release versions 5.30.0 and 6.0.0. This issue is resolved in Amazon EMR release version 5.30.1.
To resolve this issue on Amazon EMR 5.30.0 or 6.0.0, modify the cluster_view.php file either manually or as an Amazon EMR step.
Complete the following steps:
Use SSH to connect to the Amazon EMR primary node.
Open the /usr/share/ganglia/cluster_view.php file.
On line 26, change $context_metrics = "" to $context_metrics = array(). Example:
25 function get_picker_metrics($metrics, $reports, $gweb_root, $graph_engine){26 $context_metrics = array(); 27 if (count($metrics)) {
Refresh the Ganglia UI to view the cluster overview page.
Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.
sudo sed -i '26s/ \$context_metrics \= \"\"\;/ \$context_metrics \= array\(\)\;/g' /usr/share/ganglia/cluster_view.php
aws emr add-steps --cluster-id example-cluster-id --steps Type=CUSTOM_JAR,Name="Fix Ganglia",Jar="s3://us-east-1.elasticmapreduce/libs/script-runner/script-runner.jar",ActionOnFailure=CONTINUE,Args=[example-s3-bucket-sh-file]
Ganglia
View Ganglia metrics