简体   繁体   English

Google App Engine上的Node App无法访问Redis Sentinel

[英]Node app at Google app engine can't access Redis sentinel

I m trying to use redis as data storage for performance. 我正在尝试使用Redis作为性能的数据存储。
- app engine includes node app (using 'sentinel-redis' lib) -应用引擎包括节点应用(使用'sentinel-redis'lib)
- compute engines include redis-server & redis-sentinel (provided by GCP deploy management) -计算引擎包括redis-server和redis-sentinel(由GCP部署管理提供)
- the strange thing is that : node app works normally without error on compute engine (not in app engine) -奇怪的是:节点应用程序在计算引擎上正常运行,而没有错误(不在应用程序引擎中)
- i guess need something firewall rules that allows app engine to access to subnet that includes redis instances.. - 我猜想需要一些防火墙规则,允许应用程序引擎访问包含Redis实例的子网。


  • here is deploy fail log: 这是部署失败日志:

ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error: 错误:(gcloud.app.deploy)错误响应:[9]应用程序启动错误:

... events.js:160 throw er; ... events.js:160 throw er; // Unhandled 'error' event ^ //未处理的“错误”事件^

Error: Unable to determine master for master 错误:无法为母版确定母版

at onResponse (/app/node_modules/sentinel-redis/index.js:133:19)
at Immediate.<anonymous> (/app/node_modules/sentinel-redis/index.js:117:33)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)

... ...

found out that : i was trying to accesa to external IPs of redis instances. 发现:我正在尝试访问Redis实例的外部IP。 solution was : just let them located in same vpn & use internal ip 解决方案是:只让它们位于相同的VPN中并使用内部IP

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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