How to deal with the result tree and aggregation report not responding after the Jmeter distributed connection succeeds? (Several common problems, exception handling scheme)

Article directory

  • jmeter distributed steps:
    • Host and Agent Machines
    • Operation mode
  • jmeter distributed common problems and how to deal with them:
    • After the distributed connection is successful, there is no return value when running the proxy machine
    • How to deal with the port being occupied
    • When the amount of concurrency is large, the port is limited
    • Socket closed exception handling method


foreword

           When I studied Jmeter distributed pressure measurement yesterday, I encountered some problems, because these problems bothered me for a day. I searched the Internet for a long time, but the results were not very satisfactory. After going back, I checked the information, and after trying slowly, I finally found some solutions. Let's share it now without saying much.


1. jmeter distributed steps

 Note: The method of downloading jmeter is not explained here. This article mainly deals with common exceptions in jmeterer distribution. If you need to check the installation steps, please go to the previous post ~    Detailed steps to install and download jmeter

 

Distributed principle:

1. During the Jmeter distributed test, select one of them as the controller (Controller), and the other machines as the agent (Agent).

2. When executing, the Controller will send the script to each Agent, and the Agent will start to execute after getting the script. The Agent does not need to start Jmeter when executing, just open the jmeter-server.bat file, which should be through the command line mode to execute.

3. After execution, the Agent will send the result back to the Controller, and the Controller will collect and summarize the information of all Agents.

 

Proxy configuration:

(1) Open Jmeter---bin---jmeter.properties, find "remote_hosts=127.0.0.1, and change this ip to the IP address of the agent itself. You can click win+R and enter ipconfig to view the ip address.

Define the port number. Note that the port number of the agent machine must be set the same as the port number of the host (control machine), otherwise the test cannot be performed.

 

 

(2) Also search and set server.rmi.ssl.disable = true, and open the previous comment

Host (control machine) configuration: here is to add the ip+port numbers of the two proxies. Note that when there are multiple machines, they can be separated by commas. The setting here is similar to that of the proxy machine, except that the control machine needs to gather all the proxy machines.

 

2) Similarly, search and set server.rmi.ssl.disable = true, and open the previous comment

The control machine runs:

Click Jmeter ------ bin ------ jmeter.bat, after opening, click Run, remote start, two addresses appear, which means that you have officially joined the host, and then select one of them Run, view the agent machine interface

 

The proxy machine runs:

Click Jmeter------bin------ jmeter-server.bat This is the interface opened by the proxy machine, note the following, the two lines of code appear when the connection is successful

Case: Here we want to run 1000 users to log in.

The above is just a successful connection, but no data is returned when running, so now let’s take a look at the following problems and solutions~

2. After the distributed connection is successful, there is no return value processing method for running the proxy machine

   The above steps mean that the connection is successful, but the proxy machine does not return data. That is to say, after the host (control machine) sends data, but the proxy machine does not return data, resulting in no data in the result tree and aggregation report

 Solution: The operation is 1000 users login.

Then first of all, the proxy machine needs to put this txt file (it can also be a cvs file, here I use a txt text file) on the same disk as the proxy machine.         

You can see that the path here is D:/... Otherwise, when the jmeter proxy machine is executing, it only sees the host path like this, and it cannot find the same thing in its own disk, and it will report an error.

3. When the amount of concurrency is large, the port is restricted

Solution 1:
Modify the operating system registry
1. cmd input: regedit
2. Find HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters
3. Create a new DWORD value, name: MaxUserPort, value: 65534 (decimal)
4. Restart the system

Solution 2:
Change the HTTP request: to a short link (remove the tick of using keepAlive)

 With both workarounds set, the error percentage of requests can be greatly reduced

Four, socket closed exception handling method

Cause of the problem: Under JMeter, when sending http requests, use keepAlive is generally selected by default. This is the connection protocol. This is checked by default (if it is not checked, it will not be saved), but its configuration JMeter.properties The time setting in the default is logout, that is to say, it will not wait. Once the connection is idle, it will be disconnected immediately, resulting in a transaction failure in our stress test.
 

Solution: Modify httpclient4.idletimeout=<time in ms> and set it to a time that you think is reasonable. Generally, it can be set to 10-60s (meaning that the connection will be disconnected after 10s of idle time). Note that the unit here is ms. After the modification is completed, the pressure test is performed again, and the error is no longer there.

 

Guess you like

Origin blog.csdn.net/qq_44361142/article/details/127087574