pomelo icon indicating copy to clipboard operation
pomelo copied to clipboard

"rpc request is timeout" in Pomelo 1.0 pre

Open nhatminh12369 opened this issue 12 years ago • 9 comments

My game-server have 1 connector server, 1 authentication server, 1 area server and use normal websocket to connect (ws) When the client connect to the connector server, I send a rpc message from connector server to authentication server to do the login: self.app.rpc.auth.facebookRemote.login(...); After received the result, the connector server continues to send a rpc message to area server: self.app.rpc.area.playerRemote.addPlayer(...); The client login successfully, but after about 20 seconds. I received this error: mailboxes\ws-mailbox.js] rpc request is timeout, id: 0, host: 127.0.0.1, port: 3250(the port of area server) mailboxes\ws-mailbox.js] rpc callback timeout, remote server host: 127.0.0.1, port: 3250 mailstation.js] [pomelo-rpc] fail to send message

I don't have this problem with Pomelo 0.9. Only happen with Pomelo 1.0 pre. I have tried both wss and ws and experienced the same problem.

nhatminh12369 avatar Jun 11 '14 14:06 nhatminh12369

The rpc server should invoke the callback.

py8765 avatar Jun 12 '14 01:06 py8765

Yes, the rpc server invokes the callback normally. I can also send some requests to the area server and receive result normally. But 20 seconds later, the connector server seems to automatically send a message to the area server again. Therefore, I send a request to the area server once, but I receive the result more than 2 times, period between each times is about 20s. Every time it send the message again, the server display that error.

nhatminh12369 avatar Jun 12 '14 01:06 nhatminh12369

i have the same problem, about 3-4 same messages and then an error pops up, any solution to this issue?

iggyZiggy avatar Oct 15 '14 15:10 iggyZiggy

i have the same problem.

letiennam29 avatar Apr 24 '15 04:04 letiennam29

Did you solve it? @nhatminh12369 @iggyZiggy @letiennam29

vitahlin avatar Jan 19 '17 08:01 vitahlin

Hey @nhatminh12369 @iggyZiggy @letiennam29. How did you solve this problem? Could you explain this?

keisoftdev avatar Apr 04 '17 14:04 keisoftdev

@keisoftdev I think your code may have some problems.

vitahlin avatar Apr 05 '17 08:04 vitahlin

Anyone solved this? I have the same problems but recieving this exception before:

[2017-06-08 02:16:21.939] [ERROR] console -  Caught exception: RangeError: out of range index
    at RangeError (native)
    at fastCopy (/root/viatruco/viatruco-gs/node_modules/pomelo/node_modules/pomelo-rpc/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js:317:24)
    at Receiver.add (/root/viatruco/viatruco-gs/node_modules/pomelo/node_modules/pomelo-rpc/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js:78:3)
    at Socket.firstHandler (/root/viatruco/viatruco-gs/node_modules/pomelo/node_modules/pomelo-rpc/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js:663:22)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:543:20)

And a bit later:

[2017-06-08 02:16:22.381] [WARN] pomelo-rpc - rpc request is timeout, id: 908, host: 138.197.41.111, port: 6050

[2017-06-08 02:16:22.381] [ERROR] pomelo-rpc - rpc callback timeout, remote server host: 138.197.41.111, port: 6050

[2017-06-08 02:16:22.384] [ERROR] pomelo-rpc - [pomelo-rpc] fail to send message

cc @vitahlin @letiennam29 @py8765

frabaglia avatar Jun 08 '17 03:06 frabaglia

me too [2018-04-23 14:28:01.615] [ERROR] pomelo-rpc - [mqtt-mailbox] rpc connector-server-1 callback timeout 30000, remote server 213 host: 127.0.0.1, port: 6052

[2018-04-23 14:28:01.616] [ERROR] pomelo-rpc - [MailStation] [pomelo-rpc] fail to send message Error: rpc connector-server-1 callback timeout 30000, remote server 213 host: 127.0.0.1, port: 6052 at Timeout. (/home/alessandro/Scrivania/tetriScript/tetriScript/game-server/node_modules/pomelo-rpc/lib/rpc-client/mailboxes/mqtt-mailbox.js:257:16) at ontimeout (timers.js:386:11) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

[2018-04-23 14:28:01.617] [ERROR] pomelo-rpc - [failprocess] rpc failed with error, remote server: game-server-1, msg: {"namespace":"user","serverType":"game","service":"gameRemote","method":"tick","args":[]}, error code: 5

How is server configuration in pomelo? do some one have a good link?

Balbo76 avatar Apr 23 '18 12:04 Balbo76