JMeter https代理记录不起作用 [英] JMeter https proxy recording not working
问题描述
目标应用程序托管于:
I am recording a https session of a JSF based web app on JMeter and it's not working.
/ strong> AWS
JMeter版本: 2.9 r1437961
浏览器: Chrome版本29.0.1547.65
Java: Java版本1.6.0_27
OpenJDK运行时环境(IcedTea6 1.12.5)(6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK Server VM(内建20.0-b12,混合模式)
操作系统: Ubuntu 12.04
Target application is hosted on: AWS
JMeter version: 2.9 r1437961
Browser: Chrome version 29.0.1547.65
Java: java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK Server VM (build 20.0-b12, mixed mode)
OS: Ubuntu 12.04
代理服务器配置:
端口:8084
目标控制器:测试计划>线程组
捕获HTTP标头被选中。
HTTP示例设置:
类型:未选中。关注重定向并使用KeepAlive进行检查。
Proxy server config:
Port: 8084
Target Controller: Test Plan > Thread Group
Capture HTTP headers is checked.
HTTP Sample settings:
Type: not selected. Follow Redirects and Use KeepAlive checked.
要排除的网址格式:
1.添加了建议的排除项目
2 。* \.jsf
URL patterns to exclude:
1. Added Suggested Excludes
2. .*\.jsf
引发的异常(来自JMeter.log):
Exceptions that are getting thrown (from JMeter.log):
ERROR - jmeter.protocol.http.proxy.Proxy: java.net.SocketException: Connection closed by remote host
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1377)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:62)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.apache.jmeter.protocol.http.proxy.Proxy.writeToClient(Proxy.java:404)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:218)
ERROR - jmeter.protocol.http.proxy.Proxy: Problem with SSL certificate? Ensure browser is set to accept the JMeter proxy cert: Connection closed by remote host java.net.SocketException: Connection closed by remote host
at sun.security.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1377)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:62)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.apache.jmeter.protocol.http.proxy.Proxy.writeToClient(Proxy.java:404)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:218)
步骤I以下是:
1.将代理服务器指向8084.
2.从chrome更改代理设置:
将https代理设置为8084.
3.禁用所有的Chrome扩展和Chrome账户。
4.启动jmeter代理服务器并点击 https:// url / login
5.证书确认浏览器上出现一个页面。同时,jmeter.log显示:
The steps I am following are:
1. Set proxy server pointing to 8084.
2. Change proxy settings from chrome:
Set https proxy to 8084.
3. Disabled all chrome extensions and chrome account.
4. Started jmeter proxy server and hit https://url/login
5. Certificate confirmation page appears on browser. Meanwhile, jmeter.log shows:
2013/09/11 13:16:30 INFO - jmeter.protocol.http.proxy.Daemon: Creating Daemon Socket on port: 8084
2013/09/11 13:16:30 INFO - jmeter.protocol.http.proxy.Daemon: Proxy up and running!
2013/09/11 13:22:39 INFO - jmeter.protocol.http.proxy.Proxy: Proxy will remove the headers: If-Modified-Since,If-None-Match,Host
2013/09/11 13:22:39 INFO - jmeter.protocol.http.proxy.Proxy: Opened Keystore file: /home/abhijeet/Automation_Dev/LoadAutomation/Jmeter/apache-jmeter-2.9/bin/proxyserver.jks
2013/09/11 13:22:39 INFO - jmeter.protocol.http.proxy.Proxy: KeyStore for SSL loaded OK and put host in map (clients4.google.com)
2013/09/11 13:22:39 INFO - jmeter.protocol.http.proxy.Proxy: Opened Keystore file: /home/abhijeet/Automation_Dev/LoadAutomation/Jmeter/apache-jmeter-2.9/bin/proxyserver.jks
2013/09/11 13:22:39 INFO - jmeter.protocol.http.proxy.Proxy: KeyStore for SSL loaded OK and put host in map (translate.googleapis.com)
2013/09/11 13:22:40 INFO - jmeter.protocol.http.sampler.HTTPHCAbstractImpl: Local host = abhijeet-desktop
2013/09/11 13:22:40 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl: HTTP request retry count = 1
2013/09/11 13:22:40 INFO - jmeter.protocol.http.sampler.HTTPHC4Impl: Setting up HTTPS TrustAll scheme
2013/09/11 13:22:40 INFO - jmeter.protocol.http.proxy.FormCharSetFinder: Using htmlparser version: 2.0 (Release Build Sep 17, 2006)<br>
6。线程组开始向这些域显示未知请求:
6. Thread group starts showing unknown requests to these domains:
1. translate.googleapis.com
2. clients4.google.com
3. www.google.co.in
4. www.google.com
5. ssl.gstatic.com
6. safebrowsing.google.com
7. alt1-safebrowsing.google.com
8. clients4.google.com
9. www.gstatic.com
.
.
n all other requests going to the target application.
(对于每个请求,抛出上述异常)
(For every request the above exceptions are thrown)
我相信,上面的google域名请求会被记录下来,因为chrome会动态地搜索google上的关键字,而我正在地址栏中输入url字符串。但我不希望这些请求被记录在线程组中。
I believe, the google domain requests above are getting recorded because chrome is dynamically searching the keywords on google, while I am typing the url string in the address bar. But I don't want these requests to get recorded in the Thread Group.
另外,我尝试了这些页面的解决方案,但它们不适用于me:
链接1
链接2
链接3
Also, I tried the solutions from these pages but they didn't work for me:
Link 1
Link 2
Link 3
我不明白,为什么JMeter不能使用假证书它已经拥有了。我查看了Chrome中的SSL设置,但找不到任何JMeter证书。需要帮助!!
I don't understand, why is JMeter not able to use the fake certificate that it already has. I checked the SSL settings in chrome and I could not find any JMeter certificates. Need help!!
推荐答案
我有同样的问题并解决它以信任证书。就像你在看
I have the same problem and solve it to trust the certificate. Just like you when i look at the
Options > Advanced > Certificates > View Certificates ==> Authorities
并且看不到名称 ApacheJMeterRootCertificate.crt 或相关名称,但我知道有一个名称类似于
and couldn't see a name ApacheJMeterRootCertificate.crt or a related name, but i realize that there is a name something like
_DO NOT INSTALL,除非这是您的证书
_DO NOT INSTALL unless this is your certificate
我在这个对象下点击这个对象和'Edit_Trust'这两个项目。我分享我的截图。我希望这可以帮助你和其他人。
I click this object and 'Edit_Trust' both item under this object. I share my screenshot. I hope this can be help you and others.
我使用Firefox。在chrome中,应该有类似的方式来编辑证书。
I use Firefox. At chrome there should be similar way to edit the certificate.
这篇关于JMeter https代理记录不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!