方案:Azure HDInsight 中的 Apache Ambari 目录警报Scenario: Apache Ambari directory alerts in Azure HDInsight

本文介绍在与 Azure HDInsight 群集交互时出现的问题的故障排除步骤和可能的解决方案。This article describes troubleshooting steps and possible resolutions for issues when interacting with Azure HDInsight clusters.

问题Issue

从 Apache Ambari 收到类似于以下内容的错误: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

受影响的工作器节点上缺少 Ambari 警报中提到的目录。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 连接到相关的工作器节点。SSH to the relevant worker node.

  2. 获取根用户:sudo suGet 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. 从 Apache Ambari UI 禁用然后启用警报。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 the following channel for more support:

  • 如果需要更多帮助,可以从 Azure 门户提交支持请求。If you need more help, you can submit a support request from the Azure portal.