我们目前正在使用 jmeter 进行测试。我有 2 个堆栈,例如 C1 和 C2。最近对堆栈进行了重组,之后我们无法执行分布式测试。考虑每个堆栈有 2 个虚拟机,并且两者都在同一个子网中。每个虚拟机都通过 putty 连接,方法是保留一个充当网桥的本地 IP。
C1 上的 VM1 是主机,C2 上的 VM6 是从机。在开始分布式测试时,我们在 jmeter.log 中收到以下错误
2021-03-10 15:06:35,657 ERROR o.a.j.e.ClientJMeterEngine: Error in rconfigure() method
java.rmi.ConnectIOException: Exception creating connection to: **192.168.100.8**; nested exception is:
java.net.NoRouteToHostException: Keine Route zum Zielrechner (Host unreachable)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:635) ~[?:?]
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:209) ~[?:?]
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:196) ~[?:?]
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:132) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217) ~[?:?]
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:162) ~[?:?]
at com.sun.proxy.$Proxy21.rconfigure(Unknown Source) ~[?:?]
at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:153) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:135) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:157) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.JMeter.runNonGui(JMeter.java:1094) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.JMeter.startNonGui(JMeter.java:992) [ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.JMeter.start(JMeter.java:564) [ApacheJMeter_core.jar:5.2.1]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.apache.jmeter.NewDriver.main(NewDriver.java:253) [ApacheJMeter.jar:5.2.1]
Caused by: java.net.NoRouteToHostException: Keine Route zum Zielrechner (Host unreachable)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[?:?]
at java.net.Socket.connect(Socket.java:609) ~[?:?]
at java.net.Socket.connect(Socket.java:558) ~[?:?]
at java.net.Socket.<init>(Socket.java:454) ~[?:?]
at java.net.Socket.<init>(Socket.java:231) ~[?:?]
at sun.rmi.transport.tcp.TCPDirectSocketFactory.createSocket(TCPDirectSocketFactory.java:40) ~[?:?]
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:617) ~[?:?]
... 17 more
2021-03-10 15:06:35,689 INFO o.a.j.e.ClientJMeterEngine: Interrupting RMI Reaper
2021-03-10 15:06:35,690 ERROR o.a.j.u.JMeterUtils: Error in rconfigure() method java.rmi.ConnectIOException: Exception creating connection to: 192.168.100.8; nested exception is:
java.net.NoRouteToHostException: Keine Route zum Zielrechner (Host unreachable)
2021-03-10 15:06:35,691 INFO o.a.j.e.DistributedRunner: Remote engines have been started:[]
2021-03-10 15:06:35,691 ERROR o.a.j.e.DistributedRunner: The following remote engines have not started:[**172.18.188.150**]
从机的ip配置如下:
如何执行成功的测试?