【问题标题】:Google Cloud App Engine Standard Environment Node JS connection timeout when connecting Redis on Compute Engine在计算引擎上连接 Redis 时,Google Cloud App Engine 标准环境节点 JS 连接超时
【发布时间】:2018-12-17 21:39:28
【问题描述】:

我最近发现 App Engine 标准环境可以运行 NodeJS。 https://cloud.google.com/appengine/docs/standard/nodejs/setting-up-environment

我已将我的 Node JS 应用程序从灵活环境移至标准环境。我解决了大部分问题,但不知道如何从 App Engine Standard Environment for NodeJS 连接我的 Redis 实例到 Compute Engine 上。 (相同的项目环境)

我需要更改一些设置吗?我无法连接,连接到 Redis 时总是出现连接超时错误,并且我无法找到与此相关的参考/教程。

这是我的 app.yaml

runtime: nodejs8
service: some-app

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

beta_settings:
  cloud_sql_instances: some-connection-string

另外请注意,我使用内部 IP 连接到我的 Redis,当我在灵活环境中时它确实可以工作。

【问题讨论】:

    标签: node.js google-app-engine redis


    【解决方案1】:

    目前这是不可能的,这种连接只允许从柔性环境中进行。这是在 Google 的问题跟踪器中提交的feature request。您可以加星标表示您也对此类功能感兴趣。

    【讨论】:

      猜你喜欢
      • 2021-04-08
      • 2018-08-15
      • 1970-01-01
      • 1970-01-01
      • 2018-11-30
      • 2018-10-07
      • 2017-06-17
      • 2018-08-09
      • 2021-01-12
      相关资源
      最近更新 更多