Hi Ammu, The SQL Gateway enables clients to specify which cluster to submit jobs to. Here’s my understanding of the workflow:
1. The SQL client reads the configuration files (flink-conf.yaml or config.yaml) located in $FLINK_HOME/conf. The default configuration typically includes the rest.address setting, defining the target cluster’s REST endpoint. 2. The client uses this local configuration to establish a session with the SQL Gateway. This session instructs the Gateway to submit jobs to the cluster specified by rest.address (e.g., localhost if no override is provided). Could you confirm whether the image or distribution bundle you’re using includes the configuration files (e.g., flink-conf.yaml) with the rest.address setting defined? Importantly, since the SQL Gateway supports Application Mode deployment, its cluster binding is not static—the target cluster is instead determined dynamically based on runtime configuration. This design allows flexibility, enabling the Gateway to target different clusters without hardcoding dependencies. Best, Shengkai Ammu P <ammup...@gmail.com> 于2025年3月12日周三 21:27写道: > Hi Shengkai, > > Thanks for responding. It works after setting rest.address. Now the docker > file looks like below: > > services: > sql-gateway: > image: flink-1.20 > ports: > - "8083:8083" > command: sql-gateway.sh start-foreground > -Dsql-gateway.endpoint.rest.address=localhost > depends_on: > - jobmanager > environment: > FLINK_PROPERTIES: | > jobmanager.rpc.address: jobmanager > rest.address: jobmanager > > However I just noticed that, with this gateway configuration I am able to > submit a job through cURL command without having to set any additional > properties. But with the same configuration when I try to submit a job > through SQL Client I am getting connection error. So now I updated the SQL > Client initialisation script to explicitly pass the `rest.address` variable > as below: > > flink/bin/sql-client.sh gateway --endpoint localhost:8083 > -Drest.address=jobmanager --file TestDeployment > > This is submitting the job successfully. I guess the SQL client in gateway > mode is consuming the job manager address available in SQL Client > configuration irrespective of the gateway configuration. Could you please > confirm if this is the expected behaviour? > > My understanding is that if we are submitting a job through the SQL > gateway it should consume the configuration for jobmanager related > information from the gateway rather than the SQL Client configuration. WDYT > ? Please feel free to correct me if I am wrong. > > Regards, > Ammu > >