[英]Connection refused error while connecting to jmeter slave docker container
I'm trying to implement Jmeter distributed framework with Docker.我正在尝试使用 Docker 实现 Jmeter 分布式框架。 Master and slaves are running on different hosts in ec2.
主从运行在 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启动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.如果我在同一台机器上运行 master 和 slave,则相同的命令正在工作。 I tried changing the java.rmi.server.hostname=0.0.0.0.
我尝试更改 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.按照网上的几个教程,与 docker 建立连接。 This will help you to detect errors like:
这将帮助您检测以下错误:
If it works, then use docker to automate it.如果可行,则使用 docker 使其自动化。
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 instead172.17.0.2
这是Class B 网络的一种本地网络地址,因此您的“主机”可能无法相互访问,请尝试使用公共 IP 地址
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.