The Client closes the connection.  The server is a jabber server and i have
no control there.  I am only doing the client side.

Jannie

On 6/7/07, Trustin Lee <[EMAIL PROTECTED]> wrote:

Hi Jannie,

On 6/7/07, Jannie Pieterse <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using MINA 1.1.0.  I am creating connections from a windows
> system to a Linux box.
>
> I open and close a lot of connections for the windows to the linux.
> After a while i run out of sockets on the windows system and i get the
> following exception when i do a getSession() on the ConnectFuture that
> was returned form the connect function call.
>
> ERROR XmppClient: org.apache.mina.common.RuntimeIOException: Failed to
> get the session.
> org.apache.mina.common.RuntimeIOException: Failed to get the session.
>         at
org.apache.mina.common.support.DefaultConnectFuture.getSession(
DefaultConnectFuture.java:62)
>         at za.co.mxit.xmpp.nio.XmppClient$XmppCf.operationComplete(
XmppClient.java:1289)
>         at
org.apache.mina.common.support.DefaultIoFuture.notifyListeners(
DefaultIoFuture.java:162)
>         at org.apache.mina.common.support.DefaultIoFuture.setValue(
DefaultIoFuture.java:121)
>         at
org.apache.mina.common.support.DefaultConnectFuture.setException(
DefaultConnectFuture.java:82)
>         at
org.apache.mina.transport.socket.nio.SocketConnector.processSessions(
SocketConnector.java:295)
>         at
org.apache.mina.transport.socket.nio.SocketConnector.access$900(
SocketConnector.java:53)
>         at
org.apache.mina.transport.socket.nio.SocketConnector$Worker.run(
SocketConnector.java:395)
>         at org.apache.mina.util.NamePreservingRunnable.run(
NamePreservingRunnable.java:43)
>         at java.lang.Thread.run(Thread.java:595)
> Caused by: java.net.BindException: Address already in use: no further
> information
>         at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>         at sun.nio.ch.SocketChannelImpl.finishConnect(
SocketChannelImpl.java:527)
>         at
org.apache.mina.transport.socket.nio.SocketConnector.processSessions(
SocketConnector.java:289)
>         ... 4 more
>
>
> Now if i go look at the socket connections on the windows system there
> are a lot of them in the following state, "Waiting for close", and on
> the linux box the socket connections are in state, FIN_WAIT2
> (Connection is closed, and the socket is waiting for a shutdown from
> the remote end).
>
> Is there a way to close the session faster or is this just a windows
thing.
> In the SocketConnector config i set the following,
> cfgConnector.setConnectTimeout(4), is this cause my problem?

Which end is closing the connection?  If the client closes the
connection, please try to change it so the server closes the
connection.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to