Urgent problem.!_NEWLINE_!!_NEWLINE_!java.net.BindException: Address in use: connect
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   leon_zhu
Posted On:   Tuesday, June 18, 2002 02:53 AM

With Tomcat4.0.3, client (50 threads) connect server, and each client thread repeats about 80 connections sequently. In the beginning, client thread can run well. But after a monment, client threw the following exception: java.net.BindException: Address in use: connect at java.net.PlainSocketImpl.socketConnect(N ative Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120) at java.net.Socket. (Socket.java:273) at java.net.Socket. (Socket.java:100) at org.apache.commons.httpclient.HttpConnec   More>>

With Tomcat4.0.3, client (50 threads) connect server, and each client thread repeats about 80 connections sequently. In the beginning, client thread can run well. But after a monment, client threw the following exception:


java.net.BindException: Address in use: connect

at java.net.PlainSocketImpl.socketConnect(N
ative Method)

at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)

at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)

at java.net.Socket. (Socket.java:273)

at java.net.Socket. (Socket.java:100)

at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:286)

at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:466)


I used "netstat -nap TCP" and found there are about 4500 entries, with status "TIME_WAIT". I wonder if client thread ran off all availalbe ports? But i learned that the maximum number of port is 64K.

Anyone knows the reason?


Thanks.    <<Less
About | Sitemap | Contact