cloud-sql-proxy icon indicating copy to clipboard operation
cloud-sql-proxy copied to clipboard

failed to connect to instance: Dial error: handshake failed... tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config

Open rkja22 opened this issue 5 months ago • 1 comments
trafficstars

Facing this error with a cloud sql auth proxy connection. The set up is like this -

  • Cloud SQL Auth proxy is running on a VM in a VPC which is connected to CloudSQL instance via peering (PSA)
  • Cloud SQL has only private IP
  • Tested with both SSL enabled and disabled. Same error.
  • Command used to start the proxy - ./cloud-sql-proxy --address 0.0.0.0 --port 5498 projectname:region:instancename --private-ip

Error seen in proxy logs - failed to connect to instance: Dial error: handshake failed (connection name ="projectname:region:instancename ") tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config

rkja22 avatar May 21 '25 14:05 rkja22