google-api-go-client: sqladmin: SslCerts.CreateEphemeral returning 404 in v0.14.0 and working in v0.13.0
We use https://github.com/GoogleCloudPlatform/cloudsql-proxy to connect to our database. It internally calls sqladmin.SslCerts.CreateEphemeral
to create an ephemeral certificate for the encryption. With the same configuration this method is behaving differently between v0.14.0 and v0.13.0
Basically it returns a 404 in the case of v0.14 and in v0.13 it is running without any errors. I did not open an issue in that repo as there were no changes there.
Could you please look into this?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 15 (3 by maintainers)
I reproduced the same issue after coming across this issue 3 days ago. (Before this discussion started so I was trying to make sure it was not a one-time thing)
Reproduced using the default cloudsqlpostgres dialer. It seems to me that as mentioned by others, the recent release of googleapis v14 caused compatibility issues with the dialer. The error seems to be a result of the dialer not connecting at all and thus returning a 404 error code. (even if you try providing an invalid host to the dialer the same exact error occurs)
Configuration example
Using go1.13.4 linux/amd64 and a PostgreSQL 9.6 Cloud SQL instance.
Error code:
“ensure that the account has access to "[INSTANCE_CONNECTION_NAME]" (and make sure there's no typo in that name). Error during createEphemeral for [INSTANCE_CONNECTION_NAME]: googleapi: got HTTP response code 404
However using the companion process configuration everything works fine. (I have compiled the Cloud SQL Proxy from source)
We are using CloudSQL proxy library in exactly the same way as shown here.
Cloud SQL Proxy (Binary) is locked to v0.9.0 of this library and hence that is working. But since we are also using other libraries (stackdriver) that depend on the master branch of this we received this error. For now we have locked the version to v0.13 to get things working.
Here’s the error we get when we try to connect using v0.14.0
ensure that the account has access to \"<insatnce>\" (and make sure there's no typo in that name). Error during createEphemeral for <instance>: googleapi: got HTTP response code 404 with body: Not Found
The same configuration works if lock the version to v0.13.0.