我有一个在Netty服务器上运行Atmosphere框架的实时通知系统,使用Websockets协议。
该系统在我的本地机器上可以完美运行,但是当我在EC2上部署它时,它似乎无法正常工作。虽然我能够使用telnet连接到远程Netty服务器,但浏览器(Firefox)抛出以下错误:
Using URL: ws://beta.myapp.com:2880/myhandle?id=1&name=Chinese_food_rule_2& X-Atmosphere-tracking-id=35490c47-59d6-abf6-36fa-431aa340d90a&X-Atmosphere-Framework=0.9&X-Atmosphere-Transport=websocket&X-Cache-Date=0&Content-Type=application/json
Websocket error, reason: undefined
Firefox can't establish a connection to the server at ws://beta.myapp.com:2880/myhandle?id=1&name=Chinese_food_rule_2&X-Atmosphere-tracking-id=35490c47-59d6-abf6-36fa-431aa340d90a&X-Atmosphere-Framework=0.9&X-Atmosphere-Transport=websocket&X-Cache-Date=0&Content-Type=application/json.
Websocket closed, reason: Connection was closed abnormally (that is, with no close frame being sent).
服务器甚至没有收到请求,这让我想到可能是某些我不知道的 EC2 web sockets 陷阱。