When connecting to the CloudSQL DB, you must provide the PostgreSQL configuration details (this makes sense). When getting the necessary address information from Google's configuration page, you are provided with an external IP address (and nothing else as far as external solutions work) to connect to it. This then produces a warning when using it:
(node:18101) [DEP0123] DeprecationWarning: Setting the TLS ServerName to an
IP address is not permitted by RFC 6066. This will be ignored in a future
version.
I have tried researching about this warning, and am struggling to come up with a proper resolution for this, since Google does not provide any sort of servername (or similar) for this.
I'm thinking one solution could be to externally add a subdomain to my companies servers that points to this IP address, but to be honest that is not very ideal for us (if it's the only solution though, that is fine).
This is a server running Node 12.7.0
on Debian 9.9 (stretch)
, connecting to CloudSQL PostgreSQL 11 (beta)
.
Obviously the expected solution is to remove all [deprecation] warnings from a production code-base, so looking to resolve that, and any ideas of how best to attack that since nobody seems to have posted this elsewhere!
Edit: I was able to resolve this by adding proper hostnames to said IPs. Not sure if there is a better solution (if you find one, please let me know!), but this will work in the interim since keeping the external server around is only a short-term scenario for us anyways. Related issue created for adding this to the documentation: https://github.com/brianc/node-postgres/issues/1950
I changed from IP name to DNS name and the error is gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With