[ 
https://issues.apache.org/jira/browse/DIRMINA-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025700#comment-13025700
 ] 

Niklas Gustavsson commented on DIRMINA-831:
-------------------------------------------

I can confirm this behavior, with both 2.0.2 and 2.0.3. The sockets can be seen 
from netstat /a

  TCP    niklas-winxp2:1050     localhost:1051         TIME_WAIT
  TCP    niklas-winxp2:1052     localhost:1053         TIME_WAIT
  TCP    niklas-winxp2:1054     localhost:1055         TIME_WAIT
  TCP    niklas-winxp2:1056     localhost:1057         ESTABLISHED
  TCP    niklas-winxp2:1057     localhost:1056         ESTABLISHED
  TCP    niklas-winxp2:1058     localhost:1059         ESTABLISHED
  TCP    niklas-winxp2:1059     localhost:1058         ESTABLISHED
  TCP    niklas-winxp2:1060     localhost:1061         ESTABLISHED
  TCP    niklas-winxp2:1061     localhost:1060         ESTABLISHED

And, as shown in the video, they occur when the connector is created and the 
established sockets gets closed as soon as the connector is disposed.

On OS X, I don't see this behavior.

> 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

Reply via email to