commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: httpclient local address trouble
Date Thu, 09 Dec 2004 09:19:18 GMT
Eric,
I messed quite a bit with HostConfiguration just shortly before 3.0b1,
so some bugs may have crept in. File a bug report and I'll take it from
there

Oleg

On Wed, Dec 08, 2004 at 02:51:14PM -0500, Eric Renouf wrote:
> Not so fast I guess.  The problem seems to come and go with the following change:
> 
> /*
>         MultiThreadedHttpConnectionManager manager = new
> MultiThreadedHttpConnectionManager();
>         HttpConnectionManagerParams p = manager.getParams();
>         p.setDefaultMaxConnectionsPerHost(100);
>         p.setMaxTotalConnections(100);
>         p.setConnectionTimeout(5000);
>         manager.setParams(p);
>         manager.closeIdleConnections(5000);
>         browser = new HttpClient(manager);
>  */
>         browser = new HttpClient(new MultiThreadedHttpConnectionManager());
> 
> When I uncomment the commented out section and comment out the last line the IPs
> go back to being just the default, but when I have it as is, I get the IPs I
> want to see.  Am I doing something wrong here?
> 
> Eric
> 
> Quoting Oleg Kalnichevski <olegk@apache.org>:
> 
> > Eric,
> > 
> > Do not give up on us too soon. Please file a bug report for this problem
> > and I'll try to get it fixed this weekend or sometime next week
> > 
> > Oleg
> > 
> > On Wed, 2004-12-08 at 10:58 -0500, Eric Renouf wrote:
> > > If I downgrade to HttpClient 2.0.2 then it seems to work just fine with
> > JDK
> > > 1.5.0.  I guess I'll just go with that as the solution for now.  Thanks a
> > lot
> > > for your time everyone.
> > > 
> > > Eric
> > > 
> > > Quoting Oleg Kalnichevski <olegk@apache.org>:
> > > 
> > > > Eric,
> > > > 
> > > > Do you know if this has ever worked with HttpClient 2.0.x and/or JRE
> > > > 1.4.2?
> > > > 
> > > > Oleg
> > > > 
> > > > 
> > > > On Mon, 2004-12-06 at 19:43 -0500, Eric Renouf wrote:
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I'm trying to setup an application that will run a bunch of
> > HttpClient's
> > > > from
> > > > > the same machine, simulating a bunch of different "real" users. 
One
> > thing
> > > > that
> > > > > would make the more real is to have them coming from different IP
> > > > addresses,
> > > > > which are all aliased on the machine already.  I tried creating an
> > > > > HostConfiguration object and calling
> > > > > hostConf.setLocalAddress(InetAddress.getByName(ip)); for each IP.

> > > > Sometimes
> > > > > this seems to work, but sometimes not.  When I watch the Apache logs
> > I'll
> > > > > sometimes see the IPs that I'm trying to use but more often than
not I
> > see
> > > > the
> > > > > default address for the host.  The line above does not raise an
> > exception,
> > > > and
> > > > > if I call hostConf.getLocalAddress later it gives me the IP back
(with
> > a /
> > > > in
> > > > > front of it).
> > > > > 
> > > > > I try both calling the setHostConfiguration on the HttpClient object
> > and
> > > > also
> > > > > passing it in when I call executeMethod (GetMethod only being used).

> > I'm
> > > > using
> > > > > the commons-httpclient-3.0-beta1 package.
> > > > > 
> > > > > Can someone help point me in the direction for what I can do to figure
> > out
> > > > what
> > > > > I'm doing wrong here?  I've tried googling "httpclient local address"
> > and
> > > > tried
> > > > > similar searches through the mailing list archives but haven't found
> > > > anything
> > > > > too promising yet.  Any help would be very much appreciated.
> > > > > 
> > > > > Eric
> > > > > ___________________________________________________________
> > > > > This mail sent using ToadMail -- Web based e-mail @ ToadNet
> > > > > 
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > > > > 
> > > > 
> > > > 
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > > > 
> > > 
> > > 
> > > 
> > > ___________________________________________________________
> > > This mail sent using ToadMail -- Web based e-mail @ ToadNet
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> > 
> 
> 
> 
> ___________________________________________________________
> This mail sent using ToadMail -- Web based e-mail @ ToadNet
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 

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


Mime
View raw message