JMETER 错误 - 无法加载信任库:/var/tmp/jre1.8.0_281/lib/security/cacerts - 由 java.io.FileNotFoundException 引起

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

我正在尝试从我的 linux VM 进行 运行 测试,并且在与 Solace Broker 建立 SSL 连接时遇到以下错误。

javax.naming.NamingException:无法加载信任库:/var/tmp/jre1.8.0_281/lib/security/cacerts - 由 java.io.FileNotFoundException - /var/tmp/jre1 引起.8.0_281/lib/security/cacerts(是目录)[根异常是com.solacesystems.jcsmp.InvalidPropertiesException:无法加载信任库:/var/tmp/jre1.8.0_281/lib/security/cacerts]

我是 运行ning 脚本,在 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

很可能您的 JDK 安装有问题,根据 The Java Developer’s Guide to SSL Certificates 文章:

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.

根据您得到的错误,/var/tmp/jre1.8.0_281/lib/security/cacerts 是一个文件夹,但它必须是文件。

所以我建议仔细检查 JRE 安装的完整性,并最终执行全新安装,因为它似乎以某种方式损坏了

您可能还对 Building a JMS Testing Plan - Apache JMeter 文章感兴趣