Error while generating report in Jmeter 5.2.1 - amazon-ec2

Command Used : ./jmeter -n -t TESTSIT.jmx -JTestEnv=sit2 -l ResultLog.log -e -o ResultLog
the same command generates result from local cmd and gives following exception from ec2 instance
Error message
Error generating the report: org.apache.jmeter.report.dashboard.GenerationException: Error while processing samples: Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Cannot create temporary file for channel #0

First of all, are you sure your EC2 instance has enough free disk space? You can check it using i.e. df command
Second, it is not very possible to provide a comprehensive answer without seeing the full jmeter.log file, however my another assumption is that your EC2 user doesn't have write access to the OS temporary folder. You can amend jmeter.reportgenerator.temp_dir property and point it to the folder where you have write access for sure, i.e.
./jmeter -Jjmeter.reportgenerator.temp_dir=/tmp -g ResultLog.log -o ResultLog
If it helps you can make the change permanent by adding the above line to user.properties or reportgenerator.properties file.
More information:
Apache JMeter Properties Customization Guide
Reporting Configuration

Related

Unable to create Dashboard report folder on jenkins

I am able to create a dashboard folder on Local jenkins but same when I am trying to deploy on live jenkins following error I am getting.
Error generating the report: org.apache.jmeter.report.dashboard.GenerationException: Error while processing samples: Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Cannot create working directory "temp/latencyVsRequest"
Even My JTL file is properly created but folder is not getting created
Following is the command which I have put in Jenkins Execution shell
cd /mnt/apache-jmeter-5.4/bin
sh jmeter -n -t /mnt/qa/erosnow-auto-test/JMeterAutomation/TestingScript.jmx -l /mnt/qa/erosnow-auto-test/JMeterAutomation/test123.jtl -e -o /mnt/qa/erosnow-auto-test/JMeterAutomation/test123
The message means that the user you're running Jenkins from doesn't have sufficient permissions to create temp/latencyVsRequest folder in your Jenkins workspace, you need to either grant the user the appropriate rights via chown command or change jmeter.reportgenerator.temp_dir property to point to some path where your user has write access.
More information:
Create file in folder: permission denied
JMeter Properties Reference - Reporting Configuration
Apache JMeter Properties Customization Guide

Invoking chaincode with hyperledger fabric: Executable file not found in $PATH\ ": unknown"

So, I have a chaincode application based on the fabcar sample from fabric-samples. Yesterday, I was able to bring it up and run the initLedger function, but found issues with my chaincode when running further invocations. However, when i brought the network back up after debugging (which turned out to be a nightmare in Go), I can no longer get the InitLedger to execute, it just gives me the following error:
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction f2589dd7849c01064d5ed827867085d02615ac4fe4d5edcaed31b1a7d5635c94: could not launch chaincode
fakenews_1.0:230eafea48b912ae8f96bfc79bea3b02b4538992547e9de284f80c66a1f52550: error starting container: error starting container: API error (400): OCI runtime create failed: container_linux.go:349: starting container process caused \"exec: \\\"chaincode\\\": executable file not found in $PATH\": unknown"
As far as I can tell, this is due to an issue with docker, but I can't really figure out how to solve it in my case. Has anyone ran into this before?
For extra information, the main difference between the fabcar chaincode and mine is that I am reading from a JSON file and mapping that to a list of objects which are then put on my blockchain. At least that's what I'm trying to do, because the one time I managed to run the InitLedger, my QueryAll invocation came up empty.
Check the chaincode path. I think your chaincode path is wrong.
Lets say you are mapping chaincode directory like below in compose file.
volumes:
../chaincode:/opt/gopath/src/github.com/chaincode
then export CC_SRC_PATH=/opt/gopath/src/github.com/chaincode
use above path when executing invoke command. You can add -p ${CC_SRC_PATH}.
peer chaincode install -n mycc -v ${VERSION} -l ${LANGUAGE} -p ${CC_SRC_PATH} >&log.txt
NOTE: I'm assuming that you are running all these command inside cli container

open JMeter in distributed mode

I'm unable to open JMeter in 'Server Mode'. I have followed the following steps.
Steps to reproduce:
Open cmd
To open JMeter in server mode, run the bat file bin\jmeter-server.bat.
Expected Result: JMeter should start in server mode.
Actual Result:
Problem URL:
... Trying JMETER_HOME=..
Found ApacheJMeter_core.jar
Sep 12, 2018 1:33:34 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Server failed to start: java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
An error occurred: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
errorlevel=1
Press any key to continue . . .
C:\Users\rozeena.ibrahim>d:
D:\>cd apache-jmeter-4.0
D:\apache-jmeter-4.0>cd bin
D:\apache-jmeter-4.0\bin>jmeter-server.bat
Could not find ApacheJmeter_core.jar ...
... Trying JMETER_HOME=..
Found ApacheJMeter_core.jar
Sep 12, 2018 1:34:12 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Server failed to start: java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
An error occurred: Listen failed on port: 0; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot find the file specified)
errorlevel=1
Press any key to continue . . .
This is not a bug, since JMeter 4.0 communication between master and slaves is secure (maybe to prevent possible intruders from intercepting JMeter .jtl result file and dying of laughter seeing your system performance metrics) so you need to generate the keystore using create-rmi-keystore.bat first on master and all the slaves.
Alternatively you can disable this piece of functionality and revert back to previous JMeter behaviour by adding the next line to user.properties file:
server.rmi.ssl.disable=true
it needs to be done on all machines
JMeter restart will be required to pick the property up
the change will be permanent, if you want to do it only once - it is better to pass the property via -J command-line argument like:
jmeter-server.bat -Jserver.rmi.ssl.disable=true
More information:
Remote hosts and RMI configuration
Configuring JMeter
Overriding Properties Via The Command Line
JMeter Distributed Testing with Docker
If you just want to run jmeter in NON GUI mode then do this:
jmeter -n -t jmxplan -l results.csv
But if you really want to use distributed testing, then since JMeter 4.0 the default transport mechanism for RMI will use SSL.
SSL needs keys and certificates to work. You will have to create those keys yourself.
You must create the rmi_keystore.jks as per error message.
JMeter comes with a script to generate a keystore that contains one key (and its corresponding certificate) named rmi.
The script is located in the bin directory and is available for Windows systems (called bin/create-rmi-keystore.bat) and Unix like systems (called bin/create-rmi-keystore.sh).
It will generate a key-pair, that is valid for seven days, with a default passphrase of value 'changeit'. It is advised to call it from inside the bin directory.
See:
https://jmeter.apache.org/usermanual/remote-test.html#setup_ssl
Note that disabling SSL mode would be a security issue, so although possible it is not advised

Jmeter Distributed Setup works in GUI but not the command line

I am running Windows 7 Pro with JMeter 4.0 r1823414 on all 5 machines with Java JDK 1.8.0_144 on all of them as well. All paths and ENV Vars are identical across all machines. I set my remote hosts in the master and I am able to see them on the GUI inside the master. I built the rmi_keystore.jks on a slave machine and copied it into the bin folder in every machine. I successfully started all the servers on the slave machines and see the successful attachment of the rmi (running the jmeter-server.bat):
Found ApacheJMeter_core.jar
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xbootclasspath/a:"C:\Program Files
(x86)\HP\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
Created remote object: UnicastServerRef2 [liveRef: [endpoint:
[<ip:port>,SSLRMIServerSocketFactory(host=<host_name/IP>,
keyStoreLocation=rmi_keystore.jks, type=JKS,
trustStoreLocation=rmi_keystore.jks, type=JKS, alias=rmi),
SSLRMIClientSocketFactory(keyStoreLocation=rmi_keystore.jks, type=JKS,
trustStoreLocation=rmi_keystore.jks, type=JKS, alias=rmi)](local),objID:
[<stuff>:-7fff, <more_stuff>]]]
Running a basic HTTP call I am able to run from the master to all 4 slave machines (individually and all at once) and get results without issue from the GUI. My problem is from the command line. I cannot get the test to run. I have tried:
jmeter -n -t distributed_test_4_slaves.jmx -r -l distributedLog_Test.jtl -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks
jmeter -n -t distributed_test_4_slaves.jmx -r -l distributedLog_Test.jtl
jmeter -n -t distributed_test_4_slaves.jmx -R <all_my machine_names> -l distributedLog_Test.jtl (with and without -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks)
jmeter -n -t distributed_test_4_slaves.jmx -R <all_my machine_names:ports> -l distributedLog_Test.jtl (with and without -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks)
jmeter -n -t distributed_test_4_slaves.jmx -R <all_my machine_ips(with and without ports)> -l distributedLog_Test.jtl (with and without -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks)
Every time I get the same errors in the command line:
Creating summariser <summary>
Created the tree successfully using distributed_test_4_slaves.jmx
#The next 5 lines repeat for each slave
Configuring remote engine: <slave_1..4>
Exception creating connection to: <slave_1..4>; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot
find the file specified)
Failed to configure <slave_1..4>
Stopping remote engines
Remote engines have been stopped
Error in NonGUIDriver java.lang.RuntimeException: Following remote
engines could not be configured:[
<slave_1>, <slave_2>, <slave_3>, <slave_4>]
What am I missing? Why would it run and work in the GUI but not on the command line? Something cannot be right.
Make sure that
You either run JMeter from its "bin" folder
Or have rmi_keystore.jks in the folder where you're running JMeter from
as the error clearly states that JMeter tries to load rmi_keystore.jks file and fails
One more thing to try is providing full path to the rmi_keystore.jks file via server.rmi.ssl.keystore.file property.
You can also completely disable secure RMI communication by setting server.rmi.ssl.disable property to true
Normally jmeter.log file should contain the root cause of the issue, if it doesn't or not very informative - you can increase JMeter log verbosity for selected clas(ses) or package(s).

Getting error when running jmeter master-slave using docker swarm mode "jmeter.engine.ClientJMeterEngine: Error in rconfigure() method"

Getting an error
meter.engine.ClientJMeterEngine: Error in rconfigure() method java.rmi.MarshalException: error marshalling arguments; nested exception is: java.net.SocketException: Broken pipe" when running the jmeter in docker swarm mode 1 master and 1 slave.
This error log is from the docker-machine jmeter master details. Please suggest what could be the issue.
Able to resolve the issue by adding standard and extra libs plugins to my jmeter under lib/ext folder. Thank you.

Resources