hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bagas" <ba...@indoartha.co.id>
Subject RE: [newbie-question] Port Management for HttpClient
Date Fri, 11 Jun 2004 04:12:28 GMT
What Platform are you on?
Windows XP (but I might change the platform for the real deployment)

And this is the JVM :

java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)


Can you provide a full stack trace please? OK
------------------------------------------------------------------------
---java.net.BindException: Address already in use: connect
        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:426)
        at java.net.Socket.connect(Socket.java:376)
        at java.net.Socket.<init>(Socket.java:291)
        at java.net.Socket.<init>(Socket.java:119)
        at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.crea
teSocket(DefaultProtocolSocketFactory.java:118)
        at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:68
3)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:6
62)
        at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:5
29)
        at gateway.Main$5.run(Main.java:263)
------------------------------------------------------------------------
---

I think if I can allocate the Socket port for HttpClient connection
according to my rule, I will resolve this trouble. Could you tell me how
can I do this?


Thank you very much.

Regards,

Rahmat Bagas Santoso

-----Original Message-----
From: Ortwin Glück [mailto:ortwin.glueck@nose.ch] 
Sent: Thursday, June 10, 2004 6:24 PM
To: Commons HttpClient Project
Subject: Re: [newbie-question] Port Management for HttpClient



bagas wrote:
>  I think using 20 thread
> in the same time means I only use 20 ports (and another 20 ports use
by
> the Webserver) at the same time and there is still a lot of ports in
my
> computer that HttpClient can bind but still HttpClient often throws
> exception because trying to bind already bound Socket. 


Thanks

Ortwin Glück

---------------------------------------------------------------------
To unsubscribe, e-mail:
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
commons-httpclient-dev-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message