JMeter Recorder不适用于HTTPS

时间:2018-11-23 19:33:51

标签: ssl jmeter jmeter-plugins jmeter-4.0

在您说这是关于堆栈溢出的问题之前,请仔细阅读每个答案,但没有一个作为解决方案。

无论我做什么,HTTPS网站都无法与JMeter记录器一起使用。

使用FireFox 63.03 使用JMeter 5.0 Mac OS

这是我的步骤:(https://www.youtube.com/watch?v=amEHuq8auTU

1). Create New Test Plan
2). Added a thread group
3). Added HTTP(S) recorder
4). Using port 8282 (tried 8080 earlier so trying others)
5). redirect automatically, follow redirects checked
6). Select HTTPS test script recorder for target controller
7) Add the HTTPS site (without the https)
8). Click Start
9). Getting prompted that ApacheJMeterTemporaryRootCA.crt is created
10. Triple checked that all previous ApacheJMeterTemporaryRootCA.crt are deleted in firefox cert settings
11). Install the new certificate with the two permissions checked (identify websites, identify users)
12). Now when I go to the site that I added in step 7. I get :
jmeter SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG in the browser.

当我检查jmeter日志时:

我得到:

2018-11-23 13:14:48,287 INFO o.a.j.p.h.p.Proxy: [50795]  KeyStore for SSL loaded OK and put host 'blue.mysite.com' in map with key (blue.mysite.com)
2018-11-23 13:14:48,308 INFO o.a.j.p.h.s.h.LazyLayeredConnectionSocketFactory: Setting up HTTPS TrustAll Socket Factory
2018-11-23 13:14:48,313 INFO o.a.j.u.JsseSSLManager: Using default SSL protocol: TLS
2018-11-23 13:14:48,313 INFO o.a.j.u.JsseSSLManager: SSL session context: per-thread
2018-11-23 13:14:48,326 INFO o.a.j.u.SSLManager: JmeterKeyStore Location:  type JKS
2018-11-23 13:14:48,326 INFO o.a.j.u.SSLManager: KeyStore created OK
2018-11-23 13:14:48,327 WARN o.a.j.u.SSLManager: Keystore file not found, loading empty keystore
2018-11-23 13:14:49,606 INFO o.a.j.p.h.p.Proxy: [50788]  KeyStore for SSL loaded OK and put host 'www.google.com' in map with key (www.google.com)
2018-11-23 13:14:49,613 WARN o.a.j.p.h.p.Proxy: [50788]  Problem with SSL certificate for url  for 'www.google.com'? Ensure browser is set to accept the JMeter proxy cert: readHandshakeRecord
2018-11-23 13:14:49,613 WARN o.a.j.p.h.p.Proxy: [50790]  Problem with SSL certificate for url  for 'www.google.com'? Ensure browser is set to accept the JMeter proxy cert: readHandshakeRecord
2018-11-23 13:14:49,613 WARN o.a.j.p.h.p.Proxy: [50789]  Problem with SSL certificate for url  for 'www.google.com'? Ensure browser is set to accept the JMeter proxy cert: readHandshakeRecord
2018-11-23 13:14:56,059 INFO o.a.j.p.h.p.ProxyControl: [50805]  Creating entry getpocket.cdn.mozilla.net in /usr/local/Cellar/jmeter/5.0/libexec/bin/proxyserver.jks
2018-11-23 13:14:59,048 INFO o.a.j.p.h.p.Proxy: [50805]  KeyStore for SSL loaded OK and put host 'getpocket.cdn.mozilla.net' in map with key (getpocket.cdn.mozilla.net)
2018-11-23 13:14:59,184 ERROR o.a.j.p.h.p.Proxy:
javax.net.ssl.SSLProtocolException: Broken pipe (Write failed)

我已经做过很多次了,并且一直在进行设置。似乎没有任何作用。我什至将URL切换为“ https://yahoo.com”,并将其切换为另一个个人站点“ https://lawyeranalytix.com”,以为也许我要测试的站点的SSL实现存在缺陷,但对于任何启用SSL的站点都是相同的。

4 个答案:

答案 0 :(得分:1)

  

“ www.google.com”网址存在SSL证书问题吗?确保将浏览器设置为接受JMeter代理证书

您似乎无法将JMeter的证书安装到Firefox。

尝试clearing your Firefox history并确保从一开始就删除所有内容-它将包含自定义证书。完成后重新启动Firefox。

查看以下材料:

还请注意记录JMeter测试的替代方法:

答案 1 :(得分:0)

尝试降级到oracle java jdk 10,它为我解决了这个问题。

以供进一步参考:

https://support.portswigger.net/customer/portal/questions/17434431-gettin-error-code-ssl-error-rx-record-too-long

编辑:或使用openjdk 8

答案 2 :(得分:0)

JMeter代理记录器和TLS 1.4之间似乎存在问题。我通过将Firefox TLS版本限制为1.3来解决了这个问题。

为此:

  • 在Firefox中转到about:config

  • security.tls.version.fallback-limitsecurity.tls.version.max设置为3。

然后我就能按预期进行录制。

答案 3 :(得分:0)

  1. 删除过期的证书。
  2. 从bin文件夹导入新证书。
  3. 验证证书日期有效。 这样您就可以使用HTTPS。