无法从同一区域的 Compute Engine 访问 GCP MemoryStore
GCP MemoryStore unaccessible from Compute Engine on same region
我遵循了以下两个教程:
- https://cloud.google.com/go/docs/tutorials/bookshelf-on-compute-engine
- https://cloud.google.com/memorystore/docs/redis/creating-managing-instances?authuser=1
唯一不同的是我部署了第二个教程的Redis代码,而不是第一个link。
如前所述"Connecting to a Redis instance"You can connect to the Redis instance from any Compute Engine VM instance located within the same project, region and network as the Redis instance.
my-service: 10.162.0.17 (nic0)
redis: 10.169.12.195:6379
Same project, same region, same zone (a)
然而,当我这样做时:
user@my-service:~$ telnet 10.0.0.27 6379
Trying 10.0.0.27...
什么都没发生..
文档指定了命令 telnet 10.0.0.27 6379
。这是您需要针对您的环境进行修改的示例。
将命令更改为:
telnet 10.169.12.195 6379
我遵循了以下两个教程:
- https://cloud.google.com/go/docs/tutorials/bookshelf-on-compute-engine
- https://cloud.google.com/memorystore/docs/redis/creating-managing-instances?authuser=1
唯一不同的是我部署了第二个教程的Redis代码,而不是第一个link。
如前所述"Connecting to a Redis instance"You can connect to the Redis instance from any Compute Engine VM instance located within the same project, region and network as the Redis instance.
my-service: 10.162.0.17 (nic0)
redis: 10.169.12.195:6379
Same project, same region, same zone (a)
然而,当我这样做时:
user@my-service:~$ telnet 10.0.0.27 6379
Trying 10.0.0.27...
什么都没发生..
文档指定了命令 telnet 10.0.0.27 6379
。这是您需要针对您的环境进行修改的示例。
将命令更改为:
telnet 10.169.12.195 6379