JMeter 记录器不适用于 HTTPS
JMeter Recorder is not working with HTTPS
请在您说这是关于堆栈溢出的问题之前,我已经查看了每一个答案,其中 none 个正在作为解决方案。
无论我做什么,HTTPS 网站都无法使用 JMeter 记录器。
使用 FireFox 63.03
使用 JMeter 5.0
MacOS
这是我的步骤:(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' and to another personal site 'https://lawyeranalytix.com',我想也许我要测试的站点的 SSL 实施存在缺陷,但它与任何启用 SSL 的站点都一样。
Problem with SSL certificate for url for 'www.google.com'? Ensure browser is set to accept the JMeter proxy cert
您似乎未能将 JMeter 的证书安装到 Firefox。
尝试 clearing your Firefox history 并确保从一开始就删除所有内容 - 它将包括自定义证书。完成后重新启动 Firefox。
查看以下材料:
- HTTPS 记录和证书 HTTP(S) Test Script Recorder 用户手册章节
章节
- Recording HTTPS Traffic with JMeter's Proxy Server
另请注意记录 JMeter 测试的替代方法:
尝试降级到oracle java jdk 10,它解决了我的问题。
进一步参考:
编辑:或使用 openjdk 8
JMeter 代理记录器和 TLS 1.4 之间似乎存在问题。我通过将 Firefox TLS 版本限制为 1.3 解决了这个问题。
为此:
在 Firefox
中转到 about:config
将security.tls.version.fallback-limit
和security.tls.version.max
设置为3。
然后就可以正常录制了
- 删除过期的证书。
- 从 bin 文件夹导入新证书。
- 验证证书日期是否有效。
然后您就可以使用 HTTPS 了。
用jmetter,可以在firefox上录制。但是,如果定义代理对您来说很复杂,您可以使用 Loadium Record & Play Chrome Extension。您可以从下面的 link 访问它。
请在您说这是关于堆栈溢出的问题之前,我已经查看了每一个答案,其中 none 个正在作为解决方案。
无论我做什么,HTTPS 网站都无法使用 JMeter 记录器。
使用 FireFox 63.03 使用 JMeter 5.0 MacOS
这是我的步骤:(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' and to another personal site 'https://lawyeranalytix.com',我想也许我要测试的站点的 SSL 实施存在缺陷,但它与任何启用 SSL 的站点都一样。
Problem with SSL certificate for url for 'www.google.com'? Ensure browser is set to accept the JMeter proxy cert
您似乎未能将 JMeter 的证书安装到 Firefox。
尝试 clearing your Firefox history 并确保从一开始就删除所有内容 - 它将包括自定义证书。完成后重新启动 Firefox。
查看以下材料:
- HTTPS 记录和证书 HTTP(S) Test Script Recorder 用户手册章节 章节
- Recording HTTPS Traffic with JMeter's Proxy Server
另请注意记录 JMeter 测试的替代方法:
尝试降级到oracle java jdk 10,它解决了我的问题。
进一步参考:
编辑:或使用 openjdk 8
JMeter 代理记录器和 TLS 1.4 之间似乎存在问题。我通过将 Firefox TLS 版本限制为 1.3 解决了这个问题。
为此:
在 Firefox
中转到 将
security.tls.version.fallback-limit
和security.tls.version.max
设置为3。
about:config
然后就可以正常录制了
- 删除过期的证书。
- 从 bin 文件夹导入新证书。
- 验证证书日期是否有效。 然后您就可以使用 HTTPS 了。
用jmetter,可以在firefox上录制。但是,如果定义代理对您来说很复杂,您可以使用 Loadium Record & Play Chrome Extension。您可以从下面的 link 访问它。