Friday, May 5, 2017

[google-cloud-sql-discuss] Re: #nodejs #2ndGen Error: connect ETIMEDOUT

Hi Lekooa,

You can find the same exact issue Using Cloud SQL with Node.js => "Error: connect ETIMEOUT" on App Engine filed at GitHub, which seems to be caused by the firewall settings as mentioned in the issue. I would suggest that you should need to use the Cloud SQL Proxy for the Cloud SQL 2nd Gen instance to solve the issue. 

- Jun



On Thursday, September 8, 2016 at 9:41:27 AM UTC-4, Lekooa Dev wrote:
Hello!

I'm currently developing a Node.js application (Express framework and TypeORM) with MySQL Second Generation. 

When the Node.js application runs on a local machine, they are any problem to connect and use the the MySQL instance. 

But when the Node.js application is deployed on the App Engine, I have this following error "Error: connect ETIMEDOUT" after each query.

Thanks for you help!

----

Dockerfile:
# Use the base App Engine Docker image, based on debian jessie.
FROM gcr
.io/google_appengine/nodejs
# Install specific node.js version
RUN install_node v6
.5.0
# Copy application code.
COPY
. /app/
WORKDIR
/app
# Set common env vars
ENV NODE_ENV dev
 
# Install dependencies.
RUN npm
--unsafe-perm install
# start
CMD
["npm", "start"]

app.yaml:
# [START app_yaml]
#runtime: nodejs
runtime
: custom
vm
: true
beta_settings
:
      cloud_sql_instances
: "<cloud-sql-instance-name>"
# [END app_yaml]

--
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/66f661c4-f4a5-4ec3-8210-da8b60361019%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment