chatofpomelo-websocket 按jion为啥没反应啊

我下载了chatofpomelo-websocket,运行服务器,再运行web,输入账号和房间号,按join没反应怎么办?

标签: 开发求助
jtz0461 在 2015-2-17 18:12发布 分享到 weibo
4 回复
#1 jtz0461 2015-2-17 18:31 回复

日志显示:
connection is timeout without communication, the remote ip is undefined && port is undefined

#2 jtz0461 2015-2-21 11:28 回复

这是服务端信息:
[2015-02-21 11:23:22.294] [ERROR] console - Caught exception: TypeError: Cannot convert undefined or null to object
at copyArray (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/node_modules/pomelo-protocol/lib/protocol.js:266:11)
at Object.Package.decode (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/node_modules/pomelo-protocol/lib/protocol.js:138:7)
at WebSocket.<anonymous> (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/connectors/hybridsocket.js:40:21)
at WebSocket.emit (events.js:110:17)
at Receiver.self._receiver.onbinary (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/node_modules/ws/lib/WebSocket.js:549:10)
at Receiver.opcodes.2.finish (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/node_modules/ws/lib/Receiver.js:448:14)
at Receiver.expectHandler (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/node_modules/ws/lib/Receiver.js:433:33)
at Receiver.add (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/node_modules/ws/lib/Receiver.js:93:24)
at Socket.firstHandler (/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/node_modules/ws/lib/WebSocket.js:524:22)
at Socket.emit (events.js:107:17)

[2015-02-21 11:23:22.722] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/masterwatcher.js] masterwatcher receive remove server event, with server: gate-server-1, type: gate

[2015-02-21 11:23:22.728] [INFO] crash-log - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/master/master.js] [gate],[gate-server-1],[1424489002728],[disconnect]

[2015-02-21 11:23:22.752] [WARN] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/master/starter.js] child process exit with error, error code: null, executed command: /usr/local/bin/node

[2015-02-21 11:23:22.755] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/monitorwatcher.js] master-server-1 receive removeServer signal: {"action":"removeServer","id":"gate-server-1"}

[2015-02-21 11:23:22.724] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/monitorwatcher.js] chat-server-2 receive removeServer signal: {"action":"removeServer","id":"gate-server-1"}

[2015-02-21 11:23:22.724] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/monitorwatcher.js] chat-server-1 receive removeServer signal: {"action":"removeServer","id":"gate-server-1"}
[2015-02-21 11:23:22.724] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/monitorwatcher.js] chat-server-3 receive removeServer signal: {"action":"removeServer","id":"gate-server-1"}

[2015-02-21 11:23:22.726] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/monitorwatcher.js] connector-server-2 receive removeServer signal: {"action":"removeServer","id":"gate-server-1"}

[2015-02-21 11:23:22.727] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/monitorwatcher.js] connector-server-1 receive removeServer signal: {"action":"removeServer","id":"gate-server-1"}

[2015-02-21 11:23:22.729] [DEBUG] pomelo - [/Users/daidan/Documents/pomelo/chatofpomelo-websocket-master/game-server/node_modules/pomelo/lib/modules/monitorwatcher.js] connector-server-3 receive removeServer signal: {"action":"removeServer","id":"gate-server-1"}

#3 jtz0461 2015-2-21 11:28 回复

这到底是啥错误啊

#4 jtz0461 2015-2-28 11:22 回复

在网友的帮助下终于结决了,在此感谢这位网友大神!!
下面分享下解决步骤:首先在项目chatofpomelo-websocket-master/game-server目录打开package.json。 可以看到如下代码:
{
"name": "chatofpomelo-websocket",
"version": "0.0.1",
"private": false,
"dependencies": {
"pomelo": "1.1.4",
"crc": "0.2.0"
}
}
把"pomelo": "1.1.4" 1.1.4这部分改成你的pomelo的版本! 然后重新生成 npm-install.sh。

回到顶部