Big Data 4 min read

How to View Hadoop/YARN Application Logs via History Server and Yarn Commands

This guide explains how to retrieve Hadoop/YARN application logs using the History Server UI, Yarn command‑line tools, and direct HDFS log access, including commands for listing applications, fetching specific logs, and locating the remote log directory.

Big Data Technology & Architecture
Big Data Technology & Architecture
Big Data Technology & Architecture
How to View Hadoop/YARN Application Logs via History Server and Yarn Commands

To inspect Hadoop/YARN application logs you can use the History Server UI, which shows completed jobs unless the task exited abnormally.

Alternatively, use Yarn command‑line tools. The command yarn application -list -appStates ALL lists all applications with details such as Application‑Id, User, State, and Tracking URL.

To fetch logs for a specific application, run yarn logs -applicationId application_1500702983136_0002. The output includes stderr, stdout, and syslog sections with timestamps and log contents.

For direct HDFS log access, first check the configuration in

<property>
    <name>yarn.nodemanager.remote-app-log-dir</name>
    <value>/app-logs</value>
</property>

within yarn-site.xml to locate the remote log directory (e.g., /app-logs). Then list files with hdfs dfs -ls /app-logs/hdfs/logs and view specific logs using the same yarn logs -applicationId ... command.

These steps help troubleshoot Hadoop jobs by retrieving execution logs from the History Server, Yarn CLI, or directly from HDFS.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLIBig Datalog analysisYARNHDFSHadoop
Big Data Technology & Architecture
Written by

Big Data Technology & Architecture

Wang Zhiwu, a big data expert, dedicated to sharing big data technology.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.