[ https://issues.apache.org/jira/browse/FLINK-20154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xintong Song updated FLINK-20154: --------------------------------- Fix Version/s: (was: 1.14.0) 1.15.0 > Improve error messages when using CLI with wrong target > ------------------------------------------------------- > > Key: FLINK-20154 > URL: https://issues.apache.org/jira/browse/FLINK-20154 > Project: Flink > Issue Type: Improvement > Components: Command Line Client, Documentation > Affects Versions: 1.11.0, 1.12.0 > Reporter: Till Rohrmann > Priority: Minor > Labels: auto-deprioritized-major, usability > Fix For: 1.15.0 > > > According to the [CLI > documentation|https://ci.apache.org/projects/flink/flink-docs-stable/ops/cli.html#job-submission-examples] > one can use the CLI with the following {{--target}} values: "remote", > "local", "kubernetes-session", "yarn-per-job", "yarn-session", > "yarn-application" and "kubernetes-application". However, when running the > following commands: > {{bin/flink run -t yarn-session -p 1 examples/streaming/WindowJoin.jar}} I > get the following exception: > {code} > org.apache.flink.client.program.ProgramInvocationException: The main method > caused an error: null > at > org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:330) > at > org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:198) > at > org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) > at > org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:743) > at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:242) > at > org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:971) > at > org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1047) > 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.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41) > at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1047) > Caused by: java.lang.IllegalStateException > at > org.apache.flink.util.Preconditions.checkState(Preconditions.java:182) > at > org.apache.flink.client.deployment.executors.AbstractSessionClusterExecutor.execute(AbstractSessionClusterExecutor.java:63) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1917) > at > org.apache.flink.client.program.StreamContextEnvironment.executeAsync(StreamContextEnvironment.java:128) > at > org.apache.flink.client.program.StreamContextEnvironment.execute(StreamContextEnvironment.java:76) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1799) > at > org.apache.flink.streaming.examples.join.WindowJoin.main(WindowJoin.java:86) > 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:316) > ... 11 more > {code} > Similarly when running the command {{bin/flink run -t yarn-application -p 1 > examples/streaming/WindowJoin.jar}} I get the exception: > {code} > org.apache.flink.client.program.ProgramInvocationException: The main method > caused an error: No ExecutorFactory found to execute the application. > at > org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:330) > at > org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:198) > at > org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) > at > org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:743) > at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:242) > at > org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:971) > at > org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1047) > 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.contexts.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41) > at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1047) > Caused by: java.lang.IllegalStateException: No ExecutorFactory found to > execute the application. > at > org.apache.flink.core.execution.DefaultExecutorServiceLoader.getExecutorFactory(DefaultExecutorServiceLoader.java:84) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1908) > at > org.apache.flink.client.program.StreamContextEnvironment.executeAsync(StreamContextEnvironment.java:128) > at > org.apache.flink.client.program.StreamContextEnvironment.execute(StreamContextEnvironment.java:76) > at > org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1799) > at > org.apache.flink.streaming.examples.join.WindowJoin.main(WindowJoin.java:86) > 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:316) > ... 11 more > {code} > Obviously, the CLI is not intended to be started with these targets. I would > suggest to improve the documentation stating which targets are valid and to > improve the error messages when starting the CLI with a not supported target. > cc [~kkl0u], [~aljoscha] -- This message was sent by Atlassian Jira (v8.3.4#803005)