Using Jmeter 5.4.1
Using Firefox 91.3.0esr
Last week I could use Jmeter Script Recorder
Today I get the following message:SEC_ERROR_BAD_SIGNATURE
My Firefox Connection Settings:
Manual Proxy Configuration:
HTTP Proxy: Localhost
Port: 8080
The only difference I see from last week and this week is the Jmeter Certificate:
Has my Jmeter Certificate expired?
If so how do I get a new one?
I don't know your time zone, your certificate will be valid till 7 PM GMT.
If it has expired already you can just re-start JMeter's HTTP(S) Test Script Recorder and it will generate a new certificate.
If you don't want to re-generate the certificate each 7 days you can put the following line to user.properties file:
proxy.cert.validity=365
it will configure JMeter to generate certificates valid for 1 year. More information: Test Script Recorder certificate configuration
With regards to your problem most probably you visited the website without proxy and not Firefox sees that the certificate chain has changed and doesn't allow you to browse to avoid potential MITM attack. Most probably you can get rid of this error if you clear your browsing data
Also be aware that you can also record a JMeter test using JMeter Chrome Extension, in this case you won't have to worry about proxies, certificates, etc.
Related
started recording my test on macOS, with below steps and I am receiving BELOW RESULTS
1. ERR_PROXY_CONNECTION_FAILED
"If you use a proxy server…
Check your proxy settings or contact your network administrator to make sure that the proxy server is working. If you don't believe you should be using a proxy server: Go to Applications > System Preferences > Network > Advanced > Proxies and deselect any proxies that have been selected."
2. Went to JMeter result tree
Response message:
2.1 Connection reset
ensure browser is set to accept the JMeter proxy certificate 443
2.2 Response message:Received fatal alert: certificate_unknown
ensure browser is set to accept the JMeter proxy certificate
JMeter test Steps:
Go to Jmeter and select "Recording" from "Templates"
provided paramters due creation
hostToRecord: www.tesla.com/en_eu
recording file: recordingtesla.xml
scheme to record: https
STRANGE THING: Template was created, but going to "User Defined Variables" I see another value provided (another website, which I have used couple of times in my previous tests?)
STRANGE THING 2 Going to "Https Test Script Recorder, field domains use the same website, from point 3 (again i HAVE PROVIDED tesla and I can see a previously used website??)
HTTP(S) Script recorder and port set to 8888 (saved)
User Defined Variables ->
name: host, value: AGAIN the same website from point 3 &4 (used previously, not putting it for this test)
name: scheme, value: https
RECORDING
Going to "HTTP(S) Test Script Recorder", pressing start button
-(Root ca showing up)
-Target Controller is a Recording controller
-Grouping is Do not group samplers
-Went to tesla website (was already opened before I have pressed "Start"
-I click someting on tesla website and test stopped
1. DNS Servers 8.8.8.8
2. Proxies settings for all of below (and selected) is localhost: 8888
Web HTTP
Secure Web HTTPS
FTP
SOCKS
Streaming
Gopher
3Auto Proxy Discover (without selected localhost & 8888- no fields for this)
Jmeter certyficate should be valid till 2024, I have renewed certyficate, following this instruction -> https://stackoverflow.com/questions/64043676/cannot-update-jmeter-root-ca-certificate
BUT IN KEYCHAIN
**Expired: Monday, 26 December 2022 at 10:52:55 Central European Standard Time
marked as trusted **
4. am using Chrome browser
Delete the certificate from the keychain completely
Delete proxyserver.jks and ApacheJMeterTemporaryRootCA.crt files in "bin" folder of your JMeter installation
Clear your Chrome browsing history completely
When creating the recording test plan from the template use www.testla.com without any paths
When you start the HTTP(S) Test Script Recorder JMeter will generate new ApacheJMeterTemporaryRootCA.crt file. Default validity is 7 days unless you change proxy.cert.validity property
Import this certificate into your browser. At this stage I would suggest using Firefox instead of Chrome because:
Firefox has its own certificates storage and Chrome uses the system one
Firefox has its own proxy configuration and Chrome uses the system one
It would be also a good idea to exclude other domains than tesla.com from recording scope
Your recording should be successful
Also be aware of an alternative way of recording a JMeter test: JMeter Chrome Extension, in this case you won't have to worry about proxies and certificates
It works for now but, still seems not correct
When I set proxy.cert.dynamic_keys false and it finally started recording with some 200 statuses:
Use dynamic key generation (if supported by JMeter/JVM).
If false, will revert to using a single key with no certificate.
Defaults to: true
BUT SOME TESTS ARE STILL 443 because of cert
Response message:Connection reset
ensure browser is set to accept the JMeter proxy certificate
Tried your recommendations also uninstalled and installed JMeter again, cleared and using Firefox for now, cert is valid until 16.01.2023, I have set jmeter.properties file to “#proxy.cert.validity=365” (with hash) and I have checked Firefox -> settings -> cert view and there is 16.01.2023 so looks like again I have to uninstall and install again?
Is it correct that when test finished and I want to user browser + internet again I need to go to Firefox settings -> proxy and set back from manual mode (localhost 8888 + https) to no proxy?
If I stay with manual there is an error:
“The proxy server is refusing connections
An error occurred during a connection to www.tesla.com.
Check the proxy settings to make sure that they are correct.
Contact your network administrator to make sure the proxy server is working.”
The recorded the script and it was working on windows 7 machine. But now the script is not getting executed correctly in windows 10. The result is passed but aftual executions is not taking place. Also I tried to record new script on windows 10 but the script is not getting recorded. I am using the latest jmeter version. Could you please help me.
Jmeter should work fine on windows 10.
Cross check if you are able to access application (with or without proxy). If application is accessible through proxy, you need to open jmeter with proxy command.
Ensure you imported jmeter root certificate in browser.
You need to import JMeter's self-signed certificate into your browser. The file is called ApacheJMeterTemporaryRootCA.crt and it's being created in "bin" folder of your JMeter installation when you start HTTP(S) Test Script Recorder.
Check HTTPS recording and certificates chapter of the above article for the exact steps of certificate installation for different browsers.
Mozilla Firefox and derivatives have their own certificate storage, other browsers use Windows certificate storage, you can inspect it using Certificate Management Tool
If JMeter's certificate is not there - you will need to install it.
Be aware that there is an easier way of recording a JMeter test which doesn't require configuring proxies or installing certificates: JMeter Chrome Extension, just install it, start recording and perform your scenario steps in browser
The current state of my JMeter setup and test plan is:
JMeter 5
Certificate Authority generated and imported into Firefox.
Checked that the port # in the HTTP(S) Test Script Recorder matches that in the proxy server set up in Firefox.
Have added a Recording Controller to my Thread Group.
Have added Cache and Cookie Managers to my Thread Group.
When I start the proxy server, i.e., Start the HTTP(S) Test Script Recorder, I can walk the example application I'm testing - including HTTPS requests. (And if the HTTP(S) Test Script Recorder is not started I get "The proxy server is refusing connections" message from Firefox.)
I have ensured that the selected Target Controller in the HTTP(S) Test Script Recorder is a recording controller I've added to my Thread Group.
No Sampler/Requests are being added under the Recording Controller.
Has anyone else encountered a situation in JMeter in which the proxy server seems to be working correctly but no sampler/requests are actually being recorded? And even if this case is novel, do you have any suggestions? Thank-you in advance for your advice.
Take a look at jmeter.log file - if there is an issue with your setup you should get some clues regarding what's wrong from there. It is also a good idea to add the next line to log4j2.xml file:
<Logger name="org.apache.jmeter.protocol.http.proxy" level="debug" />
it will increase log level verbosity for the HTTP(S) Test Script Recorder
Make sure your Firefox is configured to use the proxy for all protocols and there are no exclusions for localhost, 127.0.0.1 or your IP address/hostname
Try clearing your browsing history as it might be the case "stale" certificate is still present or something is cached.
As the last resort be aware of an alternative way of recording a JMeter test using JMeter Chrome Extension - in this case you will not have to worry about proxies and SSL certificates.
You shouldn't create your own Test Script Recorder script, simply because you can make mistakes, just use predefined JMeter's template
Choose Menu: File -> Templates
(Recording is selected) Click Create
Your Recording script is set
you need to add ApacheJMeterTemporaryRootCA certificate in your firefox by setting
Go to tools > option > Certificate > View Certificate > import certificates.
Now restart the firefox.
just a late reply but facing same issue...
Have you tried to clean the 'URL Patterns to include' in HTTP(S) Test Script Recorder ?
It did work for me and could record was the proxy was not recording.
Is it possible to record httpS requests of a native app (IOS or Android) with JMeter? I tried some ways that I found but, I've not resolved the problem..
Use jmeter 3 with Java 7 or 8, it creates a crt file in jmeter/bin folder. It is the CA that creates the certificates.
Send this file by mail and open it in Android / iOS then install it.
In test script recorder, put in the dedicated field HTTPS domains , the domains you are trying to hit, see:
-http://jmeter.apache.org/usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder
Restart Ipad/Android and jmeter test script recorder and try again.
to do this, you have to make your device trust the Jmeter Proxy CA.
So, you have to import the Jmeter CA certificate from
$JmeterHome/bin/ApacheJMeterTemporaryRootCA.crt
into the device.
I remember this is an area where things improved a lot recently, so be sure to have the last version installed.
Try deleting ApacheJMeterTemporaryRootCA.crt, JMeter's self-signed certificates have very limited life time (I recall something like 1 week), so if your certificate is older you might have problems installing it into browsers and/or mobile devices or it won't decrypt SSL traffic. The file will be re-created next time you start HTTP(S) Test Script Recorder
There is an alternative way of recording the mobile traffic by using your personal cloud proxy. Moreover, it will perform automatic correlation for you so you won't have to worry not only about SSL certificates, but also about Regular Expression extractor, JMeter Variables, etc. Check out How to Cut Your JMeter Scripting Time by 80% article for details.
If none of the above helps, take the following troubleshooting steps:
Add View Results Tree listener as a child of the HTTP(S) Test Script Recorder. In case of any problems with the recording a request it should display the error details.
Check your mobile device logs during failed certificate installation attempt. You may need to install Android and iOS developer tools for this.
Make sure that your application is really uses HTTP or HTTPS protocols as JMeter supports only these 2.
All
When i am trying to record https urls with jmeter, i am getting below message in log:
jmeter.protocol.http.proxy.Proxy: [64432] Empty response to http over SSL. Probably waiting for user to authorize the certificate for XXXXXXX:443.
Its not loading any pages of our application.
Can anyone please help me how to resolve this issue?Thanks
Theju
First read:
http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf
http://jmeter.apache.org/usermanual/component_reference.html#HTTP%28S%29_Test_Script_Recorder
Among resolutions for your issue:
Install in the browser as described in documentation the Fake Certification Authority created by JMeter
Call https URL in the browser and accept certificate, then start recording your scenario
Have you added JMeter's self-signed certificate to browser's exception list?
If so - try removing the certificate and starting over.
For other troubleshooting options and recommendations see Recording HTTPS Traffic with JMeter's Proxy Server guide.
I suggest using SmartMeter Recorder. You will avoid all isues with setting up the proxy. SmartMeter Recorder uses its own Chrome plugin and works out of the box. Read the article for more info.
First of all for performance testing you should have application setup without the certificates otherwise you are testing results will differ. Your objective should be to test actual calls and those should be isolated.
If you still insist doing with certificate then you need to register JMeter certificate with browser which you are using for recording. You can find that in JMeter bin directory. Just register with your browser which you are using fir recording.