jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Lin <wool...@gmail.com>
Subject Re: Bug? Jmeter only tries one addr in multi-addr DNS round robin cluster
Date Sat, 20 Nov 2004 01:05:46 GMT
hmmm, I'm just guessing here. First to make sure i understand.

1. you can verify your DNS returns random IP in the cluster
2. when a tomcat instance is shut down jmeter hangs. this supports the
idea that jmeter is using the same IP
3. restarting jmeter or tomcat doesn't appear to make JMeter go to
random server in the cluster

I can think of a couple ways to verify if it is the JVM caching the IP
is causing it.  Write a simple class to get the IP address 100 times
and see which IP it resolves to. It may very well be that the JVM
isn't flushing out the old IP and is instead just using the old one.

I take it your test plan points to something like cluster.mydomain.com.

peter



On Fri, 19 Nov 2004 19:53:37 -0500, Chris Shenton
<chris.shenton@hq.nasa.gov> wrote:
> Paul Leclerc <pleclerc@gmail.com> writes:
> 
> > Don't forget that by default, Java caches IP addresses for DNS
> > lookups.  See this link for more information:
> > http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html and
> > look at both networkaddress.cache.ttl and sun.net.inetaddr.ttl
> 
> That looked very promising but it doesn't seem to be helping.
> In $JAVA_HOME/jre/lib/security.java.security I set
> 
>   networkaddress.cache.ttl=1
> 
> and see it querying my dnscache often, whereas before it queried it
> only once. That's good. However, it's only trying one of the addresses
> in DNS for that name.
> 
> The name I configure jmeter to test is "cluster" which evaluates to
> two different IPs both with 1s TTL; I have it use 5 threads, and loop
> 5 times, with a 30-second ramp-up-time.  I do see my DNS being queried
> repeatedly for that name, but jmeter only hitting one.
> 
> Interestingly, quitting and re-running the "jmeter" startup script has
> no effect: it keeps returning to the same target host address.  My
> dnscache is documented to return a list of addresses in random order
> for each query. The law of probabilities says it should get them both
> 50% of the time, this is about 10 out of 10 times it gets the same
> one. (Is it suspicious it's the lower of the two addrs?).
> 
> Also, if I shut down the tomcat on the target it's picked, jmeter
> appears to hang. Is it not written to try other addresses in the list
> of addresses it got for the target's name?  I don't have the code here
> to look.  Perhaps this wasn't a design goal.
> 
> Any thoughts? I can't test the robustness of my tomcat-4 session
> clustering if my test tools won't try alternate addresses.
> 
> Thanks again.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message