简体   繁体   中英

Google Cloud App Engine Standard Environment Node JS connection timeout when connecting Redis on Compute Engine

I have recently found out that App Engine standard environment can run NodeJS. https://cloud.google.com/appengine/docs/standard/nodejs/setting-up-environment

I have moved my Node JS application from the flexible environment to the standard environment. I got most of the issues sorted out but couldn't figure out how to connect my Redis instance on Compute Engine from App Engine Standard Environment for NodeJS. (Same project environment)

Are there some settings I need to change? I couldn't get it to connect, I always get connection timeout error when connecting to Redis, and I haven't able to locate a reference/tutorial relates to this.

Here is my app.yaml

runtime: nodejs8
service: some-app

env_variables:
  NODE_ENV: "production"
  TMP_PATH: "/tmp"

beta_settings:
  cloud_sql_instances: some-connection-string

Also note that I am connecting to my Redis using Internal IP, it does work when I am on Flexible Environment.

This is not possible for now, such connection is allowed only from the flexible environment. Here is a feature request filed in Google's Issue Tracker. You can star it to indicate that you're also interested in such functionality.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM