Wednesday, July 17, 2019

[google-cloud-sql-discuss] Re: Cannot connect to Cloud SQL with Java SocketFactory Library

So this is strange. 

I just tried connecting with the Postgres Socketfactory version 1.0.14 (Not working and just hangs forever)

Then switched to older SocketFactory 1.0.10 and then it works. 

The only change is switch to the older version and changed property "cloudSqlInstance" to "socketFactoryArg".

//config.addDataSourceProperty("cloudSqlInstance", CLOUD_SQL_CONNECTION_NAME);

config.addDataSourceProperty("socketFactoryArg", CLOUD_SQL_CONNECTION_NAME);


Or have I missed something in the new 1.0.14 version?



On Wednesday, 14 November 2018 21:59:49 UTC+1, Emerson Moraes wrote:
Hi, I do not know what is happening exactly, but I have a Dataflow streaming job that uses Postgres Cloud SQL with JdbcIO and with plain Jdbc inside a custom function. The only diference between you and me is that I'm using postgres-socket-factory on 1.0.10 version and consequently my url connection use diferent params. For example: jdbc:postgresql://google/<database_name>?useSSL=false&socketFactoryArg=<instance_name>&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=<user_login>&password=<user_password>.

.....

--
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/f5a7cc91-7577-4370-bf5d-0de7ac62dbf2%40googlegroups.com.

No comments:

Post a Comment