我正在尝试运行分布测试以用于学习目的,并且我在我的 Windows 7 中使用虚拟机 Centos 7 作为从属(主在窗口 7 中运行)但即使我使用 IP 配置主从属(VM),修改文件jmeter.properties,不起作用,我尝试在Centos机器上运行Jmeter-server但是出现了这个问题。
Created remote object: UnicastServerRef [liveRef: [endpoint:[127.0.0.1:44341](lo
cal),objID:[4e68a212:14a8564a618:-7fff, 5760053273490727502]]]
Server failed to start: java.rmi.RemoteException: Cannot start. localhost.locald
omain is a loopback address.
An error occurred: Cannot start. localhost.localdomain is a loopback address.
有人可以给我一个方向或解释我该怎么做吗? 谢谢!
最佳答案
- 将以下行放入 system.properties 文件:
java.rmi.server.hostname=xxx.xxx.xxx.xxx
或者启动 JMeter,提供上述属性作为命令行参数:
jmeter (or jmeter-server) -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx
仔细检查您的网络配置,即确保您的
/etc/hosts
文件包含以下行:127.0.0.1 localhost localhost.localdomain xxx.xxx.xxx.xxx your CentOS machine hostname
在所有上述情况下,xxx.xxx.xxx.xxx
应该是您的 CentOS 机器的 IP 地址,并且此 IP 地址必须不同于 127.0.0.1。
还要确保在虚拟机中选择“桥接”网络,机器应该能够通过网络相互访问,防火墙应该正确配置以允许通信等。
有关不同 JMeter 属性和设置/覆盖它们的方法的更多信息,请参阅 Apache JMeter Properties Customization Guide
关于centos - 在 Vm Centos 中使用 jmeter 运行分布测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27654561/