we are facing issue, while trying to run jmeter distribution testing with master and slave configuration on different machines. Jmeter distribution test is running fine on same machine , but we are getting Connection refused to host: xxx.xxx.xxx.xx; nested exception is:java.net.ConnectException: Connection timed out: connect Failed to configure xxx.xxx.xxx.xxx
Most probably your networking configuration is not correct. Make sure that:
JMeter master and slaves reside in the same subnet, to wit you should be able to reach out from any machine to any machine
The network ports are open in the firewalls so JMeter master could communicate with slaves, the ports are:
1099
the port you define as server.rmi.localport
the ports you define as client.rmi.localport
Check out the following materials:
Remote hosts and RMI configuration
Apache JMeter Distributed Testing Step-by-step
How to Perform Distributed Testing in JMeter
In case of any problems look into jmeter.log file, normally it contains enough information in order to get to the bottom of the issue
Related
Jmeter remote connection is successful and result obtained for localhost but not for remote IP.
As ui load testing i have configure the remote ip in my webdriver code also
ChromeOptions options = new ChromeOptions();
options.addArguments("--remote-debugging-port=1099", "--allow-running-insecure-content");
options.addArguments("--whitelisted-ips=192.333.10.333");
in code also i am not getting error
Remote connection is successful but result not gained. Any help
jmeter log - INFO o.a.j.e.DistributedRunner: Remote engines have been started:[192.333.10.333, 127.0.0.1]
Most probably your RMI ports configuration is not correct, inspect jmeter-server.log file on slave machine(s) - it should contain more details regarding what went wrong.
Basically you need to
Make sure that JMeter master can reach the slaves to send the .jmx test plan to them
JMeter slaves can reach master to send results back
Try opening the relevant ports in your operating system firewall
More information: How to Perform Distributed Testing in JMeter
I try to start remote testing using my computer as Client/Master and EC2 instance as Slave
I achieve all these Points:
Disable Firewall on both Master and Slave.
I have the same version of java and JMeter on both Master and Slave.
I have set all communication to be over port 4000.
My configuration for Master:
remote_hosts=10.xx.xx.xxx
server_port=4000
server.rmi.port=4000
server.rmi.localport=4000
server.rmi.ssl.disable=true
My Configuration for Slave [EC2 instance]
server_port=4000
server.rmi.port=4000
server.rmi.localport=4000
server.rmi.ssl.disable=true
Command to start JMeter server on slave [ EC2 instance]:
./jmeter-server -Gjava.rmi.server.hostname:10.xx.xx.xxx
Command to start JMeter server on Master [ My Computer]:
./jmeter-server -Gjava.rmi.server.hostname:192.xx.xx.xxx
After Running the test from the master the test started on the slave and finished.
My issue that the Client/Master didn't get any Result or Summary, it stuck and freeze on this line:
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445.
Your 10.xx.xx.xxx and 192.xx.xx.xxx are class A and class C local networks, it means that they are not accessible from anywhere else, only from their respective local networks.
So you won't be able to reach the EC2 instance internal IP from your computer and vice versa.
In order to be able to connect to the EC2 instance you need to:
Use external (public) IP address or DNS hostname
Open the port 4000 in the AWS Security Groups
In order to get results back to your computer from the EC2 machine you need to have static external IP address, you need to reach out to your ISP or network administrator to get this configured and assigned
An example of master/slave configuration with custom ports can be found in the JMeter Distributed Testing with Docker article.
More information: Remote hosts and RMI configuration
If you have only one slave machine it doesn't make sense to invest into master/slave configuration at all, just run JMeter in command-line non-GUI mode in the EC2 instance and analyze the results locally.
If you plan to use more than 1 slave - it makes sense to transfer the master to the EC2 as well, this way you will be able to use internal IP addresses
I have a kubernetes cluster running on GKE and a Jenkins server running on a GCP instance.
I am using the Kubernetes plugin to dynamically create pods on the kubernetes cluster. I created a pipeline(Declarative syntax) for the same.
So I am aware that the Jenkins slave agents communicates with the Jenkins master on port 50000.
A snip of the configuration
But for some reason when I viewed the logs for the JNLP container creates by Jenkins, I received an exception - tcpSlaveAgentListener not found.
A snip of the container log
According to the above image, I assume the tunneling is unsuccessful as it is trying to connect to http://34.90.46.204:8080/tcpSlaveAgentListener/ whereas it should connect to http://34.90.46.204:50000/tcpSlaveAgentListener/.
It was a lazy question for me to ask, but I solved the issue.
In the Manage Jenkins-> Configure Global Security settings:
For the option on setting a port for TCP inbound agents: unselect the disable option which is selected by default and then provide a port for the inbound agents to interact on (50000).
A snip of the configuration
Jenkins uses a TCP port to communicate with agents connected inbound. If you're going to use inbound agents, you can allow the system to randomly select a port at launch (this avoids interfering with other programs, including other Jenkins instances). As it's hard for firewalls to secure a random port, you can instead specify a fixed port number and configure your firewall accordingly.
Hope this helps someone.
I would like to use one EC2 instance as a controller for 1 or more remote server instances in Amazon. I can start and run the test (on the remote side it runs) but the controller never exits. It fails with:
2015/02/12 17:34:25 ERROR - jmeter.JMeter: Error in NonGUIDriver
java.lang.IllegalStateException: Engine is busy - please try later
at org.apache.jmeter.engine.RemoteJMeterEngineImpl.rconfigure(RemoteJMeterEngineImpl.java:151)
If I run the test w/o the -R it works fine.
The same test setup works in SoftLayer so I think it is a firewall issue but I think I have put all the ports into my security group.
JMeter use Java RMI for distributed tests. This protocol is sensible for using different networks or firewalls.
For EC2 I suggest to use:
Amazon VPC for creating own virtual network for Jmeter instances.
Use ssh tunnels between Jmeter machines - this type of conenction is usually more stable and better "debuggable" then RMI
I am performing jmeter distributed load testing, On starting remote server from local machine in gui mode test starts but not able to store results on local machine.
It gives connection refused exception on server
Can any one suggest what could be the right step and solution for this?
Did you try updating this?
java.rmi.server.hostname=[ip]
If hostname is updated, enable port 1099 in your local for incoming reequest or disable firewall in the local machine. So that server can contact local machine to send the results.