_AI 2022-01-05 18:51
浏览 88
已结题

Flink1.12.7 Per-Job模式提交示例wordcount 提示/tmp下上传配置文件不存在

环境

集群环境CDH6.2.0
flink配置文件

jobmanager.rpc.address: localhost
jobmanager.rpc.port: 6123
jobmanager.memory.process.size: 4g
taskmanager.memory.process.size: 4g
taskmanager.numberOfTaskSlots: 1
parallelism.default: 1
fs.default-scheme: hdfs://nameservice1/
high-availability: zookeeper
high-availability.storageDir: hdfs://nameservice1/flink/ha/
high-availability.zookeeper.quorum: hdp01.bigdata:2181,hdp04.bigdata:2181,hdp07.bigdata:2181
high-availability.zookeeper.path.root: /flink
state.backend: filesystem
state.checkpoints.dir: hdfs://nameservice1/flink/flink-checkpoints
state.savepoints.dir: hdfs://nameservice1/flink/flink-savepoints
state.backend.incremental: false
jobmanager.execution.failover-strategy: region
rest.port: 50018
rest.bind-port: 50000-50025
web.submit.enable: true
io.tmp.dirs: /opt/flink-1.12.7/flink_io_tmp_dirs
jobmanager.archive.fs.dir: hdfs://nameservice1/flink/completed-jobs/
historyserver.archive.fs.dir: hdfs://nameservice1/flink/completed-jobs/
classloader.check-leaked-classloader: false


运行命令:

./bin/flink run -m yarn-cluster -t yarn-per-job ./examples/batch/WordCount.jar

运行结果及报错内容
2022-01-05 17:34:32,005 ERROR org.apache.flink.client.cli.CliFrontend                      [] - Error while running the command.
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:366) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:219) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_181]
        at javax.security.auth.Subject.doAs(Subject.java:422) [?:1.8.0_181]
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1875) [hadoop-common-3.0.0-cdh6.2.0.jar:?]
        at org.apache.flink.runtime.security.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41) [flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132) [flink-dist_2.12-1.12.7.jar:1.12.7]
Caused by: org.apache.flink.client.deployment.ClusterDeploymentException: Could not deploy Yarn job cluster.
        at org.apache.flink.yarn.YarnClusterDescriptor.deployJobCluster(YarnClusterDescriptor.java:481) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.deployment.executors.AbstractJobClusterExecutor.execute(AbstractJobClusterExecutor.java:81) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.ExecutionEnvironment.executeAsync(ExecutionEnvironment.java:1053) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.program.ContextEnvironment.executeAsync(ContextEnvironment.java:129) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:70) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:942) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.DataSet.collect(DataSet.java:417) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.DataSet.print(DataSet.java:1748) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.examples.java.wordcount.WordCount.main(WordCount.java:96) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:349) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        ... 11 more
Caused by: java.io.FileNotFoundException: File does not exist: /tmp/application_1638770395394_7532-flink-conf.yaml8479877161491347165.tmp
        at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1499) ~[hadoop-hdfs-client-3.0.0-cdh6.2.0.jar:?]
        at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1492) ~[hadoop-hdfs-client-3.0.0-cdh6.2.0.jar:?]
        at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) ~[hadoop-common-3.0.0-cdh6.2.0.jar:?]
        at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1507) ~[hadoop-hdfs-client-3.0.0-cdh6.2.0.jar:?]
        at org.apache.flink.yarn.YarnApplicationFileUploader.registerSingleLocalResource(YarnApplicationFileUploader.java:166) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.yarn.YarnClusterDescriptor.startAppMaster(YarnClusterDescriptor.java:973) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.yarn.YarnClusterDescriptor.deployInternal(YarnClusterDescriptor.java:592) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.yarn.YarnClusterDescriptor.deployJobCluster(YarnClusterDescriptor.java:474) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.deployment.executors.AbstractJobClusterExecutor.execute(AbstractJobClusterExecutor.java:81) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.ExecutionEnvironment.executeAsync(ExecutionEnvironment.java:1053) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.program.ContextEnvironment.executeAsync(ContextEnvironment.java:129) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:70) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:942) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.DataSet.collect(DataSet.java:417) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.api.java.DataSet.print(DataSet.java:1748) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        at org.apache.flink.examples.java.wordcount.WordCount.main(WordCount.java:96) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:349) ~[flink-dist_2.12-1.12.7.jar:1.12.7]
        ... 11 more
  • 写回答

1条回答 默认 最新

  • _AI 2022-01-06 18:08
    关注

    问题出现原因:flink错误的配置参数:fs.default-scheme: hdfs://nameservice1/
    解决办法:注释掉fs.default-scheme配置使其使用默认值(none)
    参数具体说明如下:
    1.官方文档说明:
    The default filesystem scheme, used for paths that do not declare a scheme explicitly. May contain an authority, e.g. host:port in case of an HDFS NameNode.
    2.配置文件中注释:
    The default file system scheme and authority.By default file paths without scheme are interpreted relative to the local root file system 'file:///'. Use this to override the default and interpret relative paths relative to a different file system,for example 'hdfs://mynamenode:12345'

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 1月6日
  • 创建了问题 1月5日

悬赏问题

  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services