HttpURLConnection problem under solaris 5.8 jdk1.4.2
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   lulu_2000
Posted On:   Tuesday, April 27, 2004 07:08 PM

I wrote a test program to send XML message using http protocol. Now i am using java.net.HttpURLConnection to implement it. But during load test (about 100 requests/sesond), i will get SocketException sometimes. The detail is below java.net.SocketException: Address already in use at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at sun.net.NetworkClient.doConnect(NetworkClient.java:139) at sun.net.www.http.H   More>>

I wrote a test program to send XML message using http protocol. Now i am using java.net.HttpURLConnection to implement it. But during load test (about 100 requests/sesond), i will get SocketException sometimes. The detail is below
java.net.SocketException: Address already in use
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
at sun.net.www.http.HttpClient. (HttpClient.java:306)
at sun.net.www.http.HttpClient. (HttpClient.java:267)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:320)
at sun.net.www.http.HttpClient.New(HttpClient.java:315)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:512)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:489)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:560)


But the load test is ok under window 2000 platform.
help me! it is very urgent.

Lulu

   <<Less
About | Sitemap | Contact