400,502,503错误与Websockets

我正在使用Socket.io,Node.js和Openshift进行多人游戏。 它工作了一段时间,但我做了一些小的改变,现在与我改变的东西无关。 当第二个玩家试图join游戏时,它会将所有人都引导出来,对于任何其他进入该网站的人显示503错误。 对于第二个玩家,我得到了很多控制台错误,包括

WebSocket connection to 'ws://avalon-evao.rhcloud.com/socket.io/?EIO=3&transport=websocket&sid=d5smykffy4EWHxgIAAAC' failed: Error during WebSocket handshake: Unexpected response code: 400 http://avalon-evao.rhcloud.com/socket.io/?EIO=3&transport=polling&t=1421020862973-4&sid=d5smykffy4EWHxgIAAAC Failed to load resource: the server responded with a status of 502 (Bad Gateway) http://avalon-evao.rhcloud.com/socket.io/?EIO=3&transport=polling&t=1421020865831-6&sid=d5smykffy4EWHxgIAAAC Failed to load resource: the server responded with a status of 503 (Service Unavailable) socket.io-1.2.0.js:2 WebSocket connection to 'ws://avalon-evao.rhcloud.com/socket.io/?EIO=3&transport=websocket&sid=c-fwcJaMkp_9rl5CAAAA' failed: WebSocket is closed before the connection is established. 

它在localhost中工作得很好,但真正的网站被打破了。

以下是我所尝试的:

  1. 使用HTTPS。 我仍然得到了502错误。
  2. 使用rhc app restart
  3. 使用rhc app force-stop rhc app start重新启动应用rhc app force-stop rhc app start
  4. 检查内存限制。 我没有击中它。
  5. 使用{ secure: true }选项{ secure: true }地连接到websockets

什么是造成这些错误,我该如何解决它们?

尝试:
WS://…rhcloud.com:8000 / socket.io / …
WSS://…rhcloud.com:8443 / socket.io / …

https://help.openshift.com/hc/en-us/articles/203263674-What-external-ports-are-available-on-OpenShift

事实certificate,我正在查看错误的日志。 当我想出如何读取rhc的日志时,我发现数据库中有错误。 我已经改变了集合的结构而不删除数据库,所以索引已经不存在了。 丢弃数据库,现在应用程序正常工作。