在Amazon EC2中运行时,Socket.io重新连接循环

时间:2013-06-04 15:48:48

标签: node.js amazon-ec2 websocket socket.io

在EC2中运行时,我遇到socket.io(websocket)的问题。我没有在节点实例的前面安装任何http代理或loadbalancer。在本地环境中运行时,相同的代码可以正常工作,但在EC2中保持重新连接。即使在EC2实例中,xhr-polling也能正常工作。

当传输设置为websocketxhr-polling时,以下是socket.io调试日志输出。

debug - discarding transport
debug - authorized
info  - handshake authorized aoiP_6qFnqiqEC3r2-0N
debug - setting request GET /socket.io/1/websocket/aoiP_6qFnqiqEC3r2-0N
debug - set heartbeat interval for client aoiP_6qFnqiqEC3r2-0N
debug - client authorized for 
debug - websocket writing 1::

warn  - websocket parser error: reserved fields must be empty
info  - transport end (undefined)
debug - set close timeout for client NxkBCtJqwOscfHzE0xba
debug - cleared close timeout for client NxkBCtJqwOscfHzE0xba
debug - cleared heartbeat interval for client NxkBCtJqwOscfHzE0xba

0 个答案:

没有答案