|
| 1 | +--- |
| 2 | +title: Apache Hive Logs filling up disk space - Azure HDInsight |
| 3 | +description: The Apache Hive logs are filling up the disk space on the head nodes in Azure HDInsight. |
| 4 | +ms.service: hdinsight |
| 5 | +ms.topic: troubleshooting |
| 6 | +author: nisgoel |
| 7 | +ms.author: nisgoel |
| 8 | +ms.reviewer: jasonh |
| 9 | +ms.date: 03/05/2020 |
| 10 | +--- |
| 11 | + |
| 12 | +# Scenario: Apache Hive logs are filling up the disk space on the Head nodes in Azure HDInsight |
| 13 | + |
| 14 | +This article describes troubleshooting steps and possible resolutions for issues related to not enough disk space on the head nodes in Azure HDInsight clusters. |
| 15 | + |
| 16 | +## Issue |
| 17 | + |
| 18 | +On an Apache Hive/LLAP cluster, unwanted logs are taking up the entire disk space on the head nodes. Due to which, following issues could be seen. |
| 19 | + |
| 20 | +1. SSH access fails because of no space is left on the head node. |
| 21 | +2. Ambari gives *HTTP ERROR: 503 Service Unavailable*. |
| 22 | + |
| 23 | +The `ambari-agent` logs would show the following when the issue happens. |
| 24 | +``` |
| 25 | +ambari_agent - Controller.py - [54697] - Controller - ERROR - Error:[Errno 28] No space left on device |
| 26 | +``` |
| 27 | +``` |
| 28 | +ambari_agent - HostCheckReportFileHandler.py - [54697] - ambari_agent.HostCheckReportFileHandler - ERROR - Can't write host check file at /var/lib/ambari-agent/data/hostcheck.result |
| 29 | +``` |
| 30 | + |
| 31 | +## Cause |
| 32 | + |
| 33 | +In advanced Hive-log4j configurations, the parameter *log4j.appender.RFA.MaxBackupIndex* is omitted. It causes endless generation of log files. |
| 34 | + |
| 35 | +## Resolution |
| 36 | + |
| 37 | +1. Navigate to Hive component summary on the Ambari portal and click on `Configs` tab. |
| 38 | + |
| 39 | +2. Go to the `Advanced hive-log4j` section within Advanced settings. |
| 40 | + |
| 41 | +3. Set `log4j.appender.RFA` parameter as RollingFileAppender. |
| 42 | + |
| 43 | +4. Set `log4j.appender.RFA.MaxFileSize` and `log4j.appender.RFA.MaxBackupIndex` as follows. |
| 44 | + |
| 45 | +``` |
| 46 | +log4jhive.log.maxfilesize=1024MB |
| 47 | +log4jhive.log.maxbackupindex=10 |
| 48 | +
|
| 49 | +log4j.appender.RFA=org.apache.log4j.RollingFileAppender |
| 50 | +log4j.appender.RFA.File=${hive.log.dir}/${hive.log.file} |
| 51 | +log4j.appender.RFA.MaxFileSize=${log4jhive.log.maxfilesize} |
| 52 | +log4j.appender.RFA.MaxBackupIndex=${log4jhive.log.maxbackupindex} |
| 53 | +log4j.appender.RFA.layout=org.apache.log4j.PatternLayout |
| 54 | +log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2}: %m%n |
| 55 | +``` |
| 56 | +5. Set `hive.root.logger` to `INFO,RFA` as follows. The default setting is DEBUG, which makes logs become very large. |
| 57 | + |
| 58 | +``` |
| 59 | +# Define some default values that can be overridden by system properties |
| 60 | +hive.log.threshold=ALL |
| 61 | +hive.root.logger=INFO,RFA |
| 62 | +hive.log.dir=${java.io.tmpdir}/${user.name} |
| 63 | +hive.log.file=hive.log |
| 64 | +``` |
| 65 | + |
| 66 | +6. Save the configs and restart the required components. |
| 67 | + |
| 68 | +## Next steps |
| 69 | + |
| 70 | +If you didn't see your problem or are unable to solve your issue, visit one of the following channels for more support: |
| 71 | + |
| 72 | +* Get answers from Azure experts through [Azure Community Support](https://azure.microsoft.com/support/community/). |
| 73 | + |
| 74 | +* Connect with [@AzureSupport](https://twitter.com/azuresupport) - the official Microsoft Azure account for improving customer experience by connecting the Azure community to the right resources: answers, support, and experts. |
| 75 | + |
| 76 | +* If you need more help, you can submit a support request from the [Azure portal](https://portal.azure.com/?#blade/Microsoft_Azure_Support/HelpAndSupportBlade/). Select **Support** from the menu bar or open the **Help + support** hub. For more detailed information, please review [How to create an Azure support request](https://docs.microsoft.com/azure/azure-portal/supportability/how-to-create-azure-support-request). Access to Subscription Management and billing support is included with your Microsoft Azure subscription, and Technical Support is provided through one of the [Azure Support Plans](https://azure.microsoft.com/support/plans/). |
0 commit comments