flink在hadoop yarn运行出错,报相应的jar找不到(self4j)

在flink目录执行./bin/yarn-session.sh -n 2 -s 2 -jm 1024 -tm 1024时,启动的时候报2018-12-16 16:01:42,879 ERROR org.apache.flink.yarn.cli.FlinkYarnSessionCli - Error while running the Flink Yarn session.
org.apache.flink.client.deployment.ClusterDeploymentException: Couldn't deploy Yarn session cluster
at org.apache.flink.yarn.AbstractYarnClusterDescriptor.deploySessionCluster(AbstractYarnClusterDescriptor.java:423)
at org.apache.flink.yarn.cli.FlinkYarnSessionCli.run(FlinkYarnSessionCli.java:607)
at org.apache.flink.yarn.cli.FlinkYarnSessionCli.lambda$main$2(FlinkYarnSessionCli.java:810)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1692)
at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
at org.apache.flink.yarn.cli.FlinkYarnSessionCli.main(FlinkYarnSessionCli.java:810)
Caused by: org.apache.flink.yarn.AbstractYarnClusterDescriptor$YarnDeploymentException: The YARN application unexpectedly switched to state FAILED during deployment.
Diagnostics from YARN: Application application_1544946711234_0002 failed 1 times due to AM Container for appattempt_1544946711234_0002_000001 exited with exitCode: -1000
For more detailed output, check application tracking page:http://master:8088/proxy/application_1544946711234_0002/Then, click on links to logs of each attempt.
Diagnostics: File file:/root/.flink/application_1544946711234_0002/lib/slf4j-log4j12-1.7.15.jar does not exist
java.io.FileNotFoundException: File file:/root/.flink/application_1544946711234_0002/lib/slf4j-log4j12-1.7.15.jar does not exist
at org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:534)

2个回答

在/root/.flink/ 下没有任务东西; 图片说明
//

经排查是没有export hadoop的环境变量,只是添加了变量;export后就好了;

我的环境变量是在~/.bash_profile下添加的,Yarn都能启动,HDFS也能启动,但是启动Flink执行任务到Yarn上就会找不到这个文件,我自己跟着路径去找发现有存在,实在搞不懂什么问题了,求教究竟如何解决的这个问题

sinat_35150976
Wayne的csdn 我也这样。。。
21 天之前 回复
ASN_forever
ASN_forever 回复戮默。: 请问解决了么?我的环境变量中有Hadoophome,还是报这个错
3 个月之前 回复
qq_28286027
曾牛 我修改了变量也是这样,真搞不懂怎么回事
4 个月之前 回复
jpdcxz
jpdcxz 回复rick_zyl: 你好解决这个问题了吗
6 个月之前 回复
rick_zyl
rick_zyl 回复huangdindin: 我也遇到这个问题。老铁你怎么解决的啊?
6 个月之前 回复
huangdindin
huangdindin 你好,现在你解决了么?我现在也是遇到了这个问题,怎么解决呀?
9 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问