Scenario: Apache Ambari directory alerts in Azure HDInsight

This article describes troubleshooting steps and possible resolutions for issues when interacting with Azure HDInsight clusters.

Issue

You receive errors from Apache Ambari that are similar to:

1/1 local-dirs have errors: [ /mnt/resource/hadoop/yarn/local : Cannot create directory: /mnt/resource/hadoop/yarn/local ]
1/1 log-dirs have errors: [ /mnt/resource/hadoop/yarn/log : Cannot create directory: /mnt/resource/hadoop/yarn/log ]

Cause

The mentioned directories from Ambari alert are missing on affected worker node(s).

Resolution

Manually create missing directories on the affected worker node(s).

  1. SSH to the relevant worker node.

  2. Get root user: sudo su.

  3. Recursively create needed directories.

  4. Change owner and group for these directories.

    chown -R yarn /mnt/resource/hadoop/yarn/local
    chgrp -R hadoop /mnt/resource/hadoop/yarn/local
    chown -R yarn /mnt/resource/hadoop/yarn/log
    chgrp -R hadoop /mnt/resource/hadoop/yarn/log
    
  5. From Apache Ambari UI, disable, and then enable alert.

Next steps

If you didn't see your problem or are unable to solve your issue, visit one of the following channels for more support:

  • If you need more help, you can submit a support request from the Azure portal. Select Support from the menu bar or open the Help + support hub.