Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-15856 Various Kubernetes command client improvements
  3. FLINK-17078

Logging output is misleading when executing bin/flink -e kubernetes-session without specifying cluster-id

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      When executing the following command:

      ./bin/flink run -d -e kubernetes-session examples/streaming/SocketWindowWordCount.jar --hostname 172.16.0.6 --port 12345
      

      The exception stack would be:

      org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: org.apache.flink.client.deployment.ClusterRetrieveException: Could not get the rest endpoint of flink-cluster-6fa5f5dc-4b50-48c3-b57f-d91e686fa474
      at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:335)
      at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:205)
      at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:148)
      at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:662)
      at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:210)
      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 org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30)
      at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:966)
      Caused by: java.lang.RuntimeException: org.apache.flink.client.deployment.ClusterRetrieveException: Could not get the rest endpoint of flink-cluster-6fa5f5dc-4b50-48c3-b57f-d91e686fa474
      at org.apache.flink.kubernetes.KubernetesClusterDescriptor.lambda$createClusterClientProvider$0(KubernetesClusterDescriptor.java:94)
      at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:118)
      at org.apache.flink.kubernetes.KubernetesClusterDescriptor.retrieve(KubernetesClusterDescriptor.java:59)
      at org.apache.flink.client.deployment.executors.AbstractSessionClusterExecutor.execute(AbstractSessionClusterExecutor.java:63)
      at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.executeAsync(StreamExecutionEnvironment.java:1756)
      at org.apache.flink.client.program.StreamContextEnvironment.executeAsync(StreamContextEnvironment.java:106)
      at org.apache.flink.client.program.StreamContextEnvironment.execute(StreamContextEnvironment.java:72)
      at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.execute(StreamExecutionEnvironment.java:1643)
      at org.apache.flink.streaming.examples.socket.SocketWindowWordCount.main(SocketWindowWordCount.java:92)
      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:321)
      ... 8 more
      Caused by: org.apache.flink.client.deployment.ClusterRetrieveException: Could not get the rest endpoint of flink-cluster-6fa5f5dc-4b50-48c3-b57f-d91e686fa474
      ... 22 more

      The logging output is misleading, we'd better throw an exception indicating that people should explicitly specify the value of kubernetes.cluster-id.

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            felixzheng Canbin Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: