Jmeter中使用JDBC连接SqlServer报错:
Response message:java.sql.SQLException: Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:4ac8404c-7d5f-4c54-9d32-44cfdaa7e372)
环境信息:
Jmeter v5.2.1
JDK v1.8.0_152
在网上找到的大部分方法:
1,删除jre目录下面的java.security 中的 ‘3DES_EDE_CBC’ (在'jdk.tls.legacyAlgorithms')
2,删除‘jdk.tls.disabledAlgorithms’中的TLS1.1 等
结果:在本地环境都试了一下,没有任何作用,还是会报错
解决办法:
升即jdk版本到v1.8.0_291. Jmeter v5.2.1, jdk v1.8.0_291;可以正常使用
很可能因为jdk 和 jmeter的版本不兼容