yarn 导出日志报错Exception in thread “main“ org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException

303 阅读1分钟

目录

一、报错

二、错误命令

三、正确命令

四、补充


一、报错

Exception in thread "main" org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException: The entity for application application_1594112477060_13133 doesn't exist in the timeline store

二、错误命令

yarn logs -applicationId application_1594112477060_13513 > /tmp/example.log

报错原因:没有指定 container 的 ID,因此正确命令为:

三、正确命令

yarn logs -applicationId application_1594112477060_13513 -containerId container_e19_1594112477060_13133_01_666666 > /tmp/example.log

四、补充

如果日志太大怎么办?

日志太大的后果是占用太多服务器空间,导致磁盘空间不足,因此可以只导出你需要的部分,比如使用 grep 加上日期的限制,则上述命令的进阶版为:

yarn logs -applicationId application_1594112477060_13133 -containerId container_e19_1594112477060_13133_01_000001 | grep 3U8391_2020-12-11>> /tmp/cancel.log

以上,问题解决~