Wednesday, September 18, 2013

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

Hi Joe,

Yes you're right !
I had tomcat installed with apt-get and I did not pay attention it was installed with a specific user.

Thank you
:-)



Le lundi 16 septembre 2013 16:29:31 UTC+2, Joe Faith a écrit :
Hi Jean-Baptiste 

could you check which user tomcat is running as.
The access token is stored under the user's home folder

j


On Sat, Sep 14, 2013 at 9:48 AM, Jean-Baptiste Claramonte <jeanbaptist...@gmail.com> wrote:
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.



--
Joe Faith | Product Manager | Google Cloud

--
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/08c19a34-8901-4221-93d1-1903e2ce3dca%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment