[ http://issues.apache.org/jira/browse/DIRMINA-275?page=all ]
Trustin Lee resolved DIRMINA-275.
---------------------------------
Fix Version/s: 0.8.4
Resolution: Fixed
I've reviewed SocketAcceptor source code and applied a fix to the code with a
potential problem. Please check out the latest source code from our source
code repository and try to build 0.8.4-SNAPSHOT.
> Exception in thread "SocketAcceptor-1" java.nio.channels.CancelledKeyException
> ------------------------------------------------------------------------------
>
> Key: DIRMINA-275
> URL: http://issues.apache.org/jira/browse/DIRMINA-275
> Project: Directory MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.8.3, 1.0
> Environment: Unix (Asianux) with Service Wrapper
> Reporter: Phan Thanh Hieu
> Fix For: 0.8.4, 1.0.1
>
> Attachments: log.log, mina.zip
>
>
> Environment: Unix (Asianux) with Service Wrapper.
> My software (called DC) works a server listening on some Port, it will
> receive messages from several of BC.
> Each BC will get and keep the connection then sending the messages through
> this session (if disconnect, BC will re-connect and continue sending the
> messages).
> My problem is:
> When executing long-run testing: has 5 BC sending messages to DC.
> I tried to stop the DC via: ./dc-deamon.sh stop (this script is got from
> Service Wrapper site).
> => the kind of exception below had occurred:
> -------------------------------------------------------------------------------------------
> main | 2006/10/02 09:12:23 | 2006-10-02 09:12:23:170 [SocketAcceptor-1]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.199:13301] CREATED: Accept connection on DataPort: 9870
> main | 2006/10/02 09:12:23 | 2006-10-02 09:12:23:235
> [ProtocolThreadPool-5]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.199:13301] OPENED
> main | 2006/10/02 09:12:23 | 2006-10-02 09:12:23:236
> [ProtocolThreadPool-21]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.199:13301] CLOSED: Connection on DataPort [9870] has
> been closed.
> main | 2006/10/02 09:12:24 | 2006-10-02 09:12:24:237 [SocketAcceptor-1]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.142:46806] CREATED: Accept connection on DataPort: 9874
> main | 2006/10/02 09:12:24 | 2006-10-02 09:12:24:237
> [ProtocolThreadPool-5]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.142:46806] OPENED
> main | 2006/10/02 09:18:04 | TERM trapped. Shutting down.
> main | 2006/10/02 09:18:04 | Stoping the DC...
> main | 2006/10/02 09:18:04 | 2006-10-02 09:18:04:284 [Wrapper-Connection]
> [com.yokogawa.toshibaks:99] INFO [][][] - DC is stopping.
> main | 2006/10/02 09:18:04 | 2006-10-02 09:18:04:305 [Wrapper-Connection]
> [com.yokogawa.toshibaks:285] INFO [][][] - Stop listening on all Data ports
> and close all data sessions...
> main | 2006/10/02 09:18:05 | Exception in thread "SocketAcceptor-1"
> java.nio.channels.CancelledKeyException
> main | 2006/10/02 09:18:05 | at
> sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:55)
> main | 2006/10/02 09:18:05 | at
> sun.nio.ch.SelectionKeyImpl.readyOps(SelectionKeyImpl.java:69)
> main | 2006/10/02 09:18:05 | at
> java.nio.channels.SelectionKey.isAcceptable(SelectionKey.java:342)
> main | 2006/10/02 09:18:05 | at
> org.apache.mina.io.socket.SocketAcceptor$Worker.processSessions(SocketAcceptor.java:297)
> main | 2006/10/02 09:18:05 | at
> org.apache.mina.io.socket.SocketAcceptor$Worker.run(SocketAcceptor.java:244)
> main | 2006/10/02 09:22:24 | 2006-10-02 09:22:24:858
> [ProtocolThreadPool-21]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.142:46806] IDLE: both idle
> main | 2006/10/02 09:22:24 | 2006-10-02 09:22:24:904
> [ProtocolThreadPool-21]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:313] INFO
> [][][] - Idle timeout occurred. K/S is disconnecting...
> main | 2006/10/02 09:32:25 | 2006-10-02 09:32:25:428
> [ProtocolThreadPool-4]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.142:46806] IDLE: both idle
> main | 2006/10/02 09:32:25 | 2006-10-02 09:32:25:429
> [ProtocolThreadPool-4]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:313] INFO
> [][][] - Idle timeout occurred. K/S is disconnecting...
> main | 2006/10/02 09:42:26 | 2006-10-02 09:42:26:029
> [ProtocolThreadPool-15]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:98] INFO
> [][][] - [/172.16.10.142:46806] IDLE: both idle
> main | 2006/10/02 09:42:26 | 2006-10-02 09:42:26:029
> [ProtocolThreadPool-15]
> [com.yokogawa.toshibaks.dc.protocol.DataMessageSessionHandler:313] INFO
> [][][] - Idle timeout occurred. K/S is disconnecting...
> -------------------------------------------------------------------------------------------
> => the next action: my software could not stop.
> This issue happened sometimes (i reached 3 times). :-(
> My software is going to live soon, so that if this issue happen in
> real-production line => VERY BIG PROBLEM.
> If you have any idea about this, please advice me.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira