简体   繁体   中英

JMeter distribution load testing Error: Connection refused to host

We are facing issues in JMeter remote testing. Master is stuck at:

Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445

While the client is throwing:

Connection refused to host exception

We are running master like below:

.\jmeter  <b>-Djava.rmi.server.hostname=10.19.120.43 </b> -n -t .\Test.jmx -R 10.75.225.188

But in the slave side test completion status is sent to some other IP address:

2020-06-11 15:54:01,788 INFO o.a.j.e.RemoteJMeterEngineImpl: Creating JMeter engine on host 10.75.225.188 base '.'
<br>2020-06-11 15:54:01,788 INFO o.a.j.e.RemoteJMeterEngineImpl:<b> Remote client host: 10.19.120.43</b>
<br>2020-06-11 15:54:01,788 INFO o.a.j.s.FileServer: Set new base='.'
<br>2020-06-11 15:54:01,793 INFO o.a.j.e.RemoteJMeterEngineImpl: Cleaning previously set properties: {sample_variables=ulp_buffer_fill,ulp_lag_time,ulp_play_time,ulp_lag_ratio,ulp_dwn_time,ulp_hits,ulp_avg_chunk_time,ulp_avg_manifest_time}
2020-06-11 15:54:01,794 INFO o.a.j.e.StandardJMeterEngine: Applying properties {sample_variables=ulp_buffer_fill,ulp_lag_time,ulp_play_time,ulp_lag_ratio,ulp_dwn_time,ulp_hits,ulp_avg_chunk_time,ulp_avg_manifest_time}
<br>2020-06-11 15:54:01,795 INFO o.a.j.e.RemoteJMeterEngineImpl: Running test
<br>2020-06-11 15:54:01,797 INFO o.a.j.e.StandardJMeterEngine: Running the test!
<br>2020-06-11 15:54:01,797 INFO o.a.j.s.SampleEvent: List of sample_variables: [ulp_buffer_fill, ulp_lag_time, ulp_play_time, ulp_lag_ratio, ulp_dwn_time, ulp_hits, ulp_avg_chunk_time, ulp_avg_manifest_time]
<br>2020-06-11 15:54:22,801 ERROR o.a.j.s.RemoteListenerWrapper: testStarted(host) on 10.75.225.188
java.rmi.ConnectException: <b>Connection refused to host: 10.0.75.1; nested exception is: 
    java.net.ConnectException: Connection timed out: connect </b>
    at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.server.UnicastRef.invoke(Unknown Source) ~[?:1.8.0_231]
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source) ~[?:1.8.0_231]
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source) ~[?:1.8.0_231]
    at com.sun.proxy.$Proxy20.testStarted(Unknown Source) ~[?:?]
    at org.apache.jmeter.samplers.RemoteListenerWrapper.testStarted(RemoteListenerWrapper.java:79) [ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:217) [ApacheJMeter_core.jar:4.0 r1823414]
    at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:384) [ApacheJMeter_core.jar:4.0 r1823414]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[?:1.8.0_231]
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) ~[?:1.8.0_231]
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:1.8.0_231]
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:1.8.0_231]
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.PlainSocketImpl.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.connect(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.<init>(Unknown Source) ~[?:1.8.0_231]
    at java.net.Socket.<init>(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) ~[?:1.8.0_231]
    at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) ~[?:1.8.0_231]
    ... 11 more





You need to EXPOSE port 1099 (or whatever port you're using as the server_port ) in your Dockerfile (or use host network driver ) and in the firewall of your 10.75.225.188 machine, this is the minimum requirement for JMeter master could establish the connectivity with the slave machine.

More information: Remote hosts and RMI configuration

You can also refer to JMeter Distributed Testing with Docker article, it has some sample networking configuration you might be willing to apply to your system

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM