我正在尝试设置一个aws服务器,用于对日志来的API进行性能测试。我在那台服务器上安装了Java和Jmeter。 应用程序服务器不同,即test.server.com:8080 aws服务器与不同的ip地址不同。 Jmeter GUI安装在我的笔记本电脑上。
在我的apache Jmeter系统中 - > bin文件夹 - > jmeter.properties,我已经将remote_hosts定义为应该出现日志的aws服务器的ip地址。 和server.rmi.localport = 50000
我没有在aws服务器上安装的jmeter.properties文件中进行任何更改,其中应该有性能测试日志。
当我从我的系统运行Jmeter UI并运行时 - >远程启动 - >选择aws服务器的ip地址,它给我连接超时异常。
In Logs am getting :
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at org.apache.jmeter.engine.ClientJMeterEngine.getEngine(ClientJMeterEngine.java:54)
at org.apache.jmeter.engine.ClientJMeterEngine.<init>(ClientJMeterEngine.java:67)
at org.apache.jmeter.engine.DistributedRunner.createEngine(DistributedRunner.java:237)
at org.apache.jmeter.engine.DistributedRunner.getClientEngine(DistributedRunner.java:213)
at org.apache.jmeter.engine.DistributedRunner.init(DistributedRunner.java:93)
at org.apache.jmeter.gui.action.RemoteStart.doAction(RemoteStart.java:77)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:80)
at org.apache.jmeter.gui.action.ActionRouter.access$000(ActionRouter.java:40)
at org.apache.jmeter.gui.action.ActionRouter$1.run(ActionRouter.java:62)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
我相信有些配置没有正确完成。如何检查以及我应该对运行测试脚本所做的所有更改。
答案 0 :(得分:0)
看起来像网络/防火墙问题。硕士与硕士奴隶应该在同一个子网中。如果可能,您可以在AWS中创建另一个实例并将其作为主实例。确保jmeter主站,从站能够相互通信。
如果您使用AWS,我建议您使用dokcer + rancherOS - 这使我在jmeter基础设施设置中的生活更加轻松。
http://www.testautomationguru.com/jmeter-distributed-load-testing-using-docker-rancheros-in-cloud/