JMeter SubNet issue - jmeter

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.

Related

Client Server Logs Shows Public IP instead of Spoof IP in Jmeter

As the title says, I have been tasked to do Load and Performance Testing on a Client's Server, I have followed all steps, made additional IPs and added it to the system, and entered the same IPs in Jmeter using CSV dataset, and Debug Postproccessor shows that the request is being sent with the correct IPs. I am doing this over wifi, so hopefully that isn't the issue.
Any help is appreciated.
System config
OS: Windows 10 64 bit
Ram: 16gb
Jmeter Version 5.4.3
It may easily happen if you're behind NAT and the server is in the Internet, in that case no matter what is your local IP address(es), the server will "see" only the address of your NAT gateway, you can check yourself using websites like https://www.whatismyip.com/
The trick with local IP addresses (or aliases) will succeed only in case of local intranet, when it comes to Internet - you will need to have as many global static IP addresses as many users you're trying to simulate.
One of the possible solutions is kicking off virtual machines in AWS or Azure or similar service or asking your ISP to provide you a pool of IP addresses you could use (normally you will need to pay for this) and go for distributed testing so each JMeter slave would have its own IP address (or several) to bind.

How to set up Distributed Jmeter on AWS with Windows

I am trying to set up my JMeter master/slave set up on AWS EC2 instances using windows. Out of the box integration didn't work (connection refused errors) and after some investigation I got to know that RMI communication only works if the machines are on same subnet (is this true?). I found this great article and I tried to follow it as is on windows (tried running ssh port forward tunneling via cygwin) but not have any luck. So I was hoping if someone already done this with Windows and can share their experience.
Out of the box integration didn't work (connection refused errors) and
after some investigation I got to know that RMI communication only
works if the machines are on same subnet (is this true?)
It is not necessary. Even if the machines are in a different subnet and addressable via the network, RMI should work. Here make sure the Security Groups and NACLs are properly set so that both EC2 instances can communicate with each other via the network.
You can check whether you can ping(For this you need to enable ICMP in your Security Groups and also make sure other needed ports are opened for RMI) from one EC2 instance to another. If the servers can communicate with each other, then you need to troubleshoot internal firewall configuration in windows EC2 instances.
We have used https://testable.io/ AMI's from the marketplace. It takes care of all configuration and just needs to worry only about testing and the results.
https://aws.amazon.com/marketplace/pp/B073JNTVKP
All our endpoints are secured to certain IP-ranges from testable.io. If you have internal, still you need to setup those security settings.
Hope it helps.

How to add the server name in monitor results Jmeter?

By default when we add monitor results at that time it will not show any host name. How can we add the sever name. Anyone can please explain it.
PerfMon Metrics Collector doesn't do any auto-discovery of Server Agents, you have to specify hostnames or IP addresses of servers you want to monitor manually like:
Click "Add Row" button
Provide server hostname or IP address, port and desired metric
Repeat steps 1 and 2 for all servers you want to monitor
When you start your test you'll be able to see server hostnames or IP addresses in upper-left corner of the generated chart:
See How to Monitor Your Server Health & Performance During a JMeter Load Test guide for end-to-end instructions on setting up server-side performance monitoring in your JMeter test

How to run Jmeter (.jmx) script using multiple IP addresses?

I have written a jmeter script for my web application which runs from single system.
What should i do so that i can run same script from some other IP addresses/systems.
I ran it on other system connected in LAN (REMOTE RUN), but it ran only on that system.
I want to run same script from multiple IPs/Systems. Is there is any setting or update we can do in jmeter so that it will run those script from a bunch of IP addresses?
Or, Can we run jmeter from some browser which uses multiple proxies ?
Thanks in advance.
If your computer is configured to provide several IP addresses on a certain NIC or has different NICs you can tell JMeter which IP address to use for outgoing connections.
Credits for this solution go to blazemeter, the information has been taken from their blog.

Recaptcha IP addresses

Okay, so we implement Recaptcha in production. We get errors because it can't reach the IP address it needs to use the service. We open a port for the IP address to reach Google. No problem. We do that and configure that IP address explicitly to work. It works great. Then, the next day, we start getting errors again because Recaptcha is using a different IP address. I can allow requests from that IP address, too, but now I'm unsettled. Where are these addresses coming from? How do I configure this to work reliably?
Recatpcha from Google can use any Google IP address and there are lots of them.
Ran this from Windows:
_netblocks.google.com text =
nslookup -type=TXT _netblocks.google.com
"v=spf1 ip4:216.239.32.0/19 ip4:64.233.160.0/19 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:209.85.128.0/17 ip4:66.102.0.0/20 ip4:74.125.0.0/16 ip4:64.18.0.0/20 ip4:207.126.144.0/20 ip4:173.194.0.0/16 ?all"
That's all the network Google uses currently. These can change so check them often.
Google suggest allowing port 80 to all IPs outbound, this highly insecure. They recommend going through a proxy server but again that is highly insecure if your web server is an DMZ. Proxy aware trojans do exist. All that need to be done is exploit a vulnerability to execute arbitrary code and you can create reverse connection on port 80 through a proxy server to download the payload. Then it is trivial to escalate privileges and own the box. I don't mean just Windows servers but Linux as well. I've done it in lab environment on security was on. It's really easy to do.
This is the Google website I got this from:
http://code.google.com/p/recaptcha/wiki/FirewallsAndRecaptcha
I wanted to append to this answer with more recent information. The documentation that Chris is pointing to does not include all of the TXT records necessary to dig (thanks Google):
_netblocks2.google.com (IPv6 subnets)
_netblocks3.google.com (Additional IPv4 subnets)
In my particular case, the _netblocks3 entry contained 2 large /19's that made my initial rule ineffective
(I found additional references here: https://support.google.com/a/answer/60764?hl=en)
Perhaps you should be using a hostname rather than IP

Resources