Search code examples
jmeterperformance-testingsolacesolace-mq

JMETER Error - Unable to load trust store: /var/tmp/jre1.8.0_281/lib/security/cacerts - Caused by java.io.FileNotFoundException


I am trying to run a test from my linux VM and have been facing below error while making SSL connection to Solace Broker.

javax.naming.NamingException: Unable to load trust store: /var/tmp/jre1.8.0_281/lib/security/cacerts - Caused by java.io.FileNotFoundException - /var/tmp/jre1.8.0_281/lib/security/cacerts (Is a directory) [Root exception is com.solacesystems.jcsmp.InvalidPropertiesException: Unable to load trust store: /var/tmp/jre1.8.0_281/lib/security/cacerts]

I am running script with below configuration in system.properties

java.naming.factory.initial = com.solacesystems.jndi.SolJNDIInitialContextFactory
java.naming.provider.url = tcps://username:password@hostname
Solace_JMS_VPN = QA
Solace_JMS_Authentication_Scheme = AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE
Solace_JMS_SSL_KeyStore = var/tmp/kestore.jks
Solace_JMS_SSL_KeyStorePassword = pwd
Solace_JMS_SSL_TrustStore = /var/tmp/certs/truststore.jks
Solace_JMS_SSL_TrustStorePassword = pwd
Solace_JMS_JNDI_ConnectRetries = 1
Solace_JMS_JNDI_ClientDescription = PnV_Jmeter

Solution

  • Most probably something is wrong with your JDK installation, as per The Java Developer’s Guide to SSL Certificates article:

    Truststore

    The truststore is a file that contains the root certificates for Certificate Authorities (CA) that issue certificates such as GoDaddy, Verisign, Network Solutions, and others.

    The truststore comes bundled with the JDK/JRE and is located in $JAVA_HOME/lib/security/cacerts.

    The truststore is used whenever our Java code establishes a connection over SSL.

    According to the error you're getting this /var/tmp/jre1.8.0_281/lib/security/cacerts is a folder while it must be the file.

    So I would recommend double-checking the integrity of your JRE installation and eventually perform a clean install as it seems to be broken somehow

    You might also be interested in Building a JMS Testing Plan - Apache JMeter article