执行失败错误信息:
root@ranxf:/home/ranxf/apache-jmeter-3.1/bin# ./jmeter-server Writing log file to: /home/ranxf/apache-jmeter-3.1/bin/jmeter-server.log Created remote object: UnicastServerRef [liveRef: [endpoint:[127.0.1.1:45261](local),objID:[-77439517:162bd0d02af:-7fff, -6895836418342878128]]] Server failed to start: java.rmi.RemoteException: Cannot start. ranxf is a loopback address. An error occurred: Cannot start. ranxf is a loopback address.
在jmeter-server加上参数后再次执行:root@ranxf:/home/ranxf/apache-jmeter-3.1/bin# ./jmeter-server -Djava.rmi.server.hostname=10.1.1.222
执行成功:
root@ranxf:/home/ranxf/apache-jmeter-3.1/bin# ./jmeter-server -Djava.rmi.server.hostname=10.1.1.222 Writing log file to: /home/ranxf/apache-jmeter-3.1/bin/jmeter-server.log Created remote object: UnicastServerRef [liveRef: [endpoint:[10.1.1.222:37657](local),objID:[7dbfc9da:162bd1c6b19:-7fff, 3898125142463661501]]]
欢迎查阅:百度阅读《软件测试工程师接口自动化测试》中jmeter相关章节 https://yuedu.baidu.com/ebook/679e0b5af56527d3240c844769eae009581ba2f0