CSV参数化有什么缺陷?在哪里可以体验到?
CSV有一个特性,比如数据用完,我们一般默认重头开始,重新取数据
CSV里面其中一个配置项:Recy cle on EOF(遇到文件结束符再次循环,取到最后一个值时,再取值就重头开始),这就是最好的说明!!
缺陷就是,不能从中间取值,都是只能先读第一行
这种缺陷体验在,如果在分布式的压力机中,运行CSV就会有bug,好比如一个登陆账号,每台压力机都运行这个CSV的脚本,可能就是,登陆,退出,登陆,退出
JDBC请求报错Variable Name must not be null in JDBC Request
JDBC jar包下载连接:https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.16
SQLite JDBC jar包下载连接:https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
Variable Name must not be null in JDBC Request
因为JDBC Connection Configuration,有设置连接池的变量名称,使用JDBC请求是没有填写连接池名称时,JDBC Request发出报错提示;
只需要填写好正确的变量名称即可
助攻机tar包和zip包要注意的事项,文件夹的执行权限
直接下载官方的tar包文件上传到linux下是有执行权限的,如果使用的是windows自己打的zip包,上传并解压完毕后需要给bin文件赋予执行权限
[root@centos7 bin]# chmod +x *
如果遇到以下问题,请仔细排查
unzip apache-jmeter-5.3-slave.zip
-bash: unzip: 未找到命令需要按钮unzip的插件
直接使用以下命令安装 zip、unzip插件
查询以安装过的插件
yum list | grep unzip
显示空就是没有安装,按照以下命令进行安装
yum install zip
Is this ok [y/d/N]: y
yum install unzip
Is this ok [y/d/N]: y
JMeter分布式主机假死解决办法、分布式测试主控机卡死、主控机没有反应、主控机几分钟后才有反应、分布式启动后假死
主控机、控制机(master,controller),这里只是叫法不同,这里先用master:主控机,控制其他机器
助攻机,压力机,奴隶机(slave),这里只是叫法不同,这里先用slave:助攻机,等待被控制的机器
在master机,点击run-temote start 192.168.1.123:1099,出现jmeter GUI界面假死状态,点什么也没有反应,同时左上角的时间没有任何变化
1. 检查jmeter.log查看jmeter日志记录,发现报错:
java.lang.IllegalStateException: Engine is busy - please try later
同时jmeter GUI界面返回Engine is busy - please try later
检查日志中连接助力机的请求ip地址没有发现错误,192.168.1.216:4099
2022-09-06 02:33:58,030 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[]
2022-09-06 02:33:58,031 ERROR o.a.j.e.DistributedRunner: The following remote engines have not started:[192.168.1.216:4099]
2022-09-06 02:34:04,987 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 192.168.1.216:4099
2022-09-06 02:34:04,987 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:04,989 INFO o.a.j.e.DistributedRunner: Starting distributed test with remote engines: [192.168.1.216:4099] @ Tue Sep 06 02:34:04 CST 2022 (1662402844989)
2022-09-06 02:34:04,989 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2022-09-06 02:34:04,990 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:04,990 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:04,990 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:04,990 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:05,007 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:05,007 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:05,007 INFO o.a.j.s.StandardSampleSender: Using StandardSampleSender for this test run
2022-09-06 02:34:05,007 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:05,007 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2022-09-06 02:34:05,008 INFO o.a.j.s.StandardSampleSender: Using StandardSampleSender for this test run
2022-09-06 02:36:12,248 ERROR o.a.j.e.ClientJMeterEngine: Error in rconfigure() method
java.lang.IllegalStateException: Engine is busy - please try later
at org.apache.jmeter.engine.RemoteJMeterEngineImpl.rconfigure(RemoteJMeterEngineImpl.java:144) ~[ApacheJMeter_core.jar:5.3]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) ~[?:1.8.0_121]
at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[?:1.8.0_121]
at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[?:1.8.0_121]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688) ~[?:1.8.0_121]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687) ~[?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_121]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_121]
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source) ~[?:1.8.0_121]
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) ~[?:1.8.0_121]
at sun.rmi.server.UnicastRef.invoke(Unknown Source) ~[?:1.8.0_121]
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source) ~[?:1.8.0_121]
at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source) ~[?:1.8.0_121]
at com.sun.proxy.$Proxy21.rconfigure(Unknown Source) ~[?:?]
at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:152) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:134) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.RemoteStart.doAction(RemoteStart.java:80) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.3]
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.3]
at java.awt.event.InvocationEvent.dispatch(Unknown Source) [?:1.8.0_121]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_121]
at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_121]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_121]
at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_121]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_121]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_121]
at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_121]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_121]
at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_121]
2022-09-06 02:36:27,246 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[]
2022-09-06 02:36:27,246 ERROR o.a.j.e.DistributedRunner: The following remote engines have not started:[192.168.1.216:4099]
查看助力机服务器连接情况,发现slave有收到从master发了的执行测试计划请求:Starting the test on host 192.168.1.216:4099 @ Tue Sep 06 03:05:18 CST 2022 (1662404718240)
slave机接收情况
2.检查master、slave机参数配置
检查slave机,参数配置文件,jmeter.properties
server_port(助攻机端口)无异常
server.rmi.port(默认)无异常
server.rmi.ssl.disable=true(不使用SSL加密)无异常
检查master机,参数配置文件,jmeter.properties
remote_hosts(助攻机ip)无异常
server.rmi.ssl.disable=true(不使用SSL加密)无异常
mode=Standard(开启)无异常
3.检查所有机器防火墙问题,关闭或停止所有防火墙
linux:systemctl stop firewalld.service
Win10:将防火墙关闭逐个逐个试试
以上还是徒劳无功啊,还需要继续排查,这里还需要更耐心一点、更细致一点
4.检查服务器网络配置(这里使用虚拟机)
虚拟机网络状态正常,均是桥接,物理网卡
** 5.尝试在master机win10,查询ip地址:ipconfig**
发现既有虚拟机网络,还有物理机网络
突破口就是master机,是用哪一个ip向slave机发起请求的呢?
到了这一步就很明显了,如果不同网段ip根本无法访问的,唯一解决方法master机与slave机同网络
** 6.设置jmeter主控机master机,ip地址是唯一一个的**
win10:网络和internet-以太网-更改适配器选项-VirtualBox Host-Only Network,右键-禁用
7.重启主控机的jmeter,重新向助攻机发起请求测试计划
slave机秒收到请求,master机没有假死,没有报错
JMeter分布式测试报错“Engine is busy – please try later”
java.lang.IllegalStateException: Engine is busy - please try later
1.检查master机(主控机,控制机)网络ip断
2.如果是虚拟机的话,禁用虚拟机网络
3.可以参考上面 Ctrl+F:jmeter分布式主机假死解决办法
JMeter分布式测试启动服务报错:OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
目前jdk,均为64位,如果服务器线程不足的时候,就会报错,因为根本跑起来,需要提升服务器CPU,下面以虚拟机为例子
CPU个数不要小于2,不然分布式跑不起来了
版权归原作者 Tommy.IT 所有, 如有侵权,请联系我们删除。