Running JMeter without disabling the Firewall - jmeter

I'm asked to run JMeter without disablng the Firewall.
How can we pass the ports used by JMeter to pass through the Firewall,without disabling it.

If you're running JMeter in distributed mode you need to open the following ports:
the port you define as server_port, by default 1099
the port you define as server.rmi.localport
the ports you define as client.rmi.localport
So you need to come up with the list of ports which are available and not being used by other applications and configure JMeter to use these ports. Once done you can open the ports in the firewall.
More information:
Using a different port
Remote hosts and RMI configuration
Apache JMeter Properties Customization Guide

Related

How to Change IP address of [ ::1 ] in JMeter

I am trying to Recode the test Script of VPN accessed Website and for that i am using JMeter HTTP(S) Test Script Recorder and start connection by using the localhost but by analysis i monitor that JMeter send request and in Remote server section it send [::1]:Port this value so please help me how to change this method and share Remote IP in Remote Address section
If you want to switch JMeter to use IPv4 localhost loopback address - 127.0.0.1 you need to add the next line to system.properties file:
java.net.preferIPv4Stack=true
More information:
Java Networking Properties
Apache JMeter Properties Customization Guide
You will also need to configure the browser to not to bypass proxy for local addresses, i.e. for Firefox you need to set network.proxy.allow_hijacking_localhost option to true

JMeter SubNet issue

How does JMeter determine what subnet it is on ?? I don't see a subnetMask property in the jmeter property file.
My client is on x.y.76.54, my server is on x.y.77.75. The subnet mask is 255.255.254.0
Technically, these two IPs are on the same subnet. I am seeing a "connection refused" response from the Server. Firewalls are off. Should JMeter be able to handle the ip's as provided above ?
JMeter relies on your operating system network settings, given both hosts are able to "see" each other - JMeter will be able to do this as well.
Your setup assumes hosts from x.y.76.1 to x.y.77.254 so it's a valid use case, you can double check it using i.e. Online IP Subnet Calculator
It's hard to say what exactly is wrong without seeing how you're launching JMeter master and slave and log files for both, RMI properties like client.rmi.localport, server.rmi.localport, java.rmi.server.hostname property, etc.
It might also be the case JMeter is trying to use IPv6 addresses so it might worth trying setting java.net.preferIPv4Stack property to true
See How to Perform Distributed Testing in JMeter article for more details and if you will be still experiencing problems consider providing more information on the above points.

The Jenkins tunnel address which I specify in the Jenkins->Configure Cloud does not seem to work. Can someone help me with the same?

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.

Jmeter master slave connection time out error

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

How to connect to Neo4j server running on Windows machine from Ubuntu machine?

I am using Neo4j graph database. Its running on Windows PC at url: http://localhost:7474/browser/. Now I want to get access to this server from machine running Ubuntu OS, so that I can access Neo4j browser and can use it for development purpose as well.
Here is what you need to do: -
Uncomment "org.neo4j.server.webserver.address" and provide a valid IP-Address on which you want to bind your neo4j http service at port 7474 in your neo4j-server.properties and restart your neo4j server.
Try accessing you Neo4j server on local machine by entering URL - http://:7474/ (Do not use localhost).
Switch off all firewalls and ensure :7474 is accessible from any remote machine. You may test it with Telnet too.
In case all the above works then you are done and your Neo4j server is accessible from remote machine.
I think you'll need to configure your conf/neo4j-server.properties file to allow access from non-localhost addresses. Here's the relevant part of my file:
# Let the webserver only listen on the specified IP. Default is localhost (only
# accept local connections). Uncomment to allow any connection. Please see the
# security section in the neo4j manual before modifying this.
#org.neo4j.server.webserver.address=0.0.0.0

Resources