Jmeter远程连接抛出“连接被拒绝托管" [英] Jmeter remote connection throwing "Connection refused to host"

查看:22
本文介绍了Jmeter远程连接抛出“连接被拒绝托管"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 unbundu 机器上使用 JMeter 设置了一个分布式负载测试环境.

I setup a distributed load testing environment using JMeter in unbundu machines.

->Master:运行JMeter GUI的系统,控制每个slave.

->Master: the system running JMeter GUI, control each slave.

->Slave:运行jmeter-server的系统,接收来自master的命令并向被测服务器发送请求.

->Slave: the system running jmeter-server, receive command from the master and send a request to server under test.

->目标:被测Web服务器,从slave获取请求.

->Target: the web server under test, get request from slaves.

-系统上的防火墙已关闭

-The firewalls on the systems are turned off

-所有规划的master和slave都在同一个子网中

-All the planned master and Slaves are in the same subnet

-JMeter 服务器可以访问目标.

-The JMeter server can access the target.

-所有系统上的 JMeter 版本相同(版本 2.3.4).

-Same version of JMeter on all the systems (version 2.3.4 ).

1) 尝试通过 ubundu 终端 ping 从主机到从机,反之亦然.它正在发生..

1) Tried pinging form master to slave and vice versa through ubundu terminal. its happening ..

2) 向客户端(主)jmeter.properties 添加以下内容:

2) Added the following to client (master) jmeter.properties:

# Remote hosts and RMI configuration

 remote_hosts=192.168.0.139:1099

# RMI port to be used by the server (must start rmiregistry with same port)

server_port=1099

3) 向服务器(Slave)jmeter.properties 添加以下内容:

3) Added the following to server (Slave) jmeter.properties:

# On the server(s)
 set server_port=1234
 start rmiregistry with port 1234

4) 现在在 Master 上启动 Jmeter 引擎.

4) Now started the Jmeter engine on Master.

a) 在主机 (GUI) 上启动 Jmeter

a) Started Jmeter on master machine (GUI)

b) 创建测试计划-->(添加踏板组、采样器和所需的监听器)

b) Created test plan--> (added tread group , samplers and required listners)

c) 现在从 GUI 启动 Slave

c) Now start the Slave(s) from the GUI

  -click Run at the top

  -select Remote start

  -select the IP address

但是错误弹出是:-

连接被拒绝主机:192.168.0.139;嵌套异常是:java.net.ConnectionException:连接被拒绝"

不连接远程salve可能是什么原因(在这里说:192.168.0.139)

what may be the reason for not connecting with the remote salve (say here : 192.168.0.139)

我是否需要在 jmeter.properties 文件或任何其他文件(从属和主控中)进行更多配置?

DO i need to do any more configuration in jmeter.properties file or in any other files (in both slave and master)?

推荐答案

我想你忘记在从模式"下启动从机了.
在命令行模式下,进入jmeter/bin目录,执行
jmeter-server.bat

I think you forgot to start the slave in "slave mode".
In command line mode, go to jmeter/bin directory and execute
jmeter-server.bat

这将启动从进程并让它一直监听命令.然后你可以继续,加载 amd 启动脚本.看看:
http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.pdf

That will start the slave process and will keeps it listening for commands. Then you can go forward, loading amd launching the script. have a look at:
http://jmeter.apache.org/usermanual/jmeter_distributed_testing_step_by_step.pdf

还要注意:
- 两个系统必须运行相同的 Jmeter 版本
- 两个系统必须在同一个子网上
- 两个系统应该尽可能相似:相同的操作系统、相同的目录树等
- remote_hosts"只需要地址.端口由server_port"参数指定.

Also be aware that:
- the two systems MUST run the same Jmeter version
- the two systems MUST be on the same subnetwork
- the two systems SHOULD be as similar as possible: same OS, same directory tree, etc
- "remote_hosts" only require the address. The port is specified by "server_port" parameter.

这篇关于Jmeter远程连接抛出“连接被拒绝托管"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆