flink提交到yarn报错:Stack trace: ExitCodeException exitCode=3

2018-03-27 03:42:43,792 INFO org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl: Application application_1522121766020_0001 failed 2 times due to AM Container for appattempt_1522121766020_0001_000002 exited with  exitCode: 31
For more detailed output, check application tracking page:http://xxxxxxx:8088/cluster/app/application_1522121766020_0001Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1522121766020_0001_02_000001
Exit code: 31
Stack trace: ExitCodeException exitCode=31: 
    at org.apache.hadoop.util.Shell.runCommand(Shell.java:585)
    at org.apache.hadoop.util.Shell.run(Shell.java:482)
    at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:776)
    at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:212)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
    at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)


Container exited with a non-zero exit code 31
Failing this attempt. Failing the application.

flink程序提交到yarn的时候,遇到以上问题,因为flink只是把yarn当做一个平台,而启动失败,所以yarn中没找到错误日志。
排错:yarn logs -applicationId application_1522121766020_0001
通过该命令查看详细日志:

2018-03-27 03:42:39,373 ERROR org.apache.flink.yarn.YarnApplicationMasterRunner             - YARN Application Master initialization failed
java.io.IOException: Could not create storage directory for BLOB store in '/disk/flink/tmp'.
    at org.apache.flink.runtime.blob.BlobUtils.initStorageDirectory(BlobUtils.java:161)

问题解决。这里主要要记住yarn的application查看日志的方法。

你可能感兴趣的:(Flink,Hadoop)