Konstantin Knauf created FLINK-22066:
----------------------------------------

             Summary: Improve Error Message on unknown Ingress Type
                 Key: FLINK-22066
                 URL: https://issues.apache.org/jira/browse/FLINK-22066
             Project: Flink
          Issue Type: Improvement
          Components: Stateful Functions
            Reporter: Konstantin Knauf


When using an unknown ingress type the following exception is thrown on 
startup: 
```
2021-03-31 09:45:48,417 ERROR 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint        [] - Could not 
start cluster entrypoint StatefulFunctionsClusterEntryPoint.
org.apache.flink.runtime.entrypoint.ClusterEntrypointException: Failed to 
initialize the cluster entrypoint StatefulFunctionsClusterEntryPoint.
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:200)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:569)
 [flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.statefun.flink.launcher.StatefulFunctionsClusterEntryPoint.main(StatefulFunctionsClusterEntryPoint.java:99)
 [statefun-flink-distribution.jar:3.0.0]
Caused by: org.apache.flink.util.FlinkException: Could not create the 
DispatcherResourceManagerComponent.
        at 
org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:275)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:234)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:178)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:175)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        ... 2 more
Caused by: org.apache.flink.util.FlinkRuntimeException: Could not retrieve the 
JobGraph.
        at 
org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:58)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.dispatcher.runner.DefaultDispatcherRunnerFactory.createDispatcherRunner(DefaultDispatcherRunnerFactory.java:54)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:212)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:234)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:178)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:175)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        ... 2 more
Caused by: org.apache.flink.util.FlinkException: Could not create the JobGraph 
from the provided user code jar.
        at 
org.apache.flink.statefun.flink.launcher.StatefulFunctionsJobGraphRetriever.retrieveJobGraph(StatefulFunctionsJobGraphRetriever.java:107)
 ~[statefun-flink-distribution.jar:3.0.0]
        at 
org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:55)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.dispatcher.runner.DefaultDispatcherRunnerFactory.createDispatcherRunner(DefaultDispatcherRunnerFactory.java:54)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:212)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:234)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:178)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:175)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        ... 2 more
Caused by: org.apache.flink.client.program.ProgramInvocationException: The main 
method caused an error: There are no routers defined.
        at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:360)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:213)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.client.program.PackagedProgramUtils.getPipelineFromProgram(PackagedProgramUtils.java:158)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:82)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.statefun.flink.launcher.StatefulFunctionsJobGraphRetriever.retrieveJobGraph(StatefulFunctionsJobGraphRetriever.java:101)
 ~[statefun-flink-distribution.jar:3.0.0]
        at 
org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:55)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.dispatcher.runner.DefaultDispatcherRunnerFactory.createDispatcherRunner(DefaultDispatcherRunnerFactory.java:54)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:212)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:234)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:178)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:175)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        ... 2 more
Caused by: java.lang.IllegalStateException: There are no routers defined.
        at 
org.apache.flink.statefun.flink.core.StatefulFunctionsUniverseValidator.validate(StatefulFunctionsUniverseValidator.java:31)
 ~[statefun-flink-core.jar:3.0.0]
        at 
org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:76)
 ~[statefun-flink-core.jar:3.0.0]
        at 
org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:52)
 ~[statefun-flink-core.jar:3.0.0]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
Source) ~[?:?]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
        at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:343)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:213)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.client.program.PackagedProgramUtils.getPipelineFromProgram(PackagedProgramUtils.java:158)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:82)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.statefun.flink.launcher.StatefulFunctionsJobGraphRetriever.retrieveJobGraph(StatefulFunctionsJobGraphRetriever.java:101)
 ~[statefun-flink-distribution.jar:3.0.0]
        at 
org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:55)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.dispatcher.runner.DefaultDispatcherRunnerFactory.createDispatcherRunner(DefaultDispatcherRunnerFactory.java:54)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:212)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:234)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:178)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
        at 
org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:175)
 ~[flink-dist_2.12-1.12.1.jar:1.12.1]
```

The reported root cause "Caused by: java.lang.IllegalStateException: There are 
no routers defined." hides the actual problem.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to