You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Jan Andersson <ja...@minq.se> on 2005/02/06 23:51:27 UTC
[mina] Exceptions causing server to "die"?
I my implementation of an IoHandlerFilter I didn't take care of an
Exception thrown.
I was running the filter with the EchoServer example and got the
following:
...
IoThreadPool-0 /192.168.0.101:33036: WRITTEN
IoThreadPool-8 /192.168.0.101:33036: WRITTEN
IoThreadPool-0 /192.168.0.101:33036: EXCEPTION
java.lang.RuntimeException: Invalid Handshaking State: NOT_HANDSHAKING
at
org.apache.mina.io.ssl.SSLHandler.doHandshake(SSLHandler.java:220)
at
org.apache.mina.io.ssl.SSLHandler.continueHandshake(SSLHandler.java:
109)
at
org.apache.mina.io.ssl.IoSSLFilter.writeNetBuffer(IoSSLFilter.java:184)
at
org.apache.mina.io.ssl.IoSSLFilter.handleSSLData(IoSSLFilter.java:148)
at
org.apache.mina.io.ssl.IoSSLFilter.dataRead(IoSSLFilter.java:103)
at
org.apache.mina.util.IoHandlerFilterManager$Entry$1.dataRead(IoHandlerFi
lterManager.java:387)
at
org.apache.mina.io.filter.IoThreadPoolFilter$Worker.processEvent(IoThrea
dPoolFilter.java:424)
at
org.apache.mina.io.filter.IoThreadPoolFilter$Worker.processEvents(IoThre
adPoolFilter.java:415)
at
org.apache.mina.io.filter.IoThreadPoolFilter$Worker.run(IoThreadPoolFilt
er.java:351)
IoThreadPool-8 /192.168.0.101:33036: WRITTEN
IoThreadPool-8 /192.168.0.101:33036: CLOSED
Exception in thread "SocketIoProcessor"
java.lang.IllegalStateException: Already released buffer. Did you
release the buffer more than once?
at
org.apache.mina.common.ByteBuffer.release(ByteBuffer.java:126)
at
org.apache.mina.io.socket.SocketSession.dispose(SocketSession.java:122)
at
org.apache.mina.io.socket.SocketIoProcessor.removeSessions(SocketIoProce
ssor.java:188)
at
org.apache.mina.io.socket.SocketIoProcessor.access$500(SocketIoProcessor
.java:41)
at
org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProcessor
.java:491)
This where obviously caused by my code, but the strange part (to me)
was that the server
after this stopped responding to any requests?
/Janne
Re: [mina] Closing a session
Posted by Jan Andersson <ja...@minq.se>.
>> A few Mina questions:
>>
>> - is it possible to from the server-side close/destroy a session?
>> - if no traffic is received from a client, when is a session closed?
>> Can this
>> be controlled?
>
> Yes, you can do both. There is a property called
> SessionConfig.idleTime. If you set idle time, MINA will notify you by
> sessionIdle event when the reader/writer/both becomes idle. So you
> can close the connection at that moment.
I must have been really tired yesterday, couln't find the
ProtocolSession.close() method ;)
Thanks,
/Janne
Re: [mina] Closing a session
Posted by Trustin Lee <tr...@gmail.com>.
Hi,
On Thu, 17 Feb 2005 23:42:18 +0100, Jan Andersson <ja...@minq.se> wrote:
> A few Mina questions:
>
> - is it possible to from the server-side close/destroy a session?
> - if no traffic is received from a client, when is a session closed?
> Can this
> be controlled?
Yes, you can do both. There is a property called
SessionConfig.idleTime. If you set idle time, MINA will notify you by
sessionIdle event when the reader/writer/both becomes idle. So you
can close the connection at that moment.
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
[mina] Closing a session
Posted by Jan Andersson <ja...@minq.se>.
A few Mina questions:
- is it possible to from the server-side close/destroy a session?
- if no traffic is received from a client, when is a session closed?
Can this
be controlled?
/Janne
Re: [mina] Exceptions causing server to "die"?
Posted by Jan Andersson <ja...@minq.se>.
>
>> I my implementation of an IoHandlerFilter I didn't take care of an
>> Exception thrown.
>> I was running the filter with the EchoServer example and got the
>> following:
>> [...]
>> This where obviously caused by my code, but the strange part (to me)
>> was that the server
>> after this stopped responding to any requests?
>
> I've just fixed it: http://svn.apache.org/viewcvs?view=rev&rev=151659
>
> Could you svnup and retry? Thanks in advance!
Yes, it works great.
Thanks,
Janne
Re: [mina] Exceptions causing server to "die"?
Posted by Trustin Lee <tr...@gmail.com>.
Hi Janne,
On Sun, 6 Feb 2005 23:51:27 +0100, Jan Andersson <ja...@minq.se> wrote:
> I my implementation of an IoHandlerFilter I didn't take care of an
> Exception thrown.
> I was running the filter with the EchoServer example and got the
> following:
>
> ...
> IoThreadPool-0 /192.168.0.101:33036: WRITTEN
> IoThreadPool-8 /192.168.0.101:33036: WRITTEN
> IoThreadPool-0 /192.168.0.101:33036: EXCEPTION
> java.lang.RuntimeException: Invalid Handshaking State: NOT_HANDSHAKING
> at
> org.apache.mina.io.ssl.SSLHandler.doHandshake(SSLHandler.java:220)
> at
> org.apache.mina.io.ssl.SSLHandler.continueHandshake(SSLHandler.java:
> 109)
> at
> org.apache.mina.io.ssl.IoSSLFilter.writeNetBuffer(IoSSLFilter.java:184)
> at
> org.apache.mina.io.ssl.IoSSLFilter.handleSSLData(IoSSLFilter.java:148)
> at
> org.apache.mina.io.ssl.IoSSLFilter.dataRead(IoSSLFilter.java:103)
> at
> org.apache.mina.util.IoHandlerFilterManager$Entry$1.dataRead(IoHandlerFi
> lterManager.java:387)
> at
> org.apache.mina.io.filter.IoThreadPoolFilter$Worker.processEvent(IoThrea
> dPoolFilter.java:424)
> at
> org.apache.mina.io.filter.IoThreadPoolFilter$Worker.processEvents(IoThre
> adPoolFilter.java:415)
> at
> org.apache.mina.io.filter.IoThreadPoolFilter$Worker.run(IoThreadPoolFilt
> er.java:351)
> IoThreadPool-8 /192.168.0.101:33036: WRITTEN
> IoThreadPool-8 /192.168.0.101:33036: CLOSED
> Exception in thread "SocketIoProcessor"
> java.lang.IllegalStateException: Already released buffer. Did you
> release the buffer more than once?
> at
> org.apache.mina.common.ByteBuffer.release(ByteBuffer.java:126)
> at
> org.apache.mina.io.socket.SocketSession.dispose(SocketSession.java:122)
> at
> org.apache.mina.io.socket.SocketIoProcessor.removeSessions(SocketIoProce
> ssor.java:188)
> at
> org.apache.mina.io.socket.SocketIoProcessor.access$500(SocketIoProcessor
> .java:41)
> at
> org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProcessor
> .java:491)
>
> This where obviously caused by my code, but the strange part (to me)
> was that the server
> after this stopped responding to any requests?
>
> /Janne
>
>
I've just fixed it: http://svn.apache.org/viewcvs?view=rev&rev=151659
Could you svnup and retry? Thanks in advance!
Cheers,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/