I am unable to connect to cloud SQL from inside a custom DoFn while running in cloud dataflow. The errors that show up in the log are:
- Connecting to Cloud SQL instance [] via ssl socket.
- [Docbuilder-worker-exception]: com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not create connection to database server.
The same code and config work fine when connecting to cloud sql from the appenginer handle.
I have explicitly given the compute engine service account - [email protected] - the Cloud SQL client, Cloud SQL viewer and Editor roles.
Any help to troubleshoot this is greatly appreciated!