Trying to setup Master Slave setup of Jmeter in Cloud, Receiving "java.net.ConnectException: Connection timed out: connect" - jmeter

I'm Trying to setup Master Slave setup of Jmeter in Cloud.
Things I have done the setup in CLOUD for Master and Slave
I have created rmi.keystore.jks file in Master and copied the same to Slave machine.
I have installed the same versions of Java and Jmeter in both the Machines
I have added IP address of Slave machine in jmeter.properties file of Master
Please help me why I'm facing connection timed out error when trying to execute jmeter script in Cloud machine. Receiving:
Connection refused to host: 10.XXX.XX.XXX; nested exception is: java.net.ConnectException: Connection timed out: connect

If this is really in CLOUD then:
My expectation is that you need to use external IP addresses as I can only see Class B network-type address which most probably cannot be connected from the outer world
You need to ensure that the following ports are open in the CLOUD (whatever you mean by this term) and in operating system firewalls/security groups:
1099 (or whatever port you define as the server_port)
the port you define as the server.rmi.localport
the port(s) you define as the client.rmi.localport
More information:
Remote hosts and RMI configuration
How to Perform Distributed Testing in JMeter

Related

Issue: Error in rconfigure() method java.rmi.ConnectException: Connection refused to host: 192.xx;

I have an issue when i run jmeter distributed :
Error in rconfigure() method java.rmi.ConnectException: Connection refused to host: 192.168.200.22; nested exception is: java.net.ConnectException: Connection timed out: connect
Master: 192.168.200.21
Slave: 192.168.200.22
i have configured remote-hosts in jmeter.properties and started jmeter-server.bat in the master machine and slave machine
enter image description here
How do I fix it?
I try connect to the slave machine
Most probably you need to open port 1099 (or whatever is the value of your server_port property) in your operating system firewall
Also be aware that the slave will need to send the test results back to the master so you need to open client.rmi.localport and up to 3 ports up in the master machine.
And finally for any JMeter configuration overrides you should use user.properties file
More information:
Remote hosts and RMI configuration
Configuring JMeter
How to Perform Distributed Testing in JMeter

Jmeter Distributed testing - unable to connect the remote (slave systems)

Jmeter Distributed testing - unable to connect the remote (slave systems)
I am getting the below error
"non-JRMP server at remote endpoint"
It looks like an incorrect setup of RMI ports, JMeter master tries to connect to the slave machine using the hostname or IP address and port which is specified in the remote_hosts property or passed via -R command line argument.
The error means that something else, not JMeter's RMI registry is running on machine 192.168.0.103 on port 1099.
So you need to connect to your slave machine and check what's listening on port 1099 using netstat or equivalent and either terminate that application or amend JMeter configuration to use different port.
More information: How to Perform Distributed Testing in JMeter

JMeter- Master server failed to start and return [No route to host (Host unreachable)]

I try to run a distributed test using JMeter, I have 2 EC2 instances
Master Public IP: 54.xxx.xx.xx
Slave Public IP: 204.xxx.xxx.xxx
I have opened all the necessary ports that were used in the configuration.
I can ping each EC2 from the other one and the ping is successful.
But when I try to start the test, the server failed and return [No route to host (Host unreachable)].
My plan is to use more than 1 slave.
Error Return From Master Server
As per NoRouteToHostException exception description:
Signals that an error occurred while attempting to connect a socket to a remote address and port. Typically, the remote host cannot be reached because of an intervening firewall, or if an intermediate router is down.
So make sure that the RMI ports which JMeter slave is listening are:
Not dynamic
Open in your operating system firewall
Open in EC2 Security Groups
More information:
Remote hosts and RMI configuration
How to Perform Distributed Testing in JMeter
Apache JMeter Distributed Testing Step-by-step

Error in Jmeter Master Machine "java.net.NoRouteToHostException"

I am setting up distributed testing in Linux machines with a master and a slave. Need your advice to overcome the below error message
"Exception Creating a connection to 192.xx.xx. xx ;nested exception is java.net.NoRouteToHostException: no route to host ( Host Unreachable )"
I did the following steps
Ensured Master and Slave has the same version of Jmeter
Added the slave machine IP in Master's Jmeter.properites
Created a keystore file in master and copied the generated
rmi_keystore.jks to slave machine bin folder
Run jmeter-server file in the slave machine ( There was an error
hence added the slave machines ip in
RMI_HOST_DEF=-Djava.rmi.server.hostname=192.xx.xx.xx)- success up
and running
Run the intended jmx file in master Run - Remote start - Slave
machine
Error Exception Creating a connection to 192.xx.xx.xx ; nested
exception is java.net.NoRouteToHostException: no route to host (Host
Unreachable )
I did check the connectivity between two machines when I ping i was able to reach each machine from one another,
Could be an issue with Firewall or port ? not sure
I have been banging my head , any pointers would be helpfull
thanks in advance
check your Slave from Master
example: nc -zvw3 192.168.1.31 1099
if you get Ncat: No route to host then disable firewall on Salve and Master:
systemctl stop firewalld
systemctl disable firewalld

Unable to connect to host on different system from mongo shell in windows

I am trying to connect to mongodb from my system to different system but i am getting following error-
MongoDB shell version v3.4.5
connecting to: mongodb://192.168.0.152:27017/
2017-06-23T18:06:50.643+0530 W NETWORK [thread1] Failed to connect to 192.168.0.108:27017 after 5000ms milliseconds, giving up.
2017-06-23T18:06:50.644+0530 E QUERY [thread1]
Error: couldn't connect to server 192.168.0.152:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:237:13
#(connect):1:6
exception: connect failed
I tried various solutions listed on stackoverflow but didn't find any solution yet.
Can somebody please help me out?
getaddrinfo() resolves domain names through the DNS protocol (which is not related the Netbios Naming System - reason why writing a Windows PC Name is usually a bad idea). Depending of the underlying implementation of the function it might or might not be able to resolve Netbios Names.
Usually using a Netbios computer name is a bad idea, you should rely on a proper DNS architecture.
If you have the exact same error with a mongodb:// URL using solely an IP address, it's weird... Please provide more details on the IP address try case.
Also ensure that the server is not firewalled. Try a netcat connection using netcat for windows:
nc IP 27017 -vv
should say 'Connected'
Netcat for Windows: https://eternallybored.org/misc/netcat/
To be able to connect to mongodb server hosted in another machine, you should be sure that your mongodb server allows connections from addresses other than 127.0.0.1
In the mongod.conf there should be some network interfaces configuration:
# network interfaces
net:
port: 27017
bindIp: 127.0.0.1
To allow any machine to connect to your server the bindIp should be set to: 0.0.0.0

Resources