Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

DMS couldn't connect to source On-prem postgreSQL

Hi,

I'm trying  to migrate source on-prem postgreSQL to destination cloudSQL.
I'm following the below doc,
https://blog.searce.com/step-by-step-guide-to-migrate-postgresql-to-cloudsql-using-gcp-dms-part-1-of...

I haven't configured pglogical because I wan't DMS to create replication slot automatically similar to AWS DMS. But I have enabled wal-level to logical at source.

I'm getting the below error where DMS is unable to connect to source while submitting the job creation in DMS. can someone help me resolving this.

Failure connecting to the source database. Make sure the connectivity information on the connection profile is correct and the source database is reachable. Address the issues then Start the migration job.
generic::unknown: unable to connect to source database server: failed to connect to on-premises database: connectWithTimeoutAndRetry timeout with error: dial tcp 3.109.60.201:5432: connect: connection timed out

Solved Solved
0 2 3,382
2 ACCEPTED SOLUTIONS

Hi @rajkumarjai1,

Welcome to Google Cloud Community!

You can try the following additional steps to troubleshoot the issue:
  1. Verify that your source database instance is running and has a healthy status. If the instance is not running or has a degraded status, try restarting it.
  2. Check the firewall rules of the VPC hosting the source database instance. Make sure that the firewall rules allow incoming connections on the correct port (5432 by default).
  3. Check the logs of the source database instance to see if there are any error messages that might help you identify the problem.
  4. Check the network connectivity between the machine running the DMS service and the source database instance. Make sure that they are in the same VPC or that there is a properly configured VPC peering connection between them.
  5. If you are using a private IP address to connect to the source database, make sure that you have properly configured Cloud VPN or Cloud Interconnect to establish a connection.

Thank you

View solution in original post

Hi Christianpaula, Thanks for the inputs!! Source database didn't have 'listen_addresses' as '*' for some reason. I've correceted it and worked fine now..

View solution in original post

2 REPLIES 2

Hi @rajkumarjai1,

Welcome to Google Cloud Community!

You can try the following additional steps to troubleshoot the issue:
  1. Verify that your source database instance is running and has a healthy status. If the instance is not running or has a degraded status, try restarting it.
  2. Check the firewall rules of the VPC hosting the source database instance. Make sure that the firewall rules allow incoming connections on the correct port (5432 by default).
  3. Check the logs of the source database instance to see if there are any error messages that might help you identify the problem.
  4. Check the network connectivity between the machine running the DMS service and the source database instance. Make sure that they are in the same VPC or that there is a properly configured VPC peering connection between them.
  5. If you are using a private IP address to connect to the source database, make sure that you have properly configured Cloud VPN or Cloud Interconnect to establish a connection.

Thank you

Hi Christianpaula, Thanks for the inputs!! Source database didn't have 'listen_addresses' as '*' for some reason. I've correceted it and worked fine now..