Jmeter分布式压测常见问题

章节十 高级篇之Jmeter压测课程总结和架构浅析

35、课程总结和关于系统架构,推荐学习资料

               简介:讲解测试人员的基础技能,系统架构知识,相关推荐书籍,课程总结等

                        配置元件=》前置处理器=》定时器=》采样器=》后置处理器=》断言=》监听器

                        安装常见问题

                            1、问题

                                        [root@iZwz95j86y235aroi85ht0Z bin]# ./jmeter-server

                                        Created remote object: UnicastServerRef2 [liveRef: [endpoint:[:39308](local),objID:[24e78a63:16243c70661:-7fff, 7492480871343944173]]]

                                        Server failed to start: java.rmi.RemoteException: Cannot start. Unable to get local host IP address.; nested exception is:

                                        java.net.UnknownHostException: iZwz95j86y235aroi85ht0Z: iZwz95j86y235aroi85ht0Z: Name or service not known

                                        An error occurred: Cannot start. Unable to get local host IP address.; nested exception is:

                                        java.net.UnknownHostException: iZwz95j86y235aroi85ht0Z: iZwz95j86y235aroi85ht0Z: Name or service not known

                                        解决:

                                                    hostname  命令获取机器名称,追加一个映射  iZwz95j86y235aroi85ht0Z

                                                    vim /etc/hosts

                                                            127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4

                                                             ::1        localhost localhost.localdomain localhost6 localhost6.localdomain6

                                                             120.79.160.143 iZwz95j86y235aroi85ht0Z

                                                                windows用户 修改c:\windows\system32\drivers\etc\hosts文件,增加一条域名 与IP的映射

                               2、问题

                                            [root@iZwz95j86y235aroi85ht0Z bin]# ./jmeter-server

                                            Server failed to start: java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:

                                            java.io.FileNotFoundException: rmi_keystore.jks (No such file or directory)

                                            An error occurred: Listen failed on port: 0; nested exception is:

                                            java.io.FileNotFoundException: rmi_keystore.jks (No such file or directory)

                                      解决:

                                              拥有RMI over SSL的有效密钥库,或者禁用了SSL。

                                              1、禁用SSL

                                                      jmeter.property里面 server.rmi.ssl.disable 改为 true,表示禁用

                                3、问题:

                                            [root@iZ949uw2xehZ bin]# ./jmeter

                                            Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000c0000000, 1073741824, 0) failed; error='Cannot allocate memory' (errno=12)

                                             #

                                            # There is insufficient memory for the Java Runtime Environment to continue.

                                            # Native memory allocation (mmap) failed to map 1073741824 bytes for committing reserved memory.

                                            # An error report file with more information is saved as:

                                            # /usr/local/jmeter/apache-jmeter-4.0/bin/hs_err_pid5855.log

                                        解决:

                                                        编辑jmeter

                                                        搜索 : "${HEAP:="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m"}"

                                                        改变初始堆内存和最大堆内存

                                4、仅修改 server_port 即可,下面两者一样

                                            server.rmi.localport=8899 表示slave server启动显示的端口

                                            server_port=8899  表示master机器要远程连接的端口  即 remote_hosts=xxxx:8899

                                5、

                                                

                                                我们要在多网卡的服务器上开启RMI服务的话必须指定IP,使他们能够在同一个网段内。

                                                需要以下几步(假定所有机器都在10.120.11.*网段,agent服务器为linux,controller服务器为windows):

                                                1、 修改agent服务器,指定agent机器的IP

                                                            修改jmeter-server文件

                                                            # vi jmeter-server

                                                            修改RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.xxx(需要连接的IP)

                                                 2、修改server服务器,指定server机器的IP

                                                                修改jmeter.bat文件

                                                                新增set rmi_host=-Djava.rmi.server.hostname=10.120.11.214

                                                                修改set ARGS=%DUMP% %HEAP% %NEW% %SURVIVOR% %TENURING% %PERM% %DDRAW% %rmi_host%

                                    6、确定在controller机器上安装jdk,版本和jmeter一致,配置环境变量:Java_home等

                                                      在Agent机器上安装jdk,配置环境变量:Java_home和JMeter_home

                                                      安装目录不要带空格,最好都是简短的英文路径

                                    7、master机器启动后会拷贝jmx文件到slave机器,所以不需要在每台slave机器上也上传一份jmx,只需要在master机器上上传一份jmx脚本即可。

                                                            如果使用csv进行参数化,则需要把参数文件在每台slave上拷一份且路径需要设置成一样的。

                                                            总样本数 = 线程数 * 循环次数 * 执行机总数

                                     8、连接失败原因排查

                                                    以下步骤进行排查:

                                                               1. jmeter-server是否启动;

                                                                2. 是否联网

                                                                3. ping 服务器IP是否畅通.

                                                                4. telnet 端口 192.168.3.10 1099

                                                                5. 检查服务器的防火墙是否关闭。

                                                                6. 阿里云安全策略是否正常

                                      9、"could not find ApacheJmeter_core.jar"

                                                        解决:在Agent机器安装jdk,并设置环境变量

                                     10、”Bad call to remote host"

                                                        解决:检查被控制机器上的jmeter-server有没有启动,或者remote_hosts的配置是否正确。

  课程介绍:

               亿级流量系列之Jmeter4.x分布式压测实战,2018年新录制采用Jmeter4.0版本,适合想往 中高级开发工程师或者测试工程师发展的人员,从零基础安装到使用

                包含众多核心知识点,聚合报告分析,断言使用,自定义变量,读取CSV或txt多参数压测,JMX脚本讲解,阿里云Linux环境部署,

分布式压测,http接口,mysql数据库压测,html网页压测报告分析 等等;最终项目实战会在阿里云Linux服务器进行压测,真正的生产环境,采用多节点向应用服务器压测,并生成jtl和html可视化测试报告,还有新版本常见问题处理,架构设计等知识点。

授课计划

                课程是2018年4月份新录制,采用jmeter4.x版本,分为28到30节课,会根据同学的需要适当进行补充,核心知识是在阿里云服务器上进行压测,掌握压测报告分析,和分布式压测的知识点

课程目标:

                通过学习该课程,可以掌握jmeter核心知识点,并用于压测接口,可以在Linux服务器上面进行压测,且可以用Jmeter分布式压测模拟高并发情景去压测接口,并可以获取可视化html压测报告进行分析。

                2018年 Jmeter4.0压测视频教程 独家录制

                Jmeter4.0版本实战 阿里云Linux服务器压测实战

                压测http,mysql,断言,自定义参数,聚合报告

                CSV可变参数压测,分布式压测,JMX脚本讲解

                html可视化测试报告讲解,测试瓶颈分析等

                包含详细的学习笔记,专属技术交流群

                csdn 2018年新版本亿级流量系列之Jmeter4.x分布式压测入门到实战

                淘宝 2018年分布式Jmeter视频教程 入门到实战压力测试教程 jmeter4.0新版本

你可能感兴趣的:(Jmeter分布式压测常见问题)