I am using https:///path to send the queries from Jmeter to the application.
The FQDN is configured with 2 IPs.
I need to know, to which IP my FQDN is resolved for each sample.
Can we get the IP to which FQDN is resolved in JMeter listner?
If your server doesn't return its IP address in the response headers or body - you won't be able to get it from the "lisnter" (whatever it is)
However you can get this information from jmeter.log file if you:
Add DNS Cache Manager to your test plan
Enable debug logging for it by adding the next line to log4j2.xml file:
<Logger name="org.apache.jmeter.protocol.http.control.DNSCacheManager" level="debug" />
This way you will be able to see what are underlying IP addresses behind the system under test domain name
Anyway you will need to add the DNS Cache Manager (or at least disable DNS caching) otherwise you will always be hitting only one IP address which will be cached on JVM level.
Related
I am trying to build a new DNS, which will act as a proxy for certain domain names and uses a public DNS as upstream.
My understanding of DNS:
Client asks DNS (x.x.x.x) about example.com
DNS will look up inside its zones (or parent and root) and find example.com can be found at i.i.i.i
DNS will send i.i.i.i to the client.
Now, client asks the ip address of restricted.test and DNS server knows it is a restricted website, so instead of giving the direct ip to the website, it gives it's own proxy address p.p.p.p to the client.
Please correct me if I'm wrong till now, but when the client tries to connect to p.p.p.p how the proxy server knows which website the client wants to go in?
I really want to know how these work under the hood
Thanks in advance.
This mechanism you are asking about is the Proxy Auto-Configuration (PAC) file.
Read more about it here :
https://developer.mozilla.org/en-US/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file
And here :
https://www.websense.com/content/support/library/web/v76/pac_file_best_practices/PAC_explained.aspx
Essentially in corporate networks, a PAC file is pushed out to every computer, and browser settings are also configured to enable the PAC file. But it can also be done manually. Just check your browser proxy settings to see the location of the PAC file it is pointed to.
How does JMeter determine what subnet it is on ?? I don't see a subnetMask property in the jmeter property file.
My client is on x.y.76.54, my server is on x.y.77.75. The subnet mask is 255.255.254.0
Technically, these two IPs are on the same subnet. I am seeing a "connection refused" response from the Server. Firewalls are off. Should JMeter be able to handle the ip's as provided above ?
JMeter relies on your operating system network settings, given both hosts are able to "see" each other - JMeter will be able to do this as well.
Your setup assumes hosts from x.y.76.1 to x.y.77.254 so it's a valid use case, you can double check it using i.e. Online IP Subnet Calculator
It's hard to say what exactly is wrong without seeing how you're launching JMeter master and slave and log files for both, RMI properties like client.rmi.localport, server.rmi.localport, java.rmi.server.hostname property, etc.
It might also be the case JMeter is trying to use IPv6 addresses so it might worth trying setting java.net.preferIPv4Stack property to true
See How to Perform Distributed Testing in JMeter article for more details and if you will be still experiencing problems consider providing more information on the above points.
I am working on FTP Sampler and connecting with Public FTP Server
"ftp.swfwmd.state.fl.us" for "Get" method.
But JMeter is showing following error in LOG:
Response code: 000 Response message: java.net.UnknownHostException:
ftp.swfwmd.state.fl.us
Please help me out in this problem.
The message indicate host is not known from your machine.
So check your DNS or add manually an entry in your DNS.
Try accessing the server using IP address instead of hostname - 204.76.241.31
If point 1 doesn't help most probably you are sitting behind corporate firewall. For HTTP-based samplers you can specify proxy server details by adding the next lines to system.properties file (lives in "bin" folder of your JMeter installation)
ftp.proxyHost=hostname or IP address of your proxy
ftp.proxyPort=port of your proxy server
if above doesn't help you can try setting the following properties instead:
socksProxyHost=hostname or IP address of your proxy
socksProxyPort=port of your proxy server (normally 1080)
JMeter restart will be required to pick the properties up
References:
Java Networking Properties
Configuring JMeter
Load Testing FTP and SFTP Servers Using JMeter
I made this entry in my C:\windows\system32\drivers\etc\hosts file:
convert2mp3.net convert2mp3.com
so that my browser always calls convert2mp3.net instead of convert2mp3.com if i accidentially call convert2mp3.com
But it does not work. I also flushed the DNS cache by executing ipconfig /flushdns in the CMD. I also tried to use another browser but still no redirect.
What am I doing wrong?
The /etc/host file is used to force the resolution of a domain to a specified IP Address. Your line is missing the ip Address help for win7
It should be:
127.0.0.1 mywebsite
You cannot change DNS names like that, especially not in an HTTP context.
So the problem is you sometimes type a .com address in your browser where the site you want to go to actually is at the same address - only ending in ".net".
Even if you could change the hosts file to let the .com address point to the .net server's address, the request is likely to return an error, because their server isn't configured to handle requests to the .com address, which your browser will still send as a host header.
So create a bookmark in your browser and click that, instead of typing DNS addresses yourself if you're making that mistake that often.
Is there any difference between the following when a intranet URL in accessed in IE
Add an entry in drivers/etc/host file for a name and IP
vs
Use IP directly
e.g. it works with the following link if I have a host entry as (XYZ 10.0.10.200)
http://XYZ/SiteDirectory/ABC/Default.aspx
but when I tried to use IP instead of name
http://10.0.10.200/SiteDirectory/ABC/Default.aspx
It gives me 404 not found error
Yes, there's a difference.
The web server is using HTTP/1.1 and "shared virtual hosting". When the client connects it sends an additional Host: header which contains the hostname part of the URL that the user supplied.
The web server looks at the header to find out which virtual host's data to serve.
In this case, the web server is configured to recognise and serve content from the "XYZ" domain, but doesn't know about any domain called 10.0.10.200
Smells like the webserver is using virtual hosts, so that it serves different pages if the client went to "www.foo.com" or "www.bar.com", even though they have the same IP-address.
As far as I can see there should be no difference. With a host name the order is hosts file before DNS so it should be used.
Is there another line in the host file with the same hostname?
What happens when you do a tacert? (trace route)