[
https://issues.apache.org/jira/browse/DIRMINA-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025174#comment-13025174
]
Emmanuel Lecharny commented on DIRMINA-831:
-------------------------------------------
I have run the small TestPorts you gave, and did a lsof on the process; but I
can only see 3 TCP connection opened :
...
java 40774 elecharny 5u IPv4 0xffffff8013af3418 0t0 TCP
localhost:53533->localhost:53532 (ESTABLISHED)
...
java 40774 elecharny 37u IPv6 0xffffff800c531b70 0t0 TCP
[::127.0.0.1]:53536->[::127.0.0.1]:53531 (ESTABLISHED)
java 40774 elecharny 38u IPv6 0xffffff8010c5b600 0t0 TCP
localhost:53535->localhost:53534 (TIME_WAIT)
two of them are connections to Eclipse and to Java. The only opened connection
is the one on 127.0.0.1.
FYI, I'm on Mc OSX, but I'm pretty sur that the test would give the very same
result on linux too.
I don't have a window$ machine to test this code, but I don't see MINA opening
more than one TCP connection, after having checked the code.
If you can provide a screenshot of what produces ActivePort, that would be
useful.
> 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
>
> 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