java Jmeter:客户端首选项不接受服务器选择的协议版本TLS10 [TLS12]

pxiryf3j  于 2023-02-28  发布在  Java
关注(0)|答案(1)|浏览(300)

我正在使用JMeter 5.4.2和Jdk8,但是当我尝试点击soap服务时,我得到了avax.net.ssl.SSLHandshakeException。我无法控制远程服务器,我想知道是否可以更改客户端中的任何内容以使其工作。尝试查看Jrejava.security文件,但是我在禁用列表中没有看到TLS1.0:

jdk.tls.disabledAlgorithms=SSLv3, RC4, MD5withRSA, DH keySize < 768

这是我的例外:

javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS12]
    at com.ibm.jsse2.g.a(g.java:28)
    at com.ibm.jsse2.g.a(g.java:48)
    at com.ibm.jsse2.bb.a(bb.java:33)
    at com.ibm.jsse2.bb.a(bb.java:81)
    at com.ibm.jsse2.bb.a(bb.java:187)
    at com.ibm.jsse2.a2$b.b(a2$b.java:41)
    at com.ibm.jsse2.a2$b.consume(a2$b.java:21)
    at com.ibm.jsse2.p.consume(p.java:58)
    at com.ibm.jsse2.aa.a(aa.java:207)
    at com.ibm.jsse2.aa.a(aa.java:287)
    at com.ibm.jsse2.bb.a(bb.java:195)
    at com.ibm.jsse2.a0.a(a0.java:43)
    at com.ibm.jsse2.bj.b(bj.java:8)
    at com.ibm.jsse2.bj.f(bj.java:81)
    at com.ibm.jsse2.bj.a(bj.java:55)
    at com.ibm.jsse2.bj.startHandshake(bj.java:20)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
    at org.apache.jmeter.protocol.http.sampler.hc.LazyLayeredConnectionSocketFactory.connectSocket(LazyLayeredConnectionSocketFactory.java:91)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionOperator.connect(HTTPHC4Impl.java:404)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:935)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:646)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1296)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1285)
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.lang.Thread.run(Thread.java:825)
ee7vknir

ee7vknir1#

Java 11中删除了TLS 1.0支持
我java.security在Microsoft OpenJDK implementation中的www.example.com配置如下所示:

jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
    include jdk.disabled.namedCurves

因此,您要么需要从那里删除这个TLSv1位,要么降级到更早的Java版本,JMeter 5.5需要Java8才能运行。

相关问题