Random DC's

Newbie Spellweaver
Joined
Aug 25, 2009
Messages
75
Reaction score
1
Can anyone tell me some of the causes for v83 dc? Like for instance someone will be sitting/training in a map and will dc or after a long time if I afk somewhere i'll dc. Both tend to send person to login screen.
Any ideas?
 
This could be happening due to a lot of reasons. I suggest, at first, to start logging the packets that you send to the clients into a file. You should make the files separated per character; so it's easier to log. When a character disconnects, check what disconnected them through the packets. I do, however, believe it's because of a custom system of auto banning or some sort, or just bad packets.
 
Upvote 0
This could be happening due to a lot of reasons. I suggest, at first, to start logging the packets that you send to the clients into a file. You should make the files separated per character; so it's easier to log. When a character disconnects, check what disconnected them through the packets. I do, however, believe it's because of a custom system of auto banning or some sort, or just bad packets.

I'll try to log the packets, this would be Outbound correct? Why do you think it's the auto banning system?
 
Last edited:
Upvote 0
What I noticed is it only seems to dc often when there's 2 people in map training. Also when they dc there's a rollback.
Then the server is most definitely forcefully dropping the connection. it is not a normal 'disconnect', If fraysa were correct it would be sending MapleClient.disconnect.

This is entirely possibly not even on a java level - your server itself could be dropping the connection.
 
Upvote 0
Then the server is most definitely forcefully dropping the connection. it is not a normal 'disconnect', If fraysa were correct it would be sending MapleClient.disconnect.

This is entirely possibly not even on a java level - your server itself could be dropping the connection.

So what would be a necessary precaution to take for something like this?
 
Upvote 0
You should print a stack trace when a session is closed and log into a file with the name of the IP (or character) that has been disconnected - that's probably your best shot.
 
Upvote 0
Printed out 2 exceptions (Not simultaneously). Sometimes it doesn't send print to console when I DC.

Code:
caught an exception: org.apache.mina.core.write.WriteToClosedSessionExce
ption
org.apache.mina.core.write.WriteToClosedSessionException
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.clearWriteReq
uestQueue(AbstractPollingIoProcessor.java:573)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeNow(Abs
tractPollingIoProcessor.java:525)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.removeSession
s(AbstractPollingIoProcessor.java:497)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(Ab
stractPollingIoProcessor.java:61)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run
(AbstractPollingIoProcessor.java:974)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnabl
e.java:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Code:
caught an exception: java.io.IOException: An existing connection was forci
bly closed by the remote host
java.io.IOException: An existing connection was forcibly closed by the remote ho
st
        at sun.nio.ch.SocketDispatcher.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at sun.nio.ch.IOUtil.read(Unknown Source)
        at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.j
ava:202)
        at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.j
ava:42)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(Abstract
PollingIoProcessor.java:620)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstr
actPollingIoProcessor.java:598)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(Abstr
actPollingIoProcessor.java:587)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(Ab
stractPollingIoProcessor.java:61)
        at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run
(AbstractPollingIoProcessor.java:969)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnabl
e.java:64)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 
Upvote 0
The exception is raised when the connection was forcibly closed and it's unable to read data from the socket. That means your client is being disconnected manually from your server. Try to see why it's called (stack traces are best).
 
Upvote 0
Back