无法在jmeter中运行Http(s)脚本记录器

无法在jmeter中运行Http(s)脚本记录器,jmeter,Jmeter,对于使用JMeter录制场景,请在单击Http(S)脚本记录器中的开始按钮后获取错误消息 并将日志作为 2015/10/05 18:10:35 INFO - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22 2015/10/05 18:10:36 INFO - jmeter.protocol.http.sampler.HTTPSampler

对于使用JMeter录制场景,请在单击Http(S)脚本记录器中的开始按钮后获取错误消息

并将日志作为

2015/10/05 18:10:35 INFO  - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22 
2015/10/05 18:10:36 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find .className property for htmlParser, using default 
2015/10/05 18:10:36 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is  
2015/10/05 18:10:36 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is  
2015/10/05 18:10:36 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is  
2015/10/05 18:10:36 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is  
2015/10/05 18:10:36 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 
2015/10/05 18:10:36 INFO  - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui 
2015/10/05 18:10:36 INFO  - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui 
2015/10/05 18:10:37 INFO  - jorphan.exec.KeyToolUtils: keytool found at 'keytool' 
2015/10/05 18:10:37 INFO  - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file D:\jmeter\apache-jmete-2.13\apache-jmeter-2.13\bin\proxyserver.jks 
2015/10/05 18:10:38 INFO  - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times 
2015/10/05 18:10:38 INFO  - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1 
2015/10/05 18:10:38 INFO  - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true 
2015/10/05 18:10:38 INFO  - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000 
2015/10/05 18:11:01 WARN  - jmeter.protocol.http.proxy.ProxyControl: Could not open/read key store D:\jmeter\apache-jmete-2.13\apache-jmeter-2.13\bin\proxyserver.jks (The system cannot find the file specified) 
2015/10/05 18:11:01 INFO  - jmeter.protocol.http.proxy.ProxyControl: Creating Proxy CA in D:\jmeter\apache-jmete-2.13\apache-jmeter-2.13\bin\proxyserver.jks 
2015/10/05 18:11:02 ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException:   >> Illegal option:  -ext
Try keytool -help <<
Command failed, code: 1
'keytool -genkeypair -alias :root_ca: -dname "CN=_ DO NOT INSTALL unless this is your certificate (JMeter root CA), OU=Username: Admin, C=IN" -keyalg RSA -keystore proxyserver.jks -storepass {redacted} -keypass {redacted} -validity 7 -ext bc:c'
    at org.apache.jorphan.exec.KeyToolUtils.genkeypair(KeyToolUtils.java:170)
    at org.apache.jorphan.exec.KeyToolUtils.generateProxyCA(KeyToolUtils.java:234)
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.initDynamicKeyStore(ProxyControl.java:1429)
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.initKeyStore(ProxyControl.java:1356)
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.startProxy(ProxyControl.java:465)
    at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.startProxy(ProxyControlGui.java:507)
    at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.actionPerformed(ProxyControlGui.java:381)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$500(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
2015/10/05 18:10:35信息-jmeter.util.BSFTestElement:注册jmeter版本的JavaScript引擎作为BSF-22的工作循环
2015/10/05 18:10:36信息-jmeter.protocol.http.sampler.HTTPSamplerBase:无法找到htmlParser的.className属性,使用默认值
2015/10/05 18:10:36信息-jmeter.protocol.http.sampler.HTTPSamplerBase:text/html的解析器是
2015/10/05 18:10:36信息-jmeter.protocol.http.sampler.HTTPSamplerBase:application/xhtml+xml解析器是
2015/10/05 18:10:36 INFO-jmeter.protocol.http.sampler.HTTPSamplerBase:application/xml的解析器是
2015/10/05 18:10:36 INFO-jmeter.protocol.http.sampler.HTTPSamplerBase:text/xml的解析器是
2015/10/05 18:10:36信息-jmeter.protocol.http.sampler.HTTPSamplerBase:text/vnd.wap.wml的解析器是org.apache.jmeter.protocol.http.Parser.RegexpHTMLParser
2015/10/05 18:10:36信息-jmeter.gui.util.MenuFactory:跳过org.apache.jmeter.protocol.http.control.gui.webservices示例gui
2015/10/05 18:10:36信息-jmeter.gui.util.MenuFactory:跳过org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui
2015/10/05 18:10:37信息-jorphan.exec.KeyToolUtils:keytool位于“keytool”
2015/10/05 18:10:37 INFO-jmeter.protocol.http.proxy控制:http(S)测试脚本记录器SSL代理将使用支持文件D:\jmeter\apache-jmete-2.13\apache-jmeter-2.13\bin\proxyserver.jks中嵌入的第三方资源的密钥
2015/10/05 18:10:38信息-jmeter.samplers.SampleResult:注意:样本时间戳是开始时间
2015/10/05 18:10:38信息-jmeter.samplers.SampleResult:SampleResult.default.encoding设置为ISO-8859-1
2015/10/05 18:10:38信息-jmeter.samplers.SampleResult:SampleResult.useNanoTime=true
2015/10/05 18:10:38信息-jmeter.samplers.SampleResult:SampleResult.nanothread sleep=5000
2015/10/05 18:11:01警告-jmeter.protocol.http.proxy.ProxyControl:无法打开/读取密钥存储D:\jmeter\apache-jmete-2.13\apache-jmeter-2.13\bin\proxyserver.jks(系统找不到指定的文件)
2015/10/05 18:11:01信息-jmeter.protocol.http.proxy.ProxyControl:在D:\jmeter\apache-jmete-2.13\apache-jmeter-2.13\bin\proxyserver.jks中创建代理CA
2015/10/05 18:11:02错误-jmeter.protocol.http.proxy.ProxyControl:无法初始化密钥存储java.io.IOException:>>非法选项:-ext

试试keytool-help看起来您需要将JDK(或JRE)升级到最新版本

如果你能选择,我推荐你。由于2.10版JMeter明确依赖于Java 7特定的“keytool”应用程序选项来生成用于记录HTTPS流量的自签名证书

  • wiki页面提供详细说明

  • 更多疑难解答提示指南