Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
I have an API. I need to run test using JMeter. But when I run it before it's passed but now I am getting below error. I am not sure this error is because of unsupported java format or environment unavailability
Error
:-
?Data type("text"|"bin"|""):text
Response code: Non HTTP response code: javax.net.ssl.SSLHandshakeException
Response message: Non HTTP response message: No PrivateKey found for alias:'qa_hialcdr-publall-cons_di-cons_master_ppe'
First, check if your keystore contains a certificate with alias a_hialcdr-publall-cons_di-cons_master_ppe (assuming this is the correct name of the certificate that you want to use).
keytool -list -keystore path/to/your/keystore -alias a_hialcdr-publall-cons_di-cons_master_ppe
Then, check if the keystore is properly set up in system.properties file in jmeter "bin" folder. You should see something like this:
javax.net.ssl.keyStore=path/to/your/keystore
javax.net.ssl.keyStorePassword=changeit
If the above are both ok, the issue could be that you are using a JKS keystore, but the certificate with alias a_hialcdr-publall-cons_di-cons_master_ppe was imported from a PKCS12 file. For some reason, JMeter can't read such certificates from within a JKS keystore. The solution is to create a PKCS12 keystore and point JMeter to it.
If you have individual PKCS12 files, merge them into a single PKCS12 keystore. Make sure all certs in the keystore have the same password. Alternatively, you can convert the JKS to PKCS12.
Then, in your system.properties file, point the SSL properties to your new file.
javax.net.ssl.keyStoreType=pkcs12
javax.net.ssl.keyStore=path/to/your/keystore.p12
javax.net.ssl.keyStorePassword=changeit
Then re-run your tests. This was the solution that worked for me.
It looks like you're using Keystore Configuration and CSV Data Set Config in order to pass multiple client-side certificates along with your HTTP Requests.
The error means that:
The CSV file contains entry with the name of qa_hialcdr-publall-cons_di-cons_master_ppe
And the keystore containing your client-side certificates doesn't contain an entry with such an alias
So ensure that all entries in the CSV files have matching certificates in the keystore and that should be it.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.