Symptom:
During performance testing, the dual Nic is configured on the server, and the four NICs are configured on the Windows client. The network interfaces are isolated from the Intranet and Internet, which leads to connection failure when jmeter is used for distributed testing.
Cause analysis:
Jmeter uses RMI for remote calls. When the RMI service is enabled, if the server has multiple NICs, it only uses any of them. By default, as a result, jmeter controller and Agent machines are not in the same network segment and cannot communicate with each other, resulting in failure.
Solution:
To enable the RMI service on a server with multiple NICs, you must specify an IP address so that they can be in the same network segment.
The following steps are required (assuming that all machines are in the 10.120.11. * network segment, the agent server is Linux, and the Controller server is Windows ):
1. Modify the agent server and specify the IP address of the agent machine.
Modify the jmeter-Server File
# Vi jmeter-Server
Modify rmi_host_def =-djava. RMI. server. hostname = 10.120.11.82
2. Modify the server and specify the IP address of the server.
Modify the jmeter. BAT file
Added set rmi_host =-djava. RMI. server. hostname = 10.120.11.214.
Modify set ARGs = % dump % heap % new % tenant vor % tenuring % perm % ddraw % rmi_host %
After modification, restart
[Performance Test] jmeter pitfalls (1) -- how to correctly connect to multiple NICs