2

I tried with various command and I still do have issues in viewing the yarn logs and here are the steps that I followed to view logs

[root@iop-rm1 /]# yarn application -list

17/04/03 13:15:21 INFO client.RMProxy: Connecting to ResourceManager at iop-rm1.qatc/172.18.0.4:8032

Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED, RUNNING]):1

            Application-Id      Application-Name        Application-Type          User       Queue               State         Final-State         Progress                        Tracking-URL
  application_1491225022815_0002      paxi                 SPARK                 paxata     default              ACCEPTED         UNDEFINED              0%                                 N/A

When I view the yarn logs it displays as

[root@iop-rm1 /]# yarn logs -applicationId application_1491222823231_0001

17/04/03 12:48:57 INFO client.RMProxy: Connecting to ResourceManager at iop-rm1.qatc/172.18.0.4:8032

/tmp/logs/root/logs/application_1491222823231_0001 does not exist.

Log aggregation has not completed or is not enabled.

I also enabled the Log aggregation in the core-site.xml file

<name>yarn.log-aggregation-enable</name>

<value>true</value>

I created the path for logs which does not exist but i am not able to see yarn logs

Is there any possible way of viewing the yarn logs ?

4

2 回答 2

2

您无法查看尚未发布的 YARN 应用程序的汇总FINISHED日志。

从属性描述yarn.log-aggregation-enable

yarn.nodemanager.remote-app-log-dir 日志聚合收集每个容器的日志,并在应用完成后将这些日志移动到配置的目录中。

应用程序完成后,您可以尝试使用相同的命令yarn logs -applicationId <application ID>查看日志。

要在作业运行时查看日志RUNNING,请使用 ResourceManger Web 界面。它将在http://ResourceManager_IP_Address:8088/.

PS:您应该在yarn-site.xml.

于 2017-04-03T19:22:45.190 回答
0

也许您忘记重新启动集群以启用日志聚合。

于 2017-04-03T19:24:19.027 回答