Apache flink flink作业提交org.apache.flink.runtime.messages.FlinkJobNotFoundException:找不到flink作业

Apache flink flink作业提交org.apache.flink.runtime.messages.FlinkJobNotFoundException:找不到flink作业,apache-flink,flink-streaming,Apache Flink,Flink Streaming,获取以下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 33d489aee84840

获取以下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)

来自taskmanger节点的日志:表示未找到文件。。是在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日志中很少有线索发生这种情况的原因是因为您在分布式集群中提交作业,并且您指定的位置可能只能由作业管理器或提交作业的机器访问。但是,实际的程序和作业执行在任务管理器中进行。更好的方法是指定一个所有节点都可以访问的位置,可以是HDFS或NFS

此文件是否可以从任务管理器中访问
文件:/storage/flink-1.10.0/test.txt
,我再次建议您检查flink群集的所有实例是否都有足够的磁盘空间。@TillRohrmann file:/storage/flink-1.10.0/test.txt只能在Jobmanager节点中访问。问题是TaskManager试图读取一个不可访问的文件。请将文件存储在可从所有
TaskManager
节点访问的位置。不,它不会这样做。
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)