我想负载平衡我的Meteor应用程序使用Hipache反向代理。单个应用程序服务器实例运行良好,但是当我添加第二个实例时,在浏览器中会出现以下错误:
WebSocket connection to 'ws://test.local:8000/sockjs/709/gs_aliii/websocket' failed: WebSocket is closed before the connection is established.
下面是启动应用程序停靠容器和配置hipache的shell脚本:http://pastebin.com/R1kuW80E
完整的设置在这里:https://github.com/vlebedev/docker-test
我在github上的hipache问题中发现了以下问题,也许这就是问题所在:https://github.com/dotcloud/hipache/issues/3
另一方面,dotcloud (hipache的创建者)吹嘘他们支持Meteor负载平衡。他们使用hipache作为他们的传入请求路由器。这太奇怪了。
发布于 2013-08-29 11:11:53
好的,我自己找到了问题的根源,下面是:https://github.com/dotcloud/hipache/issues/24
node.js >= 0.10.0的hipache中的websocket支持破坏了一些东西。我把node.js在hipache和meteor容器中的级别降到了0.8.25,现在一切都很好!
https://stackoverflow.com/questions/18509066
复制相似问题