AlloyDB tcp:5433 timeout

1.5k Views Asked by At

dial tcp:5433 timeout on the auth proxy end when trying connect local private IP address of the AlloyDB instance i/o timeout

failed to connect to instance: Dial error: failed to dial (instance URI = "projects/myproject/locations/us-central1/clusters/mycluster/instances/myprimary"): dial tcp 10.205.117.5:5433: i/o timeout

2

There are 2 best solutions below

2
On

From the comments:

The problem is accessing from local won't work. AlloyDB currently doesn't implement a Public IP connection, so the only way to connect to it is from within the same VPC (cloud network) as the AlloyDB cluster itself. That's why connecting from a GCE instance on the same network works while connecting from the local machine does not.

4
On
./alloydb-auth-proxy projects/<projects_name>/locations/<instance_location>/clusters/<cluster_name>/instances/<instance_name> --credentials-file <path_to_key> --port 5432 --address 0.0.0.0

I was having the same issue, it is because of the " between the uri. now i fix it by running command above