Flink10 Per-JOB Could not build the program from JAR file.

【问题描述】:

   Could not build the program from JAR file.
   Use the help option (-h or --help) to get help on the command.

【产生原因】:之前 per-job启动的时候,它们都用 flink1.8 所以使用了如下命令:

[root@hadoop1 flink-1.10.1]# bin/flink run -m yarn-cluster -yn 2 -d ./examples/streaming/WordCount.jar 

【问题解决】:查看日志 cat flink-root-client-hadoop1.log 发现如下错误

org.apache.flink.client.cli.CliArgsException: Could not build the program from JAR file.
	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:200)
	at org.apache.flink.client.cli.CliFrontend.parseParameters(CliFrontend.java:893)
	at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:966)
	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:1754)
	at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:966)
Caused by: java.io.FileNotFoundException: JAR file does not exist: -yn
	at org.apache.flink.client.cli.CliFrontend.getJarFile(CliFrontend.java:717)
	at org.apache.flink.client.cli.CliFrontend.buildProgram(CliFrontend.java:693)
	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:197)
	... 7 more

我就将 -yn(yarncontainer 表示 TaskManager 的个数) 去掉使用默认的TaskManager个数。就能够正常启动:

[root@hadoop1 flink-1.10.1]# bin/flink run -m yarn-cluster -d ./examples/streaming/WordCount.jar 

你可能感兴趣的:(问题排查,hadoop,flink,大数据)