I'm trying to implement Jmeter distributed framework with Docker. Master and slaves are running on different hosts in ec2. Ports have been opened to allow communication.
Master is stuck with the below message
Starting distributed test with remote engines: [slaveIP:1099] @ Sun Nov 21 04:50:29 GMT 2021 (1637470229447)
Remote engines have been started:[slaveIP:1099]
On the slave side, it is throwing me connection refused errors.
java.rmi.ConnectException: Connection refused to host: 172.17.0.2; nested exception is:
Command to start slave machine:
docker run \
-dit \
-p 6000:6000 \
-p 1099:1099 \
-v "${volume_path}":${jmeter_path} \
--rm \
jmeter \
-n -s \
-Jclient.rmi.localport=3000 \
-Jserver.rmi.localport=6000 \
-Dserver_port=1099 \
-Djava.rmi.server.hostname=<HostIP> \
-Dserver.rmi.ssl.disable=true \
-j ${jmeter_path}/server/slave_${timestamp}_${IP_ADD}.log
Command to start master
docker run \
-v "${volume_path}":${jmeter_path} \
-p 3000:3000 \
--rm \
jmeternew \
-n -X \
-t ${jmeter_path}/$1 \
-Dserver.rmi.ssl.disable=true \
-Dclient.rmi.localport=3000 \
-R slaveIP:1099 \
-l ${jmeter_path}/client/result_${timestamp}.jtl \
-j ${jmeter_path}/client/jmeter_${timestamp}.log
The same commands are working if I'm running master and slave on the same machine. I tried changing the java.rmi.server.hostname=0.0.0.0. It's also throwing me connection refused error
According to:
Just we need:
remote_hosts=192.165.0.10,192.165.0.20,192.165.0.30
Establish the connection with docker, following and of the several tutorials on the internet. This will help you to detect errors like:
If it works, then use docker to automate it.
172.17.0.2
which is kind of local network address for Class B networks so your "hosts" might not be able to reach each other, try using public IP addresses instead
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.