Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:


Go Back   Caucho Forums > Quercus

Reply
 
Thread Tools Display Modes
  #1  
Old 02-18-2013, 02:28 AM
Hiroshi Hiroshi is offline
Junior Member
 
Join Date: Feb 2013
Posts: 2
Default Quercus Google App Engine app Not authorized to access Google Cloud SQL instance

Hello,

I'm trying to deploy Wordpress on Google App Engine by following the steps in this post: http://wordpress-on-quercus-2.appspo...e-app-engine-2 and using the sample files from github: https://github.com/diablonhn/quercus_on_gae_2

I'm facing a problem when trying to establish a db connection from the GAE app to my Google Cloud SQL instance.

On my local dev server I am able to connect to mySQL and able to interact with the database but when I deploy the app to GAE and try to view the sample file mysql.php (on the browser) i get this error:

/mysql.php:11: Warning: A link to the server could not be established.
url=jdbc:google:rdbms://jdbc:google:rdbms//my-project-name:my-instance-name?jdbcCompliantTruncation=false
driver=com.google.appengine.api.rdbms.AppEngineDri ver
java.sql.SQLInvalidAuthorizationSpecException: Not authorized to access instance: jdbc:google:rdbms [mysql_connect]

in the above error, why is the driver (jdbc:google:rdbms) shown twice in the "url" string? is this correct? or is it a bug?


More info:

- in the sample file mysql.php I replaced project_name:instance_name with my actual project and instance name from Google Cloud SQL (copied and pasted from Cloud SQL console to avoid typos.) $jdbc_url = 'jdbc:google:rdbms//project_name:instance_name';

- I did create a Cloud SQL project and instance per Google documentation
- Both my GAE app and Cloud SQL instance are in the U.S. region and billing is enabled.
- I granted access to my GAE app for the Cloud Storage instance, again per the Google documentation, which is very straightforward by the way.
- I'm using appengine-java-sdk-1.7.5 and my java version is "1.6.0_39"
- on my localhost I copied mysql-connector-java-5.1.23-bin.jar to /appengine-java-sdk-1.7.5/lib/impl/ - so I am able to connect to my local instance of MySQL.

At this point I'm not sure why the GAE app is showing as not authorized to access the Cloud SQL instance.

Any thoughts?

Thanks!
Reply With Quote
  #2  
Old 02-18-2013, 06:45 PM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

Hi,

Can you email your source files to nam@caucho.com? I'll take a look at it. Thanks.
Reply With Quote
  #3  
Old 02-20-2013, 08:46 PM
Hiroshi Hiroshi is offline
Junior Member
 
Join Date: Feb 2013
Posts: 2
Default

Hi Nam,

The issue turned out to be a missing colon in the jdbc_url value. I should have double-checked that.

here is the line from the sample file (mysql.php):
Code:
$jdbc_url = 'jdbc:google:rdbms//project_name:instance_name';
and here is the line that worked for me (including the 3rd colon after rdbms):
Code:
$jdbc_url = 'jdbc:google:rdbms://project_name:instance_name';
Great blog post, by the way. Thanks for that, and thanks for all the great work you guys are doing. Keep it up!

Cheers,
Hiroshi.
Reply With Quote
  #4  
Old 02-21-2013, 04:22 AM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

Cool. Thanks for the update. I think I ran into the "colon problem" before .
Reply With Quote
  #5  
Old 02-21-2013, 04:28 AM
nam nam is offline
Administrator
 
Join Date: Aug 2009
Posts: 337
Default

Oops, it's the sample mysql.php file. I'll update it. Thanks.
Reply With Quote
Reply

Tags
google app engine, google cloud sql, quercus

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:54 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.