报错内容

flink执行jar时,报如下错误:

org.apache.flink.client.program.ProgramInvocationException: Job failed. (JobID: b67d4b36791bb6d1be532323b4f77162)
at org.apache.flink.client.program.rest.RestClusterClient.submitJob(RestClusterClient.java:268)
at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:486)
at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:474)
at org.apache.flink.client.program.ContextEnvironment.execute(ContextEnvironment.java:62)
at org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:816)
at org.apache.flink.api.java.DataSet.collect(DataSet.java:413)
at org.apache.flink.api.java.DataSet.print(DataSet.java:1652)
at org.apache.flink.examples.java.wordcount.WordCount.main(WordCount.java:88)
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:529)
at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)
at org.apache.flink.client.program.ClusterClient.run(ClusterClient.java:426)
at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:816)
at org.apache.flink.client.cli.CliFrontend.runProgram(CliFrontend.java:290)
at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:216)
at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:1053)
at org.apache.flink.client.cli.CliFrontend.lambda$main$11(CliFrontend.java:1129)
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.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1129)
Caused by: org.apache.flink.runtime.client.JobExecutionException: Job execution failed.
at org.apache.flink.runtime.jobmaster.JobResult.toJobExecutionResult(JobResult.java:146)
at org.apache.flink.client.program.rest.RestClusterClient.submitJob(RestClusterClient.java:265)
... 24 more
Caused by: java.io.IOException: Error opening the Input Split file:/opt/module/logs/student.txt [0,144]: /opt/module/logs/student.txt (没有那个文件或目录)
at org.apache.flink.api.common.io.FileInputFormat.open(FileInputFormat.java:824)
at org.apache.flink.api.common.io.DelimitedInputFormat.open(DelimitedInputFormat.java:470)
at org.apache.flink.api.common.io.DelimitedInputFormat.open(DelimitedInputFormat.java:47)
at org.apache.flink.runtime.operators.DataSourceTask.invoke(DataSourceTask.java:170)
at org.apache.flink.runtime.taskmanager.Task.run(Task.java:711)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.FileNotFoundException: /opt/module/logs/student.txt (没有那个文件或目录)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.apache.flink.core.fs.local.LocalDataInputStream.<init>(LocalDataInputStream.java:50)
at org.apache.flink.core.fs.local.LocalFileSystem.open(LocalFileSystem.java:142)
at org.apache.flink.api.common.io.FileInputFormat$InputSplitOpenThread.run(FileInputFormat.java:996)

问题原因

  1. 输入路径确实不存在该文件;
  2. 输入路径的文件并不在flink集群的TaskManager上,而放在了JobManager节点上了。

解决方式

  1. 对于不存在的文件,修改为有该文件的路径;
  2. 如果flink输入文件的是本地文件,则需要将该文件放在TaskManager节点上(即slaves节点);

【Flink】flink执行jar报错:java.io.IOException: Error opening the Input Split file 或者 java.io.FileNotFoundException的更多相关文章

  1. 启动SpringBoot的可执行jar 报错:target\spring-boot-hello-1.0-SNAPSHOT.jar中没有主清单属性

    打包成功,但是在执行时报错,没有主清单属性 解决: 增加红框内的依赖: <build> <plugins> <plugin> <groupId>org. ...

  2. vue.js报错:Module build failed: Error: No parser and no file path given, couldn't infer a parser.

    ERROR Failed to compile with 2 errors 12:00:33 error in ./src/App.vue Module build failed: Error: No ...

  3. selenium执行js报错

    selenium执行js报错 Traceback (most recent call last):    dr.execute_script(js)  File "C:\Python27\l ...

  4. idea执行mapreduce报错 Could not locate Hadoop executable: C:\hadoop-3.1.1\bin\winutils.exe

    window执行mapreduce报错 Exception in thread "main" java.lang.RuntimeException: java.io.FileNot ...

  5. 执行spark-shell报错:

    执行spark-shell报错: [ERROR] Terminal initialization failed; falling back to unsupportedjava.lang.NoClas ...

  6. 使用jstl报错:Can not find the tag library descriptor for “http://java.sun.com/jstl/core”

    使用jstl报错:Can not find the tag library descriptor for “http://java.sun.com/jstl/core” 出现这个错误的原因是项目中没有 ...

  7. HQL语句中数据类型转换,及hibernate中createQuery执行hql报错

    一.HQL语句中数据类型转换: 我们需要从数据库中取出序号最大的记录,想到的方法就是使用order by子句进行排序(desc倒序),然后取出第一个对象,可是当初设计数据库时(我们是在原来的数据库的基 ...

  8. 执行mysqld_safe报错:mysqld does not exist or is not executable

    执行mysqld_safe报错: [root@edu data]# /usr/local/mysql5.7/bin/mysqld_safe --user=mysql160427 12:41:28 my ...

  9. 数据库执行sql报错Got a packet bigger than 'max_allowed_packet' bytes及重启mysql

    准备在mysql上使用数据库A,但mysql5经过重装后,上面的数据库已丢失,只得通过之前备份的A.sql重新生成数据库A. 1.执行sql报错 在执行A.sql的过程中,出现如下错误:Got a p ...

随机推荐

  1. python_列表方法

    1.在列表后面追加元素 user = [] while True: name = input("输入名字:") # 在列表后面追加元素 user.append(name) prin ...

  2. [唐胡璐]Selenium技巧- IE浏览器Zoom和Protected Model Setting

    Selenium Webdriver在IE下跑脚本的时候要保证页面大小为100%,且要在IE internet options, selectSecurity tab and uncheck “Ena ...

  3. Spark任务调度初识

    前置知识 spark任务模型 job:action的调用,触发了DAG的提交和整个job的执行. stage:stage是由是否shuffle来划分,如果发生shuffle,则分为2个stage. t ...

  4. MyBatis执行原理图

    作者:W&L 推荐: 陶邦仁的博客 (1)加载配置并初始化       触发条件:加载配置文件 配置来源于两个地方,一处是配置文件,一处是Java代码的注解,将SQL的配置信息加载成为一个个M ...

  5. Qt中PushButton的pressed,released,clicked三种响应的区别

    Qt的PushButton的常用的三种响应有pressed,released和clicked. 优先级:pressed>released>clicked 按下按钮pressed函数的内容, ...

  6. Luogu P5018 对称二叉树 瞎搞树&哈希

    我的天..普及组这么$hard$... 然后好像没有人用我的垃圾做法,,,好像是$O(n)$,但十分的慢,并且极其暴力$qwq$ 具体来说,就是直接$dfs$求出树高,然后想像出把原来的树补成满二叉树 ...

  7. struts2 404错误

    action类必须放在xxxx.xxx.xxx.xxx.action  包下才可以.

  8. 小米 oj 纯位数

     纯位数 序号:#101难度:非常难时间限制:2000ms内存限制:20M 描述 在数学中,所谓"纯位数"是指由相同位元重复而组成的自然数.比如在十进制中,1,22,333,555 ...

  9. [Luogu] 飞扬的小鸟

    https://www.luogu.org/problemnew/show/P1941 Bfs or Dp #include <bits/stdc++.h> using namespace ...

  10. CodeForces 631D Messenger —— (kmp的应用)

    这题是一个kmp的应用,思路是有,但是代码实现能力太弱,细节考虑不全,敲了很长时间才AC.. 题意:字符串用如下的方法表示,例如aaabbbbcc表示为3-a,4-b,2-c.那么问t串在s串中出现了 ...