[Jmeter] Jmeter Frequently Asked Questions record, continued

[Jmeter] Jmeter Frequently Asked Questions record for ~~~

 

 

 

 

 

1, using the machine load sensing pressure problems may arise:

(1) remote load unit jmeter-server service die, this time need to perform the following operations:

Check the remote service is up: ps -ef | grep jmeter, if you get up, it shows the process ID occupied;

 

If it is confirmed that the process is there, but Rom is a remote service, this time to kill the process jmeter-server is: kill -9 *** (process ID), and then restart the jmeter-server service

 

If the process does not exist, direct start jmeter-server service

 

(2) Remote service start properly, but the use of local jmeter client can not connect to the remote service

This time, you first have to look at your computer is not a dual card, such as laptops built their own wifi sharing, a new virtual machine or VM virtual network card, or use a 360wifi something.

(3)java.net.SocketException: Permission denied: connect;

    Winows resolve the startup configuration file: jmeter.bat, add the following startup parameters: set JVM_ARGS = "- Djava.net.preferIPv4Stack = true"

Description, this problem was looked at for a long time, then finally found a related blog (reference http://www.bubuko.com/infodetail-1278724.html) on Baidu

(4)Jmeter-server启动失败:Cannot start. Unable to get local host IP address. is a loopback address

When this problem every time require large stress tests, assign remote machine, you need to re-deploy the service will always be met, in fact, / etc / hosts file settings do not lead to Jmeter failed to start.

Sure enough, or this problem, paste / etc / hosts Example: 

127.0.0.1       localhost.localdomain localhost

10.20.10.31 higkoo.rdev.company.net higkoo

Run `hostname` view the current machine name if the name does not match the current machine / etc / hosts, then modify the hosts modify your local ip + correct hostname;

 

Note that you can also use the command: ./ jmeter-server -Djava.rmi.server.hostname = 192.168.5.90

(5) jmeter-server on the remote machine can not start, this time, please check the permissions

Use ls -l to see the permissions jmeter-server file under the current circumstances, if there is no executable permissions, you will need to modify the permissions;

chmod 777 jmeter-server (7 represents write, read, execute), where 777 directly to all users (including user group you assigned) plus all the executable permissions. Here yourself about the chmod syntax

 

2, Jmeter use everyday problems

(1) when the test interface parameters for the Chinese problem, the need to switch to UTF-8, such as testing search interface

BeanShell processing request parameters by using the Preprocessor in Chinese transcoding problem, a solution to be found further separate blog (Jmeter Chinese transcoding process using BeanShell problem)

(2) Start jmeter local error or suspended animation during pressure measurement: Java.lang.OutOfMemoryError: PermGen space

Memory overflow

Jmeter.bat modify the file:

        1, HEAP the heap memory, xms, xmx represent memory initialization, the maximum memory heap memory are all stored objects;

        2, NEW represents a stack area, for holding the object reference to the basic data types and custom objects;

        3, PERM representation area, this type of memory used to store the main information and the static information methods, static methods and variables, final labeling constants information.

set HEAP=-Xms512m -Xmx1024m

   set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m

   set SURVIVOR=-XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50%

   set TENURING=-XX:MaxTenuringThreshold=2

   set RMIGC=-Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000

   set PERM=-XX:PermSize=256m -XX:MaxPermSize=512m

 

3, the use of Jmeter test Dubbo interfaces that may arise

 

The jar package Dubbo interface testing services placed under jmeter lib / ext directory, may report spring jar package conflicts when you restart jmeter, which is due to Dubbo engineer related to the introduction of the spring jar package, but also comes with a default Jmeter spring-core-2.5.6.jar package (in the lib directory), so when we test jar into the corresponding directory jmeter restart when jmeter jar package conflicts return spring, so the interface is in use do Dubbo jmeter the test, we need to Jmeter comes with spring-core-2.5.6.jar package removed.

Guess you like

Origin www.cnblogs.com/ceshi168/p/11964100.html