PostgresCdcSource does not work with google cloud sql postgress

Hi,

I tried to create a PostgresCdcSourceConnector.
The cluster and postgres are in the same gcp region.
The connection error message doesn’t say much to me:

Failed
There were some errors with your configuration:
database.hostname: Error while validating connector config: The connection attempt failed.
database.port: Error while validating connector config: The connection attempt failed.
database.user: Error while validating connector config: The connection attempt failed.
database.password: Error while validating connector config: The connection attempt failed.
database.dbname: Error while validating connector config: The connection attempt failed.
database.server.name: Error while validating connector config: The connection attempt failed.

Cloud details:
Provider GCP
Region europe-west6
Availability Single zone

Connector details:

{
  "name": "PostgresCdcSourceConnector_0",
  "config": {
    "connector.class": "PostgresCdcSource",
    "name": "PostgresCdcSourceConnector_0",
    "kafka.auth.mode": "KAFKA_API_KEY",
    "kafka.api.key": "****************",
    "kafka.api.secret": "****************************************************************",
    "database.hostname": "34.65.35.164",
    "database.port": "5432",
    "database.user": "postgres",
    "database.password": "********",
    "database.dbname": "postgres",
    "database.server.name": "postgres",
    "database.sslmode": "disable",
    "plugin.name": "decoderbufs",
    "output.data.format": "JSON",
    "tasks.max": "1"
  }
}

Anyone who knows, thank you for your help!

hi @VCsaba welcome :slight_smile:

did you see connection attempts on the database side?

ping or telnet possible between kafka and postgres?

best,
michael

Hi,

The problem was this, I didn’t add google iprangs to the cloud sql.
Everything is working now. :slight_smile:

best,
Csaba

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.