[英]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. 我最近发现App Engine标准环境可以运行NodeJS。 https://cloud.google.com/appengine/docs/standard/nodejs/setting-up-environment
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. 我已经将Node JS应用程序从灵活环境迁移到标准环境。 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.
我已解决了大多数问题,但无法弄清楚如何通过App Engine Standard Environment for NodeJS在Compute Engine上连接我的Redis实例。 (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.
我无法连接它,连接到Redis时总是出现连接超时错误,并且我无法找到与此相关的参考/教程。
Here is my app.yaml 这是我的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. 另请注意,我正在使用内部IP连接到Redis,当我在灵活环境中时,它确实可以工作。
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.
这是在Google的问题跟踪器中提出的功能请求 。 You can star it to indicate that you're also interested in such functionality.
您可以对其加注星标,以表明您也对此类功能感兴趣。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.