Hi Folks, I am trying to run Flink Sql to connect...
# troubleshooting
r
Hi Folks, I am trying to run Flink Sql to connect to my Session cluster running on k8s via K8s operator but somehow i am unable to do so. I have tried quite a few approaches but no luck. Writing this email hoping someone would chime in to fix my problem. Step 1) Set up the Session Cluster on k8s via K8s operator. Here's my yaml file apiVersion: flink.apache.org/v1beta1 kind: FlinkDeployment metadata: name: session-six-deployment-only-example spec: image: flink:1.16 flinkVersion: v1_16 flinkConfiguration: taskmanager.numberOfTaskSlots: "10" rest.server.max-content-length: "1209715200" ( Bold those properties as i think it is required to fix the issue) rest.client.max-content-length: "1209715200" serviceAccount: flink jobManager: resource: memory: "2048m" cpu: 1 taskManager: resource: memory: "2048m" cpu: 1 Step 2) Set up ingress file to access the web ui apiVersion: networking.k8s.io/v1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: k8-cps-dev name: my-docker-app-ingress-2 spec: rules: - host: flink-prod-dns.usb.cloud.bank-dns.com ( Assume i have set up the DNS ) http: paths: - backend: service: name: session-six-deployment-only-example-rest port: number: 8081 path: / pathType: Prefix Now i am able to access the UI via DNS flink-prod-dns.usb.cloud.bank-dns.com Step 3) I download the flink 1.16 bundle and updates its conf/fink-conf.yaml with following properties ( Keeping rest of the properties as it is) jobmanager.bind-host: flink-prod-dns.usb.cloud.bank-dns.com rest.address: flink-prod-dns.usb.cloud.bank-dns.com rest.server.max-content-length: 1209715200 rest.client.max-content-length: 1209715200 Step 4) ./bin/sql-client.sh embedded ( not calling via SQL GATEWAY as it is not supported until the lates version of flink 1.17) ( now any command that i run leads the following error) .
select 1;
WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.apache.flink.api.java.ClosureCleaner (file:/Users/rxahuja/flink-kubernetes-operator/examples/flink-1.16.2/lib/flink-dist-1.16.2.jar) to field java.lang.Class.ANNOTATION WARNING: Please consider reporting this to the maintainers of org.apache.flink.api.java.ClosureCleaner WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [ERROR] Could not execute SQL statement. Reason: org.apache.flink.runtime.rest.util.RestClientException: 413 Request Entity Too Large. Try to raise [rest.client.max-content-length] [ERROR] Could not execute SQL statement. Reason: org.apache.flink.runtime.rest.util.RestClientException: 413 Request Entity Too Large. Try to raise [rest.client.max-content-length] Since error suggests that i shall set the property rest.client.max-content-length. hence i updated my server and clients with rest.client.max-content-length and rest.server.max-conent-length but still getting this issue. i am not able to figure out how to get pass this issue. Thanks
g
Did you try submitting a simple job to it through
flink run ...
? maybe the error message will be more useful there
it is probably some sort of a connectivity problem
r
Hi thanks for replying, i did Log into the Job manager POD and when i run i get flink run .i get this error
Copy code
The program finished with the following exception:

org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Failure executing: GET at: <https://10.43.0.1/api/v1/namespaces/apl-edm-streaming-svcs-l3-dev1/services/session-seven-deployment-only-example-rest>. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. services "session-seven-deployment-only-example-rest" is forbidden: User "system:serviceaccount:apl-edm-streaming-svcs-l3-dev1:flink" cannot get resource "services" in API group "" in the namespace "apl-edm-streaming-svcs-l3-dev1".
	at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372)
	at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222)
	at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:105)
	at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:851)
	at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:245)
	at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1095)
	at org.apache.flink.client.cli.CliFrontend.lambda$mainInternal$9(CliFrontend.java:1189)
	at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
	at org.apache.flink.client.cli.CliFrontend.mainInternal(CliFrontend.java:1189)
	at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1157)
Caused by: org.apache.flink.kubernetes.shaded.io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: <https://10.43.0.1/api/v1/namespaces/apl-edm-streaming-svcs-l3-dev1/services/session-seven-deployment-only-example-rest>. Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked. services "session-seven-deployment-only-example-rest" is forbidden: User "system:serviceaccount:apl-edm-streaming-svcs-l3-dev1:flink" cannot get resource "services" in API group "" in the namespace "apl-edm-streaming-svcs-l3-dev1".
@Bhupendra Yadav Do you have any hints as to why am i getting org.apache.flink.runtime.rest.util.RestClientException: 413 Request Entity Too Large Eventual Consistent after flink run command is working fine perfectly to launch the job
I get this error Even after changing the conf val rest.client.max-content-length, and both for SQL client via gateway or rest commant via gateway.