Spark 提交 Yarn-Cluster作业一直处于ACCEPTED状态,直到failed

783 阅读2分钟
22/05/07 16:10:12 INFO yarn.Client: Application report for application_1651770010166_0003 (state: ACCEPTED)
22/05/07 16:10:13 INFO yarn.Client: Application report for application_1651770010166_0003 (state: ACCEPTED)
22/05/07 16:10:14 INFO yarn.Client: Application report for application_1651770010166_0003 (state: FAILED)
22/05/07 16:10:14 INFO yarn.Client: 
	 client token: N/A
	 diagnostics: Application application_1651770010166_0003 failed 2 times due to AM Container for appattempt_1651770010166_0003_000002 exited with  exitCode: 13
For more detailed output, check application tracking page:http://bigdata:8088/proxy/application_1651770010166_0003/Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1651770010166_0003_02_000001
Exit code: 13
Stack trace: ExitCodeException exitCode=13: 
	at org.apache.hadoop.util.Shell.runCommand(Shell.java:604)
	at org.apache.hadoop.util.Shell.run(Shell.java:507)
	at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:789)
	at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:213)
	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 13
Failing this attempt. Failing the application.
	 ApplicationMaster host: N/A
	 ApplicationMaster RPC port: -1
	 queue: spark
	 start time: 1651910949204
	 final status: FAILED
	 tracking URL: http://bigdata:8088/cluster/app/application_1651770010166_0003
	 user: hadoop
22/05/07 16:10:14 ERROR yarn.Client: Application diagnostics message: Application application_1651770010166_0003 failed 2 times due to AM Container for appattempt_1651770010166_0003_000002 exited with  exitCode: 13
For more detailed output, check application tracking page:http://bigdata:8088/proxy/application_1651770010166_0003/Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1651770010166_0003_02_000001
Exit code: 13
Stack trace: ExitCodeException exitCode=13: 
	at org.apache.hadoop.util.Shell.runCommand(Shell.java:604)
	at org.apache.hadoop.util.Shell.run(Shell.java:507)
	at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:789)
	at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:213)
	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)

检查代码配置文件中是否指定了setMaster("local[*]")·

在scala程序中把setMaster("local[*]")去掉,因为它会覆盖命令行中的yarn模式而以本地模式执行,导致一直等待.