Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jmeter remote connection throwing "Connection refused to host"

Tags:

jmeter

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

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

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

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

Basic requirements are done:

-The firewalls on the systems are turned off

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

-The JMeter server can access the target.

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

I did the following:

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

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) Added the following to server (Slave) jmeter.properties:

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

4) Now started the Jmeter engine on Master.

a) Started Jmeter on master machine (GUI)

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

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 :-

"Connection refused to host : 192.168.0.139; nested exception is : java.net.ConnectionException : Connection Refused"

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

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

like image 337
Ratish Avatar asked May 07 '14 09:05

Ratish


1 Answers

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

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

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.

like image 113
sbos61 Avatar answered Dec 01 '22 14:12

sbos61