Hi everyone, 

I am trying to run a SQL script through SQL Client in gateway mode. The gateway 
is running in a separate container not associated with the Flink cluster. When 
trying to issue a command from SQL Client locally to the gateway resulted in a 
connection error something like : 

WARN  org.apache.flink.client.program.rest.RestClusterClient       [] - Attempt 
to submit job '' to 'http://localhost:8081' has failed.

It seems like it is trying to hit the Flink cluster on localhost from inside 
the gateway instead of using the jobmanager.rpc.address configured in the 
docker compose. I would like to deploy a SQL job to job manager from outside 
the cluster. I couldn’t find any configuration variable other than the 
jobmanager.rpc.address to set this communication properly. 
FYI, This is the docker-compose sample I am using for the gateway :

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

This is the script used for job deployment: 
flink/bin/sql-client.sh gateway --endpoint localhost:8083 --file TestDeployment

Am I missing something? Any help here is appreciated. Many thanks.

Regards.
Ammu

Reply via email to