【问题标题】:flink job submission org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find Flink jobflink作业提交org.apache.flink.runtime.messages.FlinkJobNotFoundException:找不到Flink作业
【发布时间】:2020-03-19 13:33:06
【问题描述】:

得到以下flink作业提交错误,

@centos1 flink-1.10.0]$ ./bin/flink run -m 10.0.2.4:8081 ./examples/batch/WordCount.jar --input file:///storage/flink-1.10.0/test.txt --output file:///storage/flink-1.10.0/wordcount_out
Job has been submitted with JobID 33d489aee848401e08c425b053c854f9

------------------------------------------------------------
 The program finished with the following exception:

org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: org.apache.flink.runtime.rest.util.RestClientException: [org.apache.flink.runtime.rest.handler.RestHandlerException: org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find Flink job (33d489aee848401e08c425b053c854f9)

....

    Caused by: java.util.concurrent.CompletionException: org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find Flink job (33d489aee848401e08c425b053c854f9)
Caused by: org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find Flink job (33d489aee848401e08c425b053c854f9)
        at org.apache.flink.runtime.dispatcher.Dispatcher.getJobMasterGatewayFuture(Dispatcher.java:776)
        at org.apache.flink.runtime.dispatcher.Dispatcher.requestJobStatus(Dispatcher.java:505)
        ... 27 more
]

来自任务管理器节点的日志:说找不到文件.. 是在 flink 集群设置中指向文件的正确方法。

2020-03-19 13:15:29,843 ERROR org.apache.flink.runtime.operators.BatchTask                  - Error in task code:  CHAIN DataSource (at main(WordCount.java:69) (org.apache.flink.api.java.io.TextInputFormat)) -> FlatMap (FlatMap at main(WordCount.java:84)) -> Combine (SUM(1), at main(WordCount.java:87) (1/2)
java.io.IOException: Error opening the Input Split file:/storage/flink-1.10.0/test.txt [0,19]: /storage/flink-1.10.0/test.txt (No such file or directory)
        at org.apache.flink.api.common.io.FileInputFormat.open(FileInputFormat.java:824)
        at org.apache.flink.api.common.io.DelimitedInputFormat.open(DelimitedInputFormat.java:470)

上面的错误如何排查,检查什么,flink日志中线索很少

【问题讨论】:

  • 这个文件file:/storage/flink-1.10.0/test.txt可以从TaskManager访问吗?
  • 假设它是您在某个时候已经上传的有效 Flink 作业,并且该文件正是您在 shell 命令中指定的位置,我再次建议查看您的 flink 集群的所有实例有足够的磁盘空间。
  • @TillRohrmann file:/storage/flink-1.10.0/test.txt 只能在 Jobmanager 节点中访问。
  • 那么问题是任务管理器试图读取一个不可访问的文件。请将文件存储在所有TaskManager 节点都可以访问的地方。
  • 不,它不会这样做。

标签: apache-flink flink-streaming


【解决方案1】:

发生这种情况的原因是因为您正在跨分布式集群提交作业,而您指定的位置可能只能由 Job manager 或您提交作业的机器访问。但是,实际的程序和作业执行发生在Task Manager。更好的方法是指定一个所有节点都可以访问的位置,可以是 HDFS 或 NFS。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多