java - java.io.IOException:重新抛出为 IOE
问题描述
在尝试访问简单的 HTTPS Web 服务 (GET) 请求时,得到以下 Java IO 异常,但是当我在浏览器上访问相同的 HTTPS URL 时,得到了成功的响应。同样对于 HTTP GET 请求,它工作正常
java.io.IOException: Rethrown as IOE
at org.apache.jmeter.util.HttpSSLProtocolSocketFactory.getSSLSocketFactory(HttpSSLProtocolSocketFactory.java:115)
at org.apache.jmeter.util.HttpSSLProtocolSocketFactory.createSocket(HttpSSLProtocolSocketFactory.java:134)
at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:405)
at sun.net.NetworkClient.doConnect(NetworkClient.java:162)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1138)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1032)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:539)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1231)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1220)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.security.NoSuchAlgorithmException: TLSv1.2 //(Forcibly set the TLS to TLSv1.2 rather than defaulting to SSLv3) SSLContext not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at org.apache.jmeter.util.JsseSSLManager.createContext(JsseSSLManager.java:210)
at org.apache.jmeter.util.JsseSSLManager.getContext(JsseSSLManager.java:176)
at org.apache.jmeter.util.HttpSSLProtocolSocketFactory.getSSLSocketFactory(HttpSSLProtocolSocketFactory.java:112)
解决方案
Java
您使用的版本JMeter
不支持 TLSv1.2。
检查那个。
推荐阅读
- javascript - 选项卡内的事件范围
- linux - 如何将所有合并的远程 git 分支转换为标签?(创建标签,删除分支)
- python - Python:从包含特定单词的文本中选择一个子句
- xml - 使用应用模板时只选择祖父母下的第一个值
- apache-kafka - 为什么尝试查看偏移量时kafka会显示错误?
- selenium - 如何使用 ChromeDriver Chrome 和 Selenium 摆脱 BrowserStack Local 扩展弹出窗口
- ios - NFCTagReaderSession 不启动阅读器会话 IOS 13
- guidewire - 我可以创建多个签名 .pcf 文件吗?
- wordpress - 如果满足元数据的特定条件,是否可以在 Wodpress 中中止发布更新?
- javascript - 如何在 JQuery 中获取鼠标事件?