Saturday, September 14, 2013

Problems accessing Cloud SQL from a Java Web App located on a Compute Engine VM instance

Hello
I'm trying to install a simple Java Web App (petclinic from springframework) on a tomcat instance located on a Compute Engine VM instance (on which Cloud SQL is enabled).
This Java Web App need to access to my Cloud SQL instance. 

I downloaded google_sql on my VM instance, called gauth to be authenticated, called google_sql.sh and successfully connected to my Cloud SQL instance from my VM instance.
Unfortunately it still doesn't work, it fails when connecting and I have this error:

 java.sql.SQLException: Unable to load OAuth2 refresh or access token. Please run the google_sql command line tool once to setup cached credentials. See: http://code.google.com/apis/sql/docs/commandline.html

What should I do to be able to access my Cloud SQL instance from a VM Instance ? 

--
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/1ef4d0ad-1b5b-4f06-bc5f-f461eaa48c82%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment