Re: [xSocket-develop] "Address already in use" errors and a question about the connection pool
Status: Inactive
Brought to you by:
grro
|
From: Gregor R. <gre...@go...> - 2007-10-31 16:38:16
|
Hi Christiaan, this could a bug. Please open a bug entry by adding your test code. Gregor 2007/10/31, Christiaan Willemsen <cwi...@te...>: > > Hi there, > > I have a client doing lots of request to a HTTP server, using about 20 > simultaneous connections. I use a while loop to create as many > connections as possible, and if I'm at max, I'll wait until another > connection was closed. This appears to work just fine for a while. > > But then, I start getting these exceptions: > > java.net.BindException: Address already in use: connect > at sun.nio.ch.Net.connect(Native Method) > at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java > :507) > at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:81) > at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:65) > at org.xsocket.stream.io.impl.IoProvider.openSocket( > IoProvider.java:356) > at > org.xsocket.stream.io.impl.IoProvider.createClientIoHandler( > IoProvider.java:219) > at org.xsocket.stream.Connection.<init>(Connection.java:162) > at > org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection.java > :396) > at > org.xsocket.stream.NonBlockingConnection.<init>(NonBlockingConnection.java > :154) > > They occur in the constructor of connection NonBlockingConnection. This > happens with 1.2 and 1.2.1 > > Also, this started occurring after I implemented onConnect, instead of > sending the http POST data right after the construction of the > NonBlockingConnection. Mostly, the second time I try to create the > connection, it works, but this should not be happening I guess... > > So, what's the problem here? It looks like someone is trying to bind a > socket to a local tcp port that is already taken fore some reason. > > Kind regards, > > Christiaan Willemsen > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > xSocket-develop mailing list > xSo...@li... > https://lists.sourceforge.net/lists/listinfo/xsocket-develop > |