Closed asfimport closed 9 years ago
Sebb (migrated from Bugzilla): This does not appear to have anything to do with JMeter.
It does not have an ExtendedResolver class.
Yifan Cai (migrated from Bugzilla): The resolver that DNSCacheManager uses is ExtendedResolver. In its clone() method, clone.resolver = new ExtendedResolver(); I do not find any instantiation anywhere else. So I guess this is where the resolver got assigned. The ExtendedResolver is from dnsjava lib. It is mentioned that "Custom DNS resolver(from dnsjava library) will be used."
Please consider it again.
(In reply to Sebb from comment 1)
This does not appear to have anything to do with JMeter.
It does not have an ExtendedResolver class.
Sebb (migrated from Bugzilla): Ah, I see now.
@FSchumacher (migrated from Bugzilla): By using the constructor ExtendedResolver(String[]) we should be ignoring the contents of /etc/resolv.conf or similar things.
Two thing the attached patch solves:
Created attachment 0001-Use-only-configured-DNS-Servers.patch: Use only the configured DNS servers
@milamberspace (migrated from Bugzilla):
Patch looks good, except the AL header on TestDNSCacheManager file.
I have uploaded the same patch with some formatting and the AL.
@felix, you can committing on the SVN (don't forget to add the bug record in changes.xml)
@milamberspace (migrated from Bugzilla): Created attachment dns.patch: Update patch v2
@FSchumacher (migrated from Bugzilla): Date: Sat Jan 24 19:51:20 2015 New Revision: 1654575
URL: http://svn.apache.org/r1654575 Log: https://github.com/apache/jmeter/issues/3515 - Use only the user listed DNS Servers, when "use custom DNS resolver" option is enabled. https://github.com/apache/jmeter/issues/3515
Added: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/DNSCacheManager.java jmeter/trunk/xdocs/changes.xml
Sean Chang (migrated from Bugzilla): Is this fix merged to 3.0 or 3.1? I found I could not use custom DNS on 3.0 and 3.1.
@pmouawad (migrated from Bugzilla): Hello, It is merged since 3.0 Can you attach your test plan , put jmeter in debug. and attacj jmeter.log ? Are you using http client implementation ? without any 3rd part plugin ? Thanks
Sean Chang (migrated from Bugzilla): I'm not sure if I'm using any third party plugin because I got this test plan from other guy. In DNS Cache Manager, 20.0.118.11 is not the right DNS server. I tried to use a wrong one, but found Jmeter will still use system DNS - the right one.
Created attachment Sean_A_Rio2_Case10_2billion.fill_w_swift.jmx: test plan
Sean Chang (migrated from Bugzilla): I only open log_level.jmeter.protocol.http.proxy.HttpRequestHdr=DEBUG and log_level.jmeter.report=DEBUG in user.properties, not sure if the log fit your debug requirement.
Created attachment jmeter.log: jmeter.log
Sean Chang (migrated from Bugzilla): I'm using httpclient4 implementation, this test plan do work for custom DNS on JMeter 2.13
@pmouawad (migrated from Bugzilla): Thanks for provided information. I see you're using 3rd party plugins (Ultimate Thread Group). Can you tell what jars you have in jmeter/lib folder and jmeter/lib/ext ?
Also , could you provide a simple test plan with only regular Thread Group and the minimal elements to reproduce your issue ? Thank you
@pmouawad (migrated from Bugzilla): Hello, It's ok, I reproduced. I'll create a dedicated bug as it is a regression introduced in 3.0
Thanks for report
Yifan Cai (Bug 57447): The "use custom DNS resolver" option means ONLY use the DNS severs add to the list in the DNS Manager component. In the Unix environment, the behavior is not as described (not tried in other OSs, but from the view of the code, I think, the other OSs have the same issue). It will read in the DNS servers specified in the /etc/resolv.config file first, then add the DNS servers from the DNS Manager list.
The reason, I believe, is because that ExtendedResolver, which is used by DNS Manager, reads in the system DNS settings first, when instantiating.
public ExtendedResolver() throws UnknownHostException { init(); String[] servers = ResolverConfig.getCurrentConfig().servers(); if (servers != null) { for (int i = 0; i < servers.length; i++) { Resolver r = new SimpleResolver(servers[i]); r.setTimeout(5); this.resolvers.add(r); } } else { this.resolvers.add(new SimpleResolver()); } }
Please correct me, if I have a misunderstanding on how "custom DNS resolvers" should work.
Severity: normal OS: All