Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 30942 invoked from network); 1 Jun 2005 08:17:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jun 2005 08:17:22 -0000 Received: (qmail 84601 invoked by uid 500); 1 Jun 2005 08:17:22 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 84557 invoked by uid 500); 1 Jun 2005 08:17:21 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 84518 invoked by uid 99); 1 Jun 2005 08:17:21 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 01:17:19 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 1FB15189 for ; Wed, 1 Jun 2005 10:16:56 +0200 (CEST) Message-ID: <1370449196.1117613816127.JavaMail.jira@ajax.apache.org> Date: Wed, 1 Jun 2005 10:16:56 +0200 (CEST) From: "Julien Vermillard (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRMINA-49) MINA doesn't cleanup failed sockets In-Reply-To: <1294504343.1117613812178.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIRMINA-49?page=comments#action_66723 ] Julien Vermillard commented on DIRMINA-49: ------------------------------------------ The code exatly do that in the loop: IoProtocolConnector connector = new IoProtocolConnector(new SocketConnector()); session = connector.connect(new InetSocketAddress(hostname, port),protocolProvider); > MINA doesn't cleanup failed sockets > ----------------------------------- > > Key: DIRMINA-49 > URL: http://issues.apache.org/jira/browse/DIRMINA-49 > Project: Directory MINA > Type: Bug > Versions: 0.7.1 > Environment: A computer try to connect to an unavaible TCP port, and retry every seconds simply using : > session = connector.connect(new InetSocketAddress(hostname, port),protocolProvider); > after some times this exception is fired : > java.io.IOException: Too many open files > at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) > at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:145) > at org.apache.mina.io.socket.SocketAcceptor$Worker.processSessions(SocketAcceptor.java:282) > at org.apache.mina.io.socket.SocketAcceptor$Worker.run(SocketAcceptor.java:233) > Reporter: Julien Vermillard > Assignee: Trustin Lee > Priority: Critical > > (09:56:19) vrm: ran in a strange exception : > (09:56:20) vrm: 1 juin 2005 09:53:56 org.apache.mina.common.DefaultExceptionMonitor exceptionCaught > ATTENTION: Unexpected exception. > java.io.IOException: Too many open files > at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) > at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:145) > at org.apache.mina.io.socket.SocketAcceptor$Worker.processSessions(SocketAcceptor.java:282) > at org.apache.mina.io.socket.SocketAcceptor$Worker.run(SocketAcceptor.java:233) > (09:56:46) trustin: Too many open files.. > (09:57:13) vrm: yep I try to connect to some devices who are offlines > (09:57:20) vrm: and I retry every 2 seconds > (09:57:46) trustin: devices offline? Could you explain it more? > (09:58:43) vrm: my server try to connect to another computer (SockectConnector), but the computer is down > (09:59:15) vrm: session = connector.connect(new InetSocketAddress(hostname, port),protocolProvider); > (09:59:26) vrm: it throw an IOException > (09:59:31) vrm: (of course) > (09:59:47) vrm: and my program try to reconnect 2 seconds later > (09:59:57) trustin: Ahhhhh I see. > (10:00:08) trustin: It seems like the it doesn't clean up failed socket. > (10:00:15) trustin: Could you post it to JIRA? > (10:00:28) trustin: I'll try to fix it tonight or tomorrow morning. > (10:00:37) vrm: you know where I can see if it's cleaned or not ? (it's perhaps in my code) > (10:01:18) vrm: before I post a nobug in jira :) > (10:01:52) trustin: You can't see its cleaned or not from outside of MINA. > (10:02:36) vrm: ok > (10:02:41) vrm: I post it -- 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