mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DIRMINA-831) NioSocketConnector create unused Connections, even when #connect(..) is not called.
Date Wed, 27 Apr 2011 12:34:03 GMT

     [ https://issues.apache.org/jira/browse/DIRMINA-831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Lecharny resolved DIRMINA-831.
---------------------------------------

    Resolution: Not A Problem

This is not a bug, this is the way the SDK deals with a Selector.open() on windows. This page
is explicit about what's going on during this operation :
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5083450 :

"WindowsSelectorImpl uses a Pipe class for wakeup monitoring.  This Pipe, which has one socket
allocated each for source and sink, is only closed properly when implClose is executed on
WindowsSelectorImpl (i.e. if selector.close() were called at some point)"

One more reason not to run anything serious on Windo$...

> NioSocketConnector create unused Connections, even when #connect(..) is not called.
> -----------------------------------------------------------------------------------
>
>                 Key: DIRMINA-831
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-831
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.2
>         Environment: win32, x86, winXP 
>            Reporter: Christian Schwarz
>         Attachments: DIRMINA-831.avi, DIRMINA-831.jpg
>
>
> Hello,
> we are using Mina to access different types of network devices (Webcams, Digital-IO-Boxes,
Access Control Systems,...). For every type of device we use a dedicated IoConnector because
of the different protocols. Under some circumstances we get an "java.net.SocketException:
No buffer space available (maximum connections reached?): connect". We figured out that for
every created NioSocketConnector 8 connections will be created from localhost to localhost
with different ports, even if we do no connect at all. So if we use many NioSocketConnector's
we quickly run out of available ports, i guess. 
> Is it possible to tune the  NioSocketConnector so it only opens a port when we call #connect(..)
? 
> Thanks in advance 
> Chris

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message