Skip to content

How do I resolve an Amazon EMR cluster that has a blank Ganglia overview page?

2 minute read
0

I want to resolve an Amazon EMR cluster that has a blank Ganglia overview page.

Resolution

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.

Manually modify the cluster_view.php file

Complete the following steps:

  1. Use SSH to connect to the Amazon EMR primary node.

  2. Open the /usr/share/ganglia/cluster_view.php file.

  3. 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)) {
  4. Refresh the Ganglia UI to view the cluster overview page.

Modify the cluster_view.php file as an Amazon EMR step

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.

Complete the following steps:

  1. Copy the following command into a .sh file:
    sudo sed -i '26s/ \$context_metrics \= \"\"\;/ \$context_metrics \= array\(\)\;/g' /usr/share/ganglia/cluster_view.php
    Note: You can store the file in an Amazon Simple Storage Service (Amazon S3) bucket.
  2. Run the add-steps command to add the .sh file to the cluster as an Amazon EMR step:
    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]
    Note: Replace example-cluster-id with your cluster ID and example-s3-bucket-sh-file with the Amazon S3 path of the .sh file.
  3. Refresh the Ganglia UI to view the cluster overview page.

Related information

Ganglia

View Ganglia metrics

AWS OFFICIALUpdated 2 years ago