Page 1 of 1

Unexpected / Malformed input

Posted: 12 Sep 2008, 09:25
by JeroenSteggink
A lot of people/bots are trying to do stuff to the server. A lot of these lines:

Code: Select all

User [ java.nio.channels.SocketChannel[closed] ] removed
these:

Code: Select all

failed writing to channel: java.nio.channels.SocketChannel[connected local=/0.0.0.0:8080 remote=/218.242.212.18:18101]
and these

Code: Select all

Unexpected / Malformed input: java.nio.charset.MalformedInputException: Input length = 1
java.nio.charset.MalformedInputException: Input length = 1
INFO   | jvm 1    | 2008/09/11 21:06:15 | 	at java.nio.charset.CoderResult.throwException(Unknown Source)
INFO   | jvm 1    | 2008/09/11 21:06:15 | 	at java.nio.charset.CharsetDecoder.decode(Unknown Source)
INFO   | jvm 1    | 2008/09/11 21:06:15 | 	at it.gotoandplay.smartfoxserver.SmartFoxServer.readIncomingMessages(SmartFoxServer.java:1024)
INFO   | jvm 1    | 2008/09/11 21:06:15 | 	at it.gotoandplay.smartfoxserver.EventReader.run(EventReader.java:32)
INFO   | jvm 1    | 2008/09/11 21:06:15 | 	at java.lang.Thread.run(Unknown Source)
I don't know if the last one is a bug, or it should spit out the stack trace, but I don't like it. What's causing this?

Posted: 12 Sep 2008, 23:05
by Lapo
The first two are normal. They are logged usually when an idle user (or connection) is being disconnected.
In the 2nd case the connection of the client is no longer valid during a write operation.

The 3rd example, the server notifies that he has received a message in wrong format. Unless you get hundreds of these each day it's nothing to worry about.

Posted: 13 Sep 2008, 16:59
by JeroenSteggink
Ok, thanks for the explanation. 8)