Unable to run jmeter distributed test with ubuntu as node - java

Im trying to run jmeter test in distributed mode, following to official documentation:
https://jmeter.apache.org/usermanual/remote-test.html
client - windows 7
server - ubuntu 20
But I have next error:
Creating summariser <summary>
Created the tree successfully using D:\r.jmx
Configuring remote engine: xxx.xxx.xxx.xxx
Starting distributed test with remote engines: [xxx.xxx.xxx.xxx] # Tue Apr 27 23
:29:27 EEST 2021 (1619555367546)
Error in rconfigure() method java.rmi.MarshalException: error marshalling argume
nts; nested exception is:
java.net.SocketException: Connection reset by peer: socket write error
Remote engines have been started:[]
The following remote engines have not started:[xxx.xxx.xxx.xxx]
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 44
45
How I can fix it or how to determine, what exactly I should fix?

Check the log files on both master and slave, most probably they contain the cause of the error or at least a cloue
Looking into the output my expectation is that there is something preventing network communication between the machines, make sure that:
machines can "see" each other, i.e. they are on the same subnet and you reach from master to slave and vice versa using ping/telnet commands
the following ports are open in the operating systems firewalls:
1099 or if you changed server_port property value this new port
the port you define as server.rmi.localport
the port(s) you define as client.rmi.localport
You can check out JMeter Distributed Testing with Docker article which provides comprehensive explanation of the network setup for the distributed more of running a JMeter test

Related

How to get slave machine to connect to client on WSL machines JMeter

I am trying to do distributed load testing on my network. I have two computers running WSL2 and the firewall is turned off on both of them. I am using OpenJDK version 1.8.0_292 on both WSLs. The Jmeter version on both systems is 5.4.2. I have server.rmi.ssl.disable=true in both Jmeter.properties files. I can access the web application when I type 192.168.1.6:4080 in my browser's URL on my computer running on 192.168.1.18.
The jmeter.properties file for the computer running the web application has remote_hosts=192.168.1.18
The jmeter.properties file for the computer that will be the slave machine has server.rmi.localport=4000
One of my Computers is running the web application and will also be running the client (i.e. ./jmeter). In the Jmeter test plan, the HTTP Request Defaults have the server name 192.168.1.6 and the port as 4080. My other computer has the IPv4 address of 192.168.1.18.
I start the slave machine first by entering ./jmeter-server -n -Djava.rmi.server.hostname=192.168.1.18 -X and the following is outputted Created remote object: UnicastServerRef2 [liveRef: [endpoint:[192.168.1.18:4000](local),objID:[-5f7e0f00:17ab805fd23:-7fff, -5246535002214415146]]]
Now I start the client by entering './jmeter -n -t ~/test_plan.jmx -l ~/result.jtl -X -r '. On the slave machine I get
Starting the test on host 192.168.1.18 # Sat Jul 17 22:02:16 PDT 2021 (1626584536943)
Finished the test on host 192.168.1.18 # Sat Jul 17 22:03:25 PDT 2021 (1626584605136)
And on the client machine I get
Creating summariser <summary>
Created the tree successfully using /home/jasperhale/test_plan.jmx
Configuring remote engine: 192.168.1.18
Starting distributed test with remote engines: [192.168.1.18] # Sat Jul 17 22:10:44 PDT 2021 (1626585044116)
Remote engines have been started:[192.168.1.18]
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
The problem is that after the slave finishes, the client does not stop and report results. When I inspect the jmeter-server.log file I get this error message
2021-07-17 22:56:22,545 ERROR o.a.j.s.RemoteListenerWrapper: testStarted(host) on 192.168.1.18
java.rmi.ConnectException: Connection refused to host: 192.168.1.6; nested exception is:
2021-07-17 22:11:50,420 INFO o.a.j.s.DataStrippingSampleSender: Test Ended on 192.168.1.18
2021-07-17 22:11:50,420 INFO o.a.j.s.BatchSampleSender: Test Ended on 192.168.1.18
2021-07-17 22:11:52,481 ERROR o.a.j.s.BatchSampleSender: testEnded(host)
java.rmi.ConnectException: Connection refused to host: 192.168.1.6; nested exception is:
the error message is way bigger but the main issue is the connection refused
the slave machine is making requests from the test_plan. Also mode=Standard in both properties files. The report files I am trying to collect are the aggregate report, view results tree, and summary report. I've been stuck on this for a while, any help is greatly appreciated.
WSL uses a different IPv4 Address and I was getting those addresses by entering ipconfig into a windows command prompt. I tried it on windows not WSL and it worked.
Try explicitly setting client.rmi.localport property on both master and slave machines to some free port which is not used by any other process like:
client.rmi.localport=1234
Double check that you can reach this host and port from the slave using telnet or netcat or whatever command is there
Once you will be able to reach out from the slave to the master and from the master to the slave your distributed setup should start working normally
More information:
Remote hosts and RMI configuration
JMeter Distributed Testing with Docker
Also having JMeter and the system under test running on the same host is not something you should be normally doing, JMeter can be very resource intensive and you may run into a race condition when both JMeter and the system under test will be struggling for the operating system resources (CPU, RAM, etc.) so test results might be inaccurate

JMeter throws "java.net.ConnectException: Connection timed out (Connection timed out)"when trying to configure master - slave on Amazon EC2 cluster

I have reserved a number of Linux based EC2 machines(running OS : Centos 7) and with the exact same versions of JMeter 4.0 and Java installed.
No active firewalls, all the devices are connected within the same subnet and I can easily ping between them.
The problem is that I when I try to configure a mater machine and connect it to one of my slaves I keep receiving this exception
Connection refused to host: xx.yy.zz.4; nested exception is:
java.net.ConnectException: Connection timed out (Connection timed out)
Failed to configure xx.yy.zz.4
Stopping remote engines
Remote engines have been stopped
Error in NonGUIDriver java.lang.RuntimeException: Following remote engines could not be configured:[xx.yy.zz.4]
I have made my slave(ip: xx.yy.zz.4) setup as follows:
server_port = 24000 , server.rmi.localport=26000 , server.rmi.ssl.disable=true, No Remote Hosts and I usually launch the server using this shell command:
./jmeter-server -n -Djava.rmi.server.hostname=xx.yy.zz.4
And for the master which is also another EC2 instance(ip: xx.yy.zz.21) I made these configurations:
remote_hosts=xx.yy.zz.4:24000 , client.rmi.localport=25000, server.rmi.ssl.disable=true
And I use this shell command to start my JMeter's test plan
./jmeter -n -Rxx.yy.zz.4 -t /home/centos/jmeter/scripts/demo.jmx -Djava.rmi.server.hostname=xx.yy.zz.21
Any idea on what might cause these error?
Minimal configuration:
slave:
./jmeter-server -Dserver_port=24000
master:
./jmeter -n -R xx.yy.zz.4:24000 -t test.jmx
More information:
How to Perform Distributed Testing in JMeter
Remote hosts and RMI configuration
Also be aware that according to JMeter Best Practices you should be always using the latest JMeter version so consider upgrading to JMeter 5.2.1 (or whatever is the latest stable version available at JMeter Downloads page) on next available opportunity

JMeter - Running a JMeter slave from a master results in an RMI Connection Exception

I have followed the necessary instructions of setting up a distributed JMeter Testing environment with JMeter 4.0.
I have one master and one slave. Both are on the same subnet and I have (whether I should have or not) opened both inward and outward firewall ports for 1099 (for RMI) and 23 on both the master and slave. I could not shut down all the firewall as there is some 'group'policy at my workplace.
I have the necessary rmi_keystore.jks file created with the name as 'rmi' created and their paths referenced correctly in the properties file. I have put them both in the jmeter\bin directories for both slave and master. Hence, it starts the slave object properly.
When I start the master I wait for a bit and eventually get the following:
Remote engines have been started
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
c:\XXX\>jmeter -n -t YYY.jmx -r -l ZZZ.jtl -e -o Result
Creating summariser <summary>
Created the tree successfully using YYY.jmx
Configuring remote engine: AAA.AAA.AAA.AAA
Starting remote engines
Starting the test # Fri May 18 17:29:19 BST 2018 (xxxxxxxxxxxxx)
Error in rconfigure() method java.rmi.ConnectException: Connection refused to
host: AAA.AAA.AAA.AAA; nested exception is:
java.net.ConnectException: Connection timed out: connect
Remote engines have been started
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
I am not quite sure what else to do as I have followed the necessary instructions hence would really appreciate some help? Thanks.
AFAIK, the remote engines need to be started manually.
Be sure you started them before starting the master.
Furthermore, if the master has two (or more) interfaces, you need to specify the one where RMI server sits and listens.

Cannot get remote client example application for Oracle Coherence working, can't connect to server

New to Oracle Coherence. I am trying to follow the example java remote client application in the Oracle documentation. I have two different computers each with a CentOS VM running on it. One VM is acting as the server and the other the remote client. I am trying to just run the sample TestClient integer application. I changed the configuration files so the server VM is set as the tcp-acceptor and the client looks for that remote address. The two VM's can ping each other
In the documentation when starting the cache server, why does it need the TestClient application on the classpath? Unlike the example I am not running both the server and client on the same machine, do I still need to do this? I have been starting up the cache server like so without the TestClient app on the classpath:
java -cp COHERENCE_HOME\lib\coherence.jar;PATH_TO_CLIENT -Dtangosol.coherence.cacheconfig=PATH\example-config.xml com.tangosol.net.DefaultCacheServer
On the client side I get the error:
Exception in thread "main" com.tangosol.net.messaging.ConnectionException: could not establish a connection to one of the following addresses: [128.183.208.3:9099]; make sure the "remote-addresses" configuration element contains an address and port of a running TcpAcceptor
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.initiator.TcpInitiator.openConnection(TcpInitiator.CDB:121)
at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.Initiator.ensureConnection(Initiator.CDB:11)
at com.tangosol.coherence.component.net.extend.remoteService.RemoteCacheService.openChannel(RemoteCacheService.CDB:7)
at com.tangosol.coherence.component.net.extend.RemoteService.doStart(RemoteService.CDB:11)
at com.tangosol.coherence.component.net.extend.RemoteService.start(RemoteService.CDB:5)
at com.tangosol.coherence.component.util.SafeService.startService(SafeService.CDB:53)
at com.tangosol.coherence.component.util.safeService.SafeCacheService.startService(SafeCacheService.CDB:5)
at com.tangosol.coherence.component.util.SafeService.ensureRunningService(SafeService.CDB:27)
at com.tangosol.coherence.component.util.SafeService.start(SafeService.CDB:14)
at com.tangosol.net.ExtensibleConfigurableCacheFactory.startService(ExtensibleConfigurableCacheFactory.java:681)
at com.tangosol.net.ExtensibleConfigurableCacheFactory.ensureService(ExtensibleConfigurableCacheFactory.java:599)
at com.tangosol.coherence.config.scheme.AbstractCachingScheme.realizeCache(AbstractCachingScheme.java:50)
at com.tangosol.coherence.config.scheme.AbstractBundlingScheme.realizeCache(AbstractBundlingScheme.java:31)
at com.tangosol.net.ExtensibleConfigurableCacheFactory.ensureCache(ExtensibleConfigurableCacheFactory.java:254)
at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:205)
at com.tangosol.net.CacheFactory.getCache(CacheFactory.java:182)
at TestClient.main(TestClient.java:11)
On the server side the cache server runs but I get:
2014-05-20 12:26:06.168/77.693 Oracle Coherence GE 12.1.2.0.0 <Info> (thread=PacketListenerN, member=1): Scheduled senior member heartbeat is overdue; rejoining multicast group.
2014-05-20 12:26:06.185/77.710 Oracle Coherence GE 12.1.2.0.0 <Warning> (thread=PacketListenerN, member=1): MulticastUdpSocket failed to set receive buffer size to 16 packets (1MB); actual size is 11%, 1 packets (122KB). Consult your OS documentation regarding increasing the maximum socket buffer size. Proceeding with the actual value may cause sub-optimal performance.
Any help or guidance in the right direction would be super appreciated

Error when trying to connect to Jacorb naming service

I'm hoping to get some help with this weird problem. We're running the Jacorb name server and I have a simple client that I'm using to try to connect and do awesome CORBA voodoo. The name server is running, but when I try to start my java app, I get a "Connection failure" error (org.omg.CORBA.COMM_FAILURE, minor code 201, "caused by java.net.ConnectionException: Connection refused: connect").
Here's the weird part. The error reports that it's trying to connect using the default port 900, but I'm passing in an argument to try to override the port number of the name service to match the one being used by the name server. My java command is like this:
java -classpath . HelloClient -Djava.endorsed.dirs="bla bla bla" <br>
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
-DORBInitRef.NameService=corbaloc::localhost:2809/StandardNS/NameServer-POA/_root
I also tried the parameters without the first capital D (I've seen it both ways and I don't know the difference).
Now, if I put in -ORBInitialPort 2809, then the client does appear to try to connect, but then I get a corba.OBJECT_NOT_EXIST error.
I could use any help or advice anyone has.
Connection Refused. This sounds like a firewall/program not running issue.
try a telnet <machine> 2809. You should get a "Connected to "
and not a refusal, if everything is running/enabled correctly.
I'm running on a UNIX client so the paths use UNIX style.
jacORB installed properly ? e.g. get the nameservice entry from the
orb.properties file (in ${JAVA_HOME}/jre/lib/
I use "ORBInitRef.NameService=corbaloc::localhost:2809/NameServer"
as "NameServer" is used on the production name server and not the other
string of "Standard...."
The other changes in the properties files are setting the paths to UNIX
style (i.e. e:\NS_Ref -> /tmp/NS_Ref)
jacorb.naming.ior_filename=/tmp/NS_Ref
1a. Setting the http:// in the properties file didn't seem to do anything
in regards to resolving on the client side.
1b. NOTE: start ns with:
ns -DOAPort=2809
Log will show:
2010-05-27 10:00:47.777 FINE Created socket listener on 0.0.0.0/0.0.0.0:2809
2010-05-27 10:00:47.777 FINE Using port 2809
Running:
$ lsof | grep 2809
java 27529 jbsymolo 15u IPv6 693300 TCP *:2809 (LISTEN)
$ lsof -Pnl +M -i6
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
Naming_Se 9678 1000 7u IPv6 45779 TCP *:51148 (LISTEN)
java 27959 1000 15u IPv6 696092 TCP *:2809 (LISTEN)
Not Running: (shows nothing)
ns when started will log where it reads the properties from and it shouldn't
throw any errors. If it does your properties files have issues.
VM arguments. The -D is used to set system properties. Any Java code can
then access any property so defined via System.getProperty(). Even though
I've also seen the "non-D" used, I've been using the D.
-DORBInitRef.NameService=corbaloc::localhost:2809/NameService
-Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB
-Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
When running the client in Eclipse, I see the following in the Console:
May 27, 2010 10:01:06 AM org.jacorb.config.JacORBConfiguration init
INFO: base configuration loaded from file /usr/lib/java/jdk1.6.0_18/jre/lib/orb.properties
...
2010-05-27 10:01:09.836 FINE Trying to connect to 127.0.0.1:2809 with timeout=90000.
2010-05-27 10:01:09.844 INFO Connected to 127.0.0.1:2809 from local port 45745
2010-05-27 10:01:09.846 FINE wrote 12 bytes to 127.0.0.1:2809
...
Skipping lots of other read/write traffic
I can't be sure without seeing the rest of the code, but I'm pretty sure you need to change the InitRef string to be:
-DORBInitRef.NameService=corbaloc::localhost:2809
When your client connects, this should give you the root naming context for the naming service and then you can traverse the NameContext tree to get to your desired server object.

Categories

Resources