Flink 任务提交失败 Could not deploy Yarn job cluster

 1.Flink提价任务,读取Hbase数据和hdfs数据,需要单独倒入一些hbase的依赖jar,所以加入了maven依赖,本地能正常测试运行,但是发布到yarn上运行报错,所以测试读取hdfs文件的时候,去掉依赖就可以了。

2.加入打包依赖的时候,注意加入过滤不需要的文件,不然会报错。

org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Could not deploy Yarn job cluster.
        at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:302)
        at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:198)
        at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:149)
        at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:699)
        at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:232)
        at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:916)
        at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:992)
        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:1836)
        at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
        at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:992)
Caused by: org.apache.flink.client.deployment.ClusterDeploymentException: Could not deploy Yarn job cluster.
        at org.apache.flink.yarn.YarnClusterDescriptor.deployJobCluster(YarnClusterDescriptor.java:431)
        at org.apache.flink.client.deployment.executors.AbstractJobClusterExecutor.execute(AbstractJobClusterExecutor.java:70)
        at org.apache.flink.api.java.ExecutionEnvironment.executeAsync(ExecutionEnvironment.java:973)
        at org.apache.flink.client.program.ContextEnvironment.executeAsync(ContextEnvironment.java:124)
        at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:72)
        at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:873)
        at org.apache.flink.api.java.DataSet.collect(DataSet.java:413)
        at org.apache.flink.api.java.DataSet.print(DataSet.java:1652)
        at baron.nd.hbase.BatchJob.main(BatchJob.java:54)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:288)
        ... 11 more
Caused by: org.apache.flink.yarn.YarnClusterDescriptor$YarnDeploymentException: The YARN application unexpectedly switched to state FAILED during deployment.
Diagnostics from YARN: Application application_1599536567016_0048 failed 2 times in previous 10000 milliseconds (global limit =8; local limit is =2) due to AM Container for appattempt_1599536567016_0048_000002 exited with  exitCode: 1
Failing this attempt.Diagnostics: [2020-09-08 14:20:17.163]Exception from container-launch.
Container id: container_e18_1599536567016_0048_02_000001
Exit code: 1

[2020-09-08 14:20:17.164]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :

[2020-09-08 14:20:17.164]Container exited with a non-zero exit code 1. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :

For more detailed output, check the application tracking page: http://node-1:8188/applicationhistory/app/application_1599536567016_0048 Then click on links to logs of each attempt.
. Failing the application.
If log aggregation is enabled on your cluster, use this command to further investigate the issue:
yarn logs -applicationId application_1599536567016_0048
        at org.apache.flink.yarn.YarnClusterDescriptor.startAppMaster(YarnClusterDescriptor.java:1021)
        at org.apache.flink.yarn.YarnClusterDescriptor.deployInternal(YarnClusterDescriptor.java:524)
        at org.apache.flink.yarn.YarnClusterDescriptor.deployJobCluster(YarnClusterDescriptor.java:424)

打包的依赖,


          maven-compiler-plugin
          3.6.0
          
            1.8
            1.8
          
        
        
        
          org.apache.maven.plugins
          maven-shade-plugin
          3.1.1
          

            
              
                *:*
                
                   
                  META-INF/*.SF
                  META-INF/*.DSA

                
              
            

            
              
                reference.conf
              
            
          
          
            
              package
              
                shade
              
            
          
        

 

你可能感兴趣的:(Flink)