PDA

View Full Version : [Bug Report] Message is larger than maximum allowed size



newElectrotanker
06-26-2012, 02:55 AM
Hi All!

I see much errors when I start electrotank server:
"Message is larger than maximum allowed size (1411397166 > 1048576)"

Please, help me fix it

tcarr
06-26-2012, 11:55 AM
Are you sending really large messages? Let me know if that is the case, because there are other things to be done. The most likely problem is one of these:

A client crashed and when it did so sent a garbage message to the server. Either ignore or try to figure out why your clients are crashing.
A user is trying to hit an ES5 port with the wrong protocol. For example, an AS2 client has to use text protocol, and if it is hitting your BinaryTCP port or HTTP port, you would see something like this.
Some non-ES5 app is trying to access the port for your ES5. Usually this is a webspider or something, and it happens more often if you are using port 80 or port 443.


When a message arrives at the ES5, the first thing that is read is the length of the message. If it is too large, ES5 doesn't process the rest of the message, so there is very little CPU wasted. You still have bandwidth wasted of course.

newElectrotanker
06-28-2012, 08:04 AM
I am still error:
Starting ElectroServer 5.3.1
Go to http://www.electrotank.com/ for the latest version.
################################################## #########
Computer Information
Operating System: Windows 2003
Operating System Architecture: amd64
Processors Available: 8
Memory Available: 1818Mb
################################################## #########
Virtual Machine Information
Virtual Machine Vendor: Sun Microsystems Inc.
Virtual Machine Version: 1.6.0_30


2012-Jun-25 16:55:59:406 [main] INFO com.electrotank.electroserver5.servers.registry.co nfig.RegistryConfigurationService - MUID [554e8dbe-b681-407e-aaa9-854ed9594827]
2012-Jun-25 16:56:01:015 [main] WARN Extensions.NetGame365Server.EventHandlers.GMSIniti alizer - PhomPlugin game registered with GameManager.
2012-Jun-25 16:56:01:015 [main] WARN Extensions.NetGame365Server.EventHandlers.GMSIniti alizer - DemLaPlugin game registered with GameManager.
2012-Jun-25 16:56:01:015 [main] WARN Extensions.NetGame365Server.EventHandlers.GMSIniti alizer - O3CPlugin game registered with GameManager.
2012-Jun-25 16:56:01:031 [main] WARN Extensions.NetGame365Server.EventHandlers.GMSIniti alizer - PokerPlugin game registered with GameManager.
2012-Jun-25 16:56:01:031 [main] WARN Extensions.NetGame365Server.EventHandlers.GMSIniti alizer - XitoPlugin game registered with GameManager.
2012-Jun-25 16:56:01:031 [main] WARN Extensions.LiengGameServer.EventHandlers.GMSInitia lizer - LiengPlugin game registered with GameManager.
2012-Jun-25 16:56:02:640 [main] INFO com.electrotank.electroserver5.servers.gateway.Gat ewayServer - GatewayServer.doStart
2012-Jun-25 16:56:02:687 [main] INFO com.electrotank.electroserver5.protocol.IOProvider - Opened BinaryTCP listener on /123.30.180.156:9899
2012-Jun-25 16:56:02:687 [main] INFO com.electrotank.electroserver5.protocol.IOProvider - Opened RTMP listener on /123.30.180.156:1935
2012-Jun-25 16:56:02:703 [main] INFO com.electrotank.electroserver5.protocol.IOProvider - Opened BinaryHTTP listener on /123.30.180.156:8989
2012-Jun-25 16:56:02:703 [main] INFO com.electrotank.electroserver5.protocol.IOProvider - Opened TextTCP listener on /123.30.180.156:8990
2012-Jun-25 16:56:02:718 [main] INFO com.electrotank.electroserver5.protocol.IOProvider - Opened BinaryUDP listener on /123.30.180.156:10000
2012-Jun-25 16:56:02:718 [main] INFO DisplayLogger -
-=-=-=-=-=-=-=-
ElectroServer has started successfully
2012-Jun-25 16:56:03:203 [worker-34 BinaryTCP-0] WARN com.electrotank.electroserver5.protocol.IOErrorHan dler - IOErrorHandler.exceptionCaught
java.io.IOException: Message is larger than maximum allowed size (1195725856 > 1048576)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.stopIfPolicyFile(TCPDecoder.java:125)
at com.electrotank.electroserver5.protocol.etio.tcp.B inaryTCPDecoder.readPayload(BinaryTCPDecoder.java: 49)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.readMessage(TCPDecoder.java:51)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:33)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:14)
at org.jetlang.channels.MemoryChannel.publish(MemoryC hannel.java:27)
at com.electrotank.io.CheckForReadReadiness.read(Chec kForReadReadiness.java:78)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:45)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:18)
at org.jetlang.channels.ChannelSubscription$1.run(Cha nnelSubscription.java:31)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
2012-Jun-25 16:56:03:218 [worker-41 BinaryTCP-0] WARN com.electrotank.electroserver5.protocol.IOErrorHan dler - IOErrorHandler.exceptionCaught
java.io.IOException: Message is larger than maximum allowed size (795046511 > 1048576)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.stopIfPolicyFile(TCPDecoder.java:125)
at com.electrotank.electroserver5.protocol.etio.tcp.B inaryTCPDecoder.readPayload(BinaryTCPDecoder.java: 49)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.readMessage(TCPDecoder.java:51)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:33)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:14)
at org.jetlang.channels.MemoryChannel.publish(MemoryC hannel.java:27)
at com.electrotank.io.CheckForReadReadiness.read(Chec kForReadReadiness.java:78)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:45)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:18)
at org.jetlang.channels.ChannelSubscription$1.run(Cha nnelSubscription.java:31)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
2012-Jun-25 16:56:03:234 [worker-45 BinaryTCP-0] WARN com.electrotank.electroserver5.protocol.IOErrorHan dler - IOErrorHandler.exceptionCaught
java.io.IOException: Message is larger than maximum allowed size (1936928100 > 1048576)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.stopIfPolicyFile(TCPDecoder.java:125)
at com.electrotank.electroserver5.protocol.etio.tcp.B inaryTCPDecoder.readPayload(BinaryTCPDecoder.java: 49)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.readMessage(TCPDecoder.java:51)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:33)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:14)
at org.jetlang.channels.MemoryChannel.publish(MemoryC hannel.java:27)
at com.electrotank.io.CheckForReadReadiness.read(Chec kForReadReadiness.java:78)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:45)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:18)
at org.jetlang.channels.ChannelSubscription$1.run(Cha nnelSubscription.java:31)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
2012-Jun-25 16:56:03:234 [worker-49 BinaryTCP-0] WARN com.electrotank.electroserver5.protocol.IOErrorHan dler - IOErrorHandler.exceptionCaught
java.io.IOException: Message is larger than maximum allowed size (1869439337 > 1048576)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.stopIfPolicyFile(TCPDecoder.java:125)
at com.electrotank.electroserver5.protocol.etio.tcp.B inaryTCPDecoder.readPayload(BinaryTCPDecoder.java: 49)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.readMessage(TCPDecoder.java:51)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:33)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:14)
at org.jetlang.channels.MemoryChannel.publish(MemoryC hannel.java:27)
at com.electrotank.io.CheckForReadReadiness.read(Chec kForReadReadiness.java:78)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:45)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:18)
at org.jetlang.channels.ChannelSubscription$1.run(Cha nnelSubscription.java:31)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
2012-Jun-25 16:56:03:234 [worker-53 BinaryTCP-0] WARN com.electrotank.electroserver5.protocol.IOErrorHan dler - IOErrorHandler.exceptionCaught
java.io.IOException: Message is larger than maximum allowed size (1847609428 > 1048576)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.stopIfPolicyFile(TCPDecoder.java:125)
at com.electrotank.electroserver5.protocol.etio.tcp.B inaryTCPDecoder.readPayload(BinaryTCPDecoder.java: 49)
at com.electrotank.electroserver5.protocol.etio.tcp.T CPDecoder.readMessage(TCPDecoder.java:51)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:33)
at com.electrotank.io.ReadOneMessage.onMessage(ReadOn eMessage.java:14)
at org.jetlang.channels.MemoryChannel.publish(MemoryC hannel.java:27)
at com.electrotank.io.CheckForReadReadiness.read(Chec kForReadReadiness.java:78)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:45)
at com.electrotank.io.CheckForReadReadiness.onMessage (CheckForReadReadiness.java:18)
at org.jetlang.channels.ChannelSubscription$1.run(Cha nnelSubscription.java:31)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)

==> Please,help me fix it

tcarr
06-28-2012, 12:20 PM
When your own users connect, do they have problems? This looks to me as if some non-ES5 client is hitting your port. Because the message is nonsense as far as ES5 is concerned, the part of the message that ES5 uses to tell the length of the message can often be parsed into a very large number. These messages are coming in on your port 9899, which is strange for a web spider, but possible.

If you are sure that your own clients are having no problems, I would suggest just adding the following line to your server/config/log4j.properties file, which will suppress the lines above from the log. You will have to restart ES5 for it to take effect:


log4j.logger.com.electrotank.electroserver5.protoc ol.IOErrorHandler=error

There should be no space in that line; if the forum software puts one in, remove it when you edit log4j.properties.