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

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

问题描述

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

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

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

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

->从站:运行jmeter-server的系统,从主站接收命令,并向被测服务器发送请求.

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

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

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

-系统上的防火墙已关闭

-The firewalls on the systems are turned off

-所有计划中的主站和从站都在同一子网中

-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)向服务器(从站)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

但是错误弹出窗口为:-

But error popup came as :-

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

不与远程从站连接的原因可能是什么(在这里说: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

这将启动从属进程,并使它继续侦听命令. 然后,您可以继续,加载并启动脚本. 看一下:
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天全站免登陆