1. 问题1:

如果是主控制机是windows,然后jmeter界面操作运行--远程启动报错为:Connection refused to host 192.168.0.111; nested exception is:

java.net.ConnectException:Connection timed out connect 

该错误为连接超时报错了,

 

性能测试分布式压测(4)-linux环境下no-gui分布式压测过程遇到的问题及解决方案

解决方案:

 

 

2. 问题2:

我之前一直以为关闭防火墙的命令是 service iptables stop,但是我一直启动失败,报错如下:

Redirecting to /bin/systemctl stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.

最终发现原因是:centos7开始默认用的是firewalld,这个是基于iptables的,虽然有iptables的核心,但是iptables的服务是没安装的。我的虚拟机安装的是centos7服务器,所以只有firewalld防火墙服务,没有iptables,如果需要用iptables命令需要自己安装。

 

centos7使用firewalld服务

查看防火墙状态:service firewalld status

开启防火墙命令:sudo systemctl start firewalld.service

关闭防火墙命令并禁用这个服务:sudo systemctl stop firewalld.service    sudo systemctl disable firewalld.service


centos7使用iptables服务

先安装iptables服务

#安装sudo yum install iptables-services 

#开启iptables

sudo systemctl enable iptables 

sudo systemctl enable ip6tables 
service iptables start(这条暂时不用)

#启动服务

sudo systemctl start iptables 

sudo systemctl start ip6tables

#查看防火墙状态: service iptables status

#关闭防火墙命令:service iptables stop

 

 

 

3.问题3:

如果你的master主控机是通过打开jmeter界面,点击运行-运行全部-----但是响应结果看不到

解决方案:master主控机的jmeter--bin目录-----vim jmeter.properties-----修改mode=StripperedBath为mode=Standard,直接在后面复制一行进行修改,先不要删除原有的

再次重启jmeter----打开jmeter界面,点击运行-运行全部-----响应结果看到

 

4.问题4: 执行压测命令时报错:Failed to configue 192.168.1.1

Error in NonGUIDriver java.lang.RuntimeException: Following remote engines could not be configured:(192.168.1.1)

性能测试分布式压测(4)-linux环境下no-gui分布式压测过程遇到的问题及解决方案

解决方案:

从机器没有启动jmeter服务,启动命令:./jmeter -server

 

5.问题5:

主控机打开jmeter界面时,点击运行单个从机器IP,报错:

Error starting remote server

Error in rconfigure() method java.rmi.ConnectException: Connection refused to host:

192.168.43.93; nested exception is:

java.net.ConnectException: Operation timed out (Connection timed out)

性能测试分布式压测(4)-linux环境下no-gui分布式压测过程遇到的问题及解决方案

或者

性能测试分布式压测(4)-linux环境下no-gui分布式压测过程遇到的问题及解决方案

inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255

解决方案:

1.从机器的bin目录下jmeter.properties文件中配置的remote_hosts配置的不对,应该是127.0.0.1;无需修改配置其他的IP===》尝试此方法,再运行还是失败

2.关闭抓包软件===》尝试此方法,再运行还是失败

3.

 

 

 

有关jmeter分布式测试的环境配置,大概就是那样,但是每次想要进行jmeter分布式测试的时候,总是会有各种奇怪的问题,下面整理了一些可能遇到的坑。

 

问题:如果你的服务器名字和报错的时候显示的服务器名不一致(refuse to host:10.10.34.21,而服务器名明明是172.16.129.43)

只要错误中出现:Error in rconfigure() method java.rmi.ConnectException:Connection refused to host:10.10.34.21;nested exception is:java.net.ConnectException:connection timed out:connect

那就就是服务器之间没有连通。

性能测试分布式压测(4)-linux环境下no-gui分布式压测过程遇到的问题及解决方案 

方案:这是服务器双网卡造成的问题

在linux上 修改jmeter-server

RMI_HOST_DEF=-Djava.rmi.server.hostname=slave机器名

在windows上 修改jmeter.bat

新增set rmi_host=-Djava.rmi.server.hostname=本机ip

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

 

问题:如果机器可以开始测试,但是测试速度非常慢,测试结果也是非常大的值。

性能测试分布式压测(4)-linux环境下no-gui分布式压测过程遇到的问题及解决方案

方案:检查slave服务器和被测试服务器之间是否可以ping通

 

问题:controller机器上收不到slave机器连接过来的信息。

方案:检查slave服务器的hostname和/etc/hosts中服务器对应的名字是否相同

 

问题:slave服务器上可以starting test,但是在jmeter界面上依旧报如下图错误。

Connection refused to host:172.16.129.43;nested exception is:java.net.ConnectException:Connection timed out:connect.

性能测试分布式压测(4)-linux环境下no-gui分布式压测过程遇到的问题及解决方案

方案:检查slave服务器的防火墙是否打开,需要关闭 

1) 重启后生效

开启: chkconfig iptables on

关闭: chkconfig iptables off

2) 即时生效,重启后失效

开启: service iptables start

关闭: service iptables stop

 原文博文:https://www.cnblogs.com/lsjdddddd/p/5806077.html

相关文章:

  • 2022-01-12
  • 2019-09-21
  • 2021-04-28
  • 2021-04-23
  • 2022-02-01
  • 2021-10-04
猜你喜欢
  • 2021-08-30
  • 2021-04-03
  • 2021-11-04
  • 2021-11-20
  • 2021-05-23
相关资源
相似解决方案