I am running only 1 request, the request is working good in other machines but my Jmeter is returning
Response code: Non HTTP response code: javax.net.ssl.SSLException
javax.net.ssl.SSLException: java.net.SocketException: Connection reset
I have tried in both versions: 4.2 and 5.3
The reasons could be numerous, we need to know more in order to be able to come up with the comprehensive solution. The same machines in terms of operating system/networking setup with the same Java version should behave the same way.
What you could try is:
Enabling Java Network debugging by adding javax.net.debug=all line to system.properties file (lives in "bin" folder of your JMeter installation
Enabling JMeter Network debugging by adding <Logger name="org.apache.http" level="debug" /> to log4j2.xml file (the same location, JMeter's "bin" folder)
Upon JMeter restart you will be able to see much more troubleshooting information in jmeter.log file and in stdout, compare the output from your machine with one of the machines where the test succeeds, it should give you some insights.
Related
I run the load test in JMeter and i got this error.
Non HTTP response code: javax.net.ssl.SSLException/Non HTTP response message: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed
why this kind of error i got??
Can it be the case your system has both IPv4 and IPv6 enabled? If so you may run into situation when the request is being written in one thread and response comes in another hence it's "unrecognized"
So either choose one of network protocols in the operating system level and disable the other or limit JMeter to use only IPv4 by adding the next line to it's startup script:
jmeter -Djava.net.preferIPv4Stack=true -n -t test.jmx .....
if it helps you can make the change permanent by adding the next line to system.properties file (lives in "bin" folder of your JMeter installation):
java.net.preferIPv4Stack=true
More information:
Configuring JMeter
Overriding Properties Via The Command Line
Apache JMeter Properties Customization Guide
How can we add a client-side certificate and key to JMeter Script?
Every time I'm navigating to JMeter -> Options -> SSL Manager and browsing the Certificate and entering the password then it's only allowing me to run the script successfully, else I'm getting the forbidden error access denied.
I have tried the below steps, but still facing the same issue:
Added below lines in JMeter properties:
javax.net.ssl.keyStoreType=pkcs12
javax.net.ssl.keyStore=C:\certs\mycert.p12
javax.net.ssl.keyStorePassword=password
Tried using the JSR223 Sampler in JMeter script but still no luck.
Thanks in advance.
Forget about jmeter.properties file, any customization of JMeter Properties should be done in user.properties file or in a separate copy of jmeter.properties which needs to be passed to JMeter via -p command-line argument
In your case you're trying to change System Properties so you need to put these lines to system.properties file
JMeter restart will be required to pick the properties up
More information:
Configuring JMeter
How to Set Your JMeter Load Test to Use Client Side Certificates
white screen showing when open JMeter, can anybody help to resolve this error
enter image description here
I cannot reproduce the issue and have never seen this behaviour so I can only recommend checking jmeter.log file for any suspicious entries.
If by default it's not too informative you can increase JMeter logging verbosity by adding the next line to log4j2.xml file (lives in "bin" folder of your JMeter installation)
<Logger name="org.apache.jmeter" level="debug" />
or just launch JMeter as follows:
jmeter -LDEBUG
You might want to try a different version of Java SDK, the minimum version is Java 8
I'm using JMeter 5.2.1 and when I run some test in GUI mode (or even start the GUI mode), the jmeter.log is populated. But when I use non-GUI mode, nothing is happening.
Command line : "M:\Apps\apache-jmeter-5.2.1\bin\jmeter" -Jthreads=1 -Jrampup=20 -n -t "M:\Data.....\test.jmx" -l "M:\Data\test.csv".
Test runs fine and generates csv, but the jmeter.log doesn't get touched. Right after the test completes, JMeter console is closed down so can't even see if there's any further errors.
My understanding is this jmeter.log should be updated from both GUI and non GUI test runs. Am I missing something?
jmeter.log is written in the folder of execution
So if you execute non GUI (CLI) mode it will append/create jmeter.log in your folder
See also related command line log options:
-l, --logfile <argument>
the file to log samples to
-i, --jmeterlogconf <argument>
jmeter logging configuration file (log4j2.xml)
-j, --jmeterlogfile <argument>
jmeter run log file (jmeter.log)
Your understanding is correct, however it might not be the case regarding your understanding regarding where to find the jmeter.log file.
If you're running JMeter from it's "bin" folder - the jmeter.log file will be generated/updated in this folder
If you're running JMeter from another folder, it will be generated in that folder. If this is your case - instead of looking for updated log under M:\Apps\apache-jmeter-5.2.1\bin look for in in %cd%\jmeter.log
If the above hints don't help - most probably your log4j2.xml file got corrupted somewhere somehow, get the brand new version from JMeter GitHub
If you want JMeter to store the log under M:\Apps\apache-jmeter-5.2.1\bin folder no matter where you run it from - replace this line:
<File name="jmeter-log" fileName="${sys:jmeter.logfile:-jmeter.log}" append="false">
with this one:
<File name="jmeter-log" fileName="M:/Apps/apache-jmeter-5.2.1/bin/jmeter.log}" append="false">
and on next start of JMeter you will see the "log update" you're looking for.
More information: How to Configure JMeter Logging
Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so it might be a good idea to perform an upgrade
I would like to use JMeter to run some load testing against our OpenLDAP service authenticating using GSSAPI (i.e., Kerberos). How do I get JMeter to use a keytab with Kerberos credentials to do this? (Note: I tried following the directions here but they did not work for me: https://community.hortonworks.com/articles/141035/jmeter-kerberos-setup-for-hive-load-testing.html)
UPDATE
The command I use to start JMeter is
java.exe -XX:+HeapDumpOnOutOfMemoryError -Xms1g -Xmx1g
-XX:MaxMetaspaceSize=256m -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20 -Djava.security.egd=file:/dev/urandom
-Duser.language="en" -Duser.region="EN"
-Djava.security.debug=gssloginconfig,configfile,configparser,logincontext
-jar "D:\JMeter\bin\ApacheJMeter.jar"
-Dsun.security.krb5.debug=true
-Djava.security.krb5.conf="D:\JMeter\bin\krb5.conf"
-Djava.security.auth.login.config="D:\JMeter\bin\jaas.conf"
-Djavax.security.auth.useSubjectCredsOnly=false
The contents of D:\JMeter\bin\jaas.conf:
JMeter {
com.sun.security.auth.module.Krb5LoginModule required
doNotPrompt=true
useTicketCache=false
useKeyTab=true
keyTab="D:\JMeter\bin\ldap.keytab"
principal="service/testing-prod#example.com"
debug=true;
};
I have a single LDAP Request sampler. For that sampler I entered the LDAP server, port, and search base and filter. I run the test which "succeeds" but no information comes back.
I see no log messages in jmeter.log concerning the success or failure of authentication.
Unfortunately your didn't work statement tells nothing to us. With regards to the referenced guide - it is fine for HortonWorks Docs, however it might be not applicable for your application setup as Kerberos has many faces, to wit:
Your REALM will be different
Your SPN will be different (it may or may not be present)
Your keytab configuration will be different (again, Kerberos may or may not use keytabs for authentication)
Your KDC will be different
Your keytab generation algorithms may be different
So I would recommend the following:
Reach out to your network administrators / developers / devops / whoever can have the knowledge about your Kerberos setup and collect as much information as you can
Enable debug logging for JMeter HTTP Authorization Manager by adding the next line to log4j2.xml file:
<Logger name="org.apache.jmeter.protocol.http.control" level="debug" />
Enable debug logging for Java Kerberos implementation by adding the next line to system.properties file:
sun.security.krb5.debug=true
Restart JMeter to pick up the changes
Re-run your test and look for underlying error cause in jmeter.log file and in STDOUT
Fix the issue
Repeat step 5 until you're happy with the result
There are hundreds of different reasons, it might be the case your setup is 100% fine, however your login doesn't succeed because you have different time on KDC and your JMeter machine and it needs syncing.