Thursday, January 17, 2019

[google-cloud-sql-discuss] Unable to connect with psql: SSL error: invalid padding

I am trying to connect to a Postgres instance running on Google Cloud Platform using psql.


I got the certificate using:

gcloud beta sql ssl server-ca-certs list --instance=[instance-name] --format='value(cert)' > server-ca.pem

and then tried connecting using psql to the instance using:

psql "host=[ip] port=[port] user=[user] dbname=[db] sslmode=verify-ca sslrootcert=server-ca.pem"


This returns the error: SSL error: invalid padding


I have checked the certificate for valid unix endlines, changed the wrapping (making sure the whole certificate fits on one line, etc.)

Any pointers into what might be going wrong here or how to debug this are very welcome!

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e7b39b68-0ed2-47f5-a059-21bec8704341%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment