在socket.io脚本中出现奇怪exceptionETIMEDOUT的Openshift redis盒式磁带

我有一个运行的socket.io节点脚本作为聊天服务器。 我有它在本地服务器上运行好,并从此尝试将其移到openshift。

我用下面的墨盒来使它工作 – https://github.com/smarterclayton/openshift-redis-cart/issues

在运行本地版本的服务器时,在连接到openshift的redis时,我在运行脚本后127秒内出现奇怪的超时。

events.js:72 throw er; // Unhandled 'error' event ^ Error: Redis connection to <server> failed - connect ETIMEDOUT at RedisClient.on_error (/path/node_modules/redis/index.js:196:24) at Socket.<anonymous> (/path/node_modules/redis/index.js:106:14) at Socket.emit (events.js:95:17) at net.js:441:14 at process._tickCallback (node.js:442:13) 

我曾经看过一个events.js:72,但通常当我尝试运行一个已经在该端口上运行的节点脚本时。

很确定的脚本本身是好的,因为当我换出我的本地的Redis服务器,它会坐在那里几天,并正常工作。

所以我的问题是:为什么我的socket.io脚本在redis在openshift上托pipe的127秒之后自行终止?

您是否使用rhc port-forward命令,以便您可以连接到OpenShift上的redis? 否则,该端口不公开。