JMeter的2.10 HTTP记录抛出异常的keytool [英] Jmeter 2.10 HTTP recorder throws keytool exception

查看:4611
本文介绍了JMeter的2.10 HTTP记录抛出异常的keytool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图调查JMeter的,并很快会碰到一些问题。我试图按照教程在 http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf 。当我尝试启动录音机,我收到了无法创建代理错误。日志给我这个消息:

  2013年10月23日13:40:54最后INFO  -  jmeter.util.JsseSSLManager:使用默认的SSL协议:TLS
2013年10月23日13:40:54最后INFO - jmeter.util.JsseSSLManager:SSL会话的上下文:每个线程
2013年10月23日13时54分32秒WARN - jmeter.protocol.http.proxy.ProxyControl:无法打开/读取密钥存储C:\\ Apache的JMeter的2.10 \\ BIN \\ proxyserver.jks(系统无法找到文件指定)
2013年10月23日13时54分32秒INFO - jmeter.protocol.http.proxy.ProxyControl:用C创建代理C​​A:\\ Apache的JMeter的2.10 \\ BIN \\ proxyserver.jks
2013年10月23日13时54分32秒错误 - jmeter.protocol.http.proxy.ProxyControl:无法初始化密钥存储java.io.IOException异常:不能运行程序密钥工具(在目录C:\\ Apache的jmeter- 2.10 \\ BIN):CreateProcess的错误= 2,系统找不到指定的文件

我不知道为什么EXE文件不会被拾起,因为它是在我的道路,或者为什么JMeter的拉链将排除必要的文件,所以我从我的java复制密钥工具安装到该目录中,它正在爪哇和部分它并再次尝试。当我做我得到这个:


  

错误 - jmeter.protocol.http.proxy.ProxyControl:无法初始化密钥存储java.io.IOException异常:


我收到 -1073741515 的code,它作为一个初学者是无益的。我想这些东西与无指向我的代理服务器,在结果没有差异。我是在Windows 7系统的64位,和我使用JDK 1.7。

这是什么步骤,我可以纠正这个问题有什么建议?

编辑:这里是完整的日志

  2013年10月23日15时34分06秒INFO  -  jmeter.util.JMeterUtils:设置本地化为en_US
2013年10月23日15时34分06秒INFO - jmeter.JMeter:C:\\ Apache的JMeter的-0.10 \\ BIN \\ user.properties加载用户属性
2013年10月23日15时34分06秒INFO - jmeter.JMeter:C:\\ Apache的米2.10 \\ BIN \\ system.properties加载系统属性
2013年10月23日15时34分07秒INFO - jmeter.JMeter:版权所有(C)一九九八年至2013年Apache软件基金会
2013年10月23日15时34分07秒INFO - jmeter.JMeter:版本2.10 r1533061
2013年10月23日15时34分07秒INFO - jmeter.JMeter:java.version = 1.7.0_21
2013年10月23日15时34分07秒INFO - jmeter.JMeter:java.vm.name =的HotSpot的Java(TM)64位服务器VM
2013年10月23日15时34分07秒INFO - jmeter.JMeter:os.name = Windows 7的
2013年10月23日15时34分07秒INFO - jmeter.JMeter:os.arch = AMD64
2013年10月23日15时34分07秒INFO - jmeter.JMeter:os.version = 6.1
2013年10月23日15时34分07秒INFO - jmeter.JMeter:=的file.encoding的Cp1252
2013年10月23日15时34分07秒INFO - jmeter.JMeter:默认语言环境英语=(美国)
2013年10月23日15时34分07秒INFO - jmeter.JMeter:JMeter的语言环境英语=(美国)
2013年10月23日15时34分07秒INFO - jmeter.JMeter:JMeterHome = C:\\ Apache的JMeter的2.10
2013年10月23日15时34分07秒INFO - jmeter.JMeter:user.dir来= C:\\ Apache的JMeter的2.10 \\ BIN
2013年10月23日15时34分07秒INFO - jmeter.JMeter:PWD = C:\\ Apache的JMeter的2.10 \\ BIN
2013年10月23日15时34分07秒INFO - jmeter.JMeter:IP:XXXXXXXX名称:XXXXX全名:XXXXX
2013年10月23日15时34分07秒INFO - jmeter.JMeter:从组织/阿帕奇/ JMeter的/图像/ icon.properties加载图标属性
2013/10/23 15时34分07秒INFO - jmeter.engine.util.CompoundVariable:注:函数的类名必须包含字符串:.functions。
2013/10/23 15时34分07秒INFO - jmeter.engine.util.CompoundVariable:注:函数的类名称不得包含字符串:.gui。
2013年10月23日15时34分07秒INFO - jmeter.gui.action.LookAndFeelCommand:使用外观和感觉:javax.swing.plaf.metal.MetalLookAndFeel中[金属,跨平台]
2013年10月23日15时34分08秒INFO - jmeter.util.BSFTestElement:注册JMeter的版本JavaScript引擎作为工作一轮的BSF-22
2013年10月23日15时34分08秒INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:找不到.className财产的HTMLParser,使用默认
2013年10月23日15时34分08秒INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:解析器text / html的是
2013年10月23日15时34分08秒INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:解析器是application / xhtml + xml的是
2013/10/23 15时34分08秒INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:分析器应用程序/ XML是
2013年10月23日15时34分08秒INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:解析器文本/ XML是
2013/10/23 15时34分08秒INFO - jmeter.protocol.http.sampler.HTTPSamplerBase:解析器文/ vnd.wap.wml是org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2013/10/23 15时34分08秒INFO - jmeter.gui.util.MenuFactory:跳过org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui
2013/10/23 15时34分08秒INFO - jmeter.gui.util.MenuFactory:跳过org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui
2013年10月23日15时34分08秒INFO - jmeter.protocol.http.proxy.ProxyControl:HTTP(S)测试脚本记录SSL代理服务器将使用支持文件C嵌入的第三方资源键:\\ Apache的JMeter的2.10 \\ BIN \\ proxyserver.jks
2013年10月23日15时34分09秒INFO - jmeter.samplers.SampleResult:注:样本时间戳开始时间
2013年10月23日15时34分09秒INFO - jmeter.samplers.SampleResult:sampleresult.default.encoding设置为ISO-8859-1
2013年10月23日15时34分09秒INFO - jmeter.samplers.SampleResult:sampleresult.useNanoTime =真
2013年10月23日15时34分09秒INFO - jmeter.samplers.SampleResult:sampleresult.nanoThreadSleep = 5000
2013年10月23日15时34分22秒WARN - jmeter.protocol.http.proxy.ProxyControl:无法打开/读取密钥存储C:\\ Apache的JMeter的2.10 \\ BIN \\ proxyserver.jks(系统无法找到文件指定)
2013年10月23日15时34分22秒INFO - jmeter.protocol.http.proxy.ProxyControl:用C创建代理C​​A:\\ Apache的JMeter的2.10 \\ BIN \\ proxyserver.jks
2013年10月23日15时34分22秒错误 - jmeter.protocol.http.proxy.ProxyControl:无法初始化密钥存储java.io.IOException异常:不能运行程序密钥工具(在目录C:\\ Apache的jmeter- 2.10 \\ BIN):CreateProcess的错误= 2,系统找不到指定的文件
    在java.lang.ProcessBuilder.start(来源不明)
    在org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:142)
    在org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:125)
    在org.apache.jorphan.exec.KeyToolUtils.genkeypair(KeyToolUtils.java:123)
    在org.apache.jorphan.exec.KeyToolUtils.generateProxyCA(KeyToolUtils.java:181)
    在org.apache.jmeter.protocol.http.proxy.ProxyControl.initDynamicKeyStore(ProxyControl.java:1275)
    在org.apache.jmeter.protocol.http.proxy.ProxyControl.initKeyStore(ProxyControl.java:1205)
    在org.apache.jmeter.protocol.http.proxy.ProxyControl.startProxy(ProxyControl.java:431)
    在org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.startProxy(ProxyControlGui.java:485)
    在org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.actionPerformed(ProxyControlGui.java:370)
    在javax.swing.AbstractButton.fireActionPerformed(来源不明)
    在javax.swing.AbstractButton中的$ Handler.actionPerformed(来源不明)
    在javax.swing.DefaultButtonModel.fireActionPerformed(来源不明)
    在javax.swing.DefaultButtonModel.set pressed(来源不明)
    在javax.swing.plaf.basic.BasicButtonListener.mouseReleased(来源不明)
    在java.awt.Component.processMouseEvent(来源不明)
    在javax.swing.JComponent.processMouseEvent(来源不明)
    在java.awt.Component.processEvent(来源不明)
    在java.awt.Container.processEvent(来源不明)
    在java.awt.Component.dispatchEventImpl(来源不明)
    在java.awt.Container.dispatchEventImpl(来源不明)
    在java.awt.Component.dispatchEvent(来源不明)
    在java.awt.LightweightDispatcher.retargetMouseEvent(来源不明)
    在java.awt.LightweightDispatcher.processMouseEvent(来源不明)
    在java.awt.LightweightDispatcher.dispatchEvent(来源不明)
    在java.awt.Container.dispatchEventImpl(来源不明)
    在java.awt.Window.dispatchEventImpl(来源不明)
    在java.awt.Component.dispatchEvent(来源不明)
    在java.awt.EventQueue.dispatchEventImpl(来源不明)
    在java.awt.EventQueue.access $ 200(来源不明)
    在java.awt.EventQueue中的$ 3.run(来源不明)
    在java.awt.EventQueue中的$ 3.run(来源不明)
    在java.security.AccessController.doPrivileged(本机方法)
    在java.security.ProtectionDomain $ 1.doIntersectionPrivilege(​​来源不明)
    在java.security.ProtectionDomain $ 1.doIntersectionPrivilege(​​来源不明)
    在java.awt.EventQueue中的$ 4.run(来源不明)
    在java.awt.EventQueue中的$ 4.run(来源不明)
    在java.security.AccessController.doPrivileged(本机方法)
    在java.security.ProtectionDomain $ 1.doIntersectionPrivilege(​​来源不明)
    在java.awt.EventQueue.dispatchEvent(来源不明)
    在java.awt.EventDispatchThread.pumpOneEventForFilters(来源不明)
    在java.awt.EventDispatchThread.pumpEventsForFilter(来源不明)
    在java.awt.EventDispatchThread.pumpEventsForHierarchy(来源不明)
    在java.awt.EventDispatchThread.pumpEvents(来源不明)
    在java.awt.EventDispatchThread.pumpEvents(来源不明)
    在java.awt.EventDispatchThread.run(来源不明)
java.io.IOException异常:引起CreateProcess的错误= 2,系统找不到指定的文件
    在java.lang.ProcessImpl.create(本机方法)
    在java.lang.ProcessImpl<&初始化GT;(未知来源)
    在java.lang.ProcessImpl.start(来源不明)
    ... 46更多


解决方案

由于JMeter的2.10,记录进行了改进,以更好地处理嵌入资源,并在飞行证书的创建。
这使得记录复杂HTTPS的网站更容易。

要添加这些功能,JMeter的现在使用keytool工具(JDK中提供),所以你需要确保你的配置是正确的,在开始之前阅读此Wiki网页:

此外,还要确保您阅读:

请注意它可能更好用JDK7。 (JDK7应安装在系统上)

如果你不想读长的回答(你应该:-)),则:
确保您有JAVA_HOME和PATH设置是否正确,要做到这一点:
开放和的jmeter.bat添加这个(在命令的launch.exe后顶部):


  

设置JAVA_HOME =路径JDK


  
  

SET PATH =%PATH%;%JAVA_HOME%\\ bin中


重新启动JMeter的和复试。

如果它不工作,你可以通过在user.properties定义以下JMeter的物业解决方法:


  

proxy.cert.alias =什么


I am trying to investigate jmeter and have quickly run into some problems. I am attempting to follow the tutorial at http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf. When I attempt to start the recorder I get a cannot create proxy error. The logs give me this message:

2013/10/23 13:40:54 INFO  - jmeter.util.JsseSSLManager: Using default SSL protocol: TLS 
2013/10/23 13:40:54 INFO  - jmeter.util.JsseSSLManager: SSL session context: per-thread 
2013/10/23 13:54:32 WARN  - jmeter.protocol.http.proxy.ProxyControl: Could not open/read key store C:\apache-jmeter-2.10\bin\proxyserver.jks (The system cannot find the file specified) 
2013/10/23 13:54:32 INFO  - jmeter.protocol.http.proxy.ProxyControl: Creating Proxy CA in C:\apache-jmeter-2.10\bin\proxyserver.jks 
2013/10/23 13:54:32 ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Cannot run program "keytool" (in directory "C:\apache-jmeter-2.10\bin"): CreateProcess error=2, The system cannot find the file specified

I don't know why the exe would not be picked up as it is part of java and in my path or why the jmeter zip would exclude a necessary file so I copied keytool from my java install into the directory it was looking for it and tried again. when I did I got this:

ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException:

I received a code of -1073741515, which as a beginner is not helpful. I tried these things with and without pointing to my proxy server, no difference in the results. I am on a windows 7 system 64 bit, and am using jdk 1.7.

Any suggestions on what steps I can take to correct the issue?

Edit: here is the complete log

    2013/10/23 15:34:06 INFO  - jmeter.util.JMeterUtils: Setting Locale to en_US   
2013/10/23 15:34:06 INFO  - jmeter.JMeter: Loading user properties from: C:\apache-jmeter-.10\bin\user.properties   
2013/10/23 15:34:06 INFO  - jmeter.JMeter: Loading system properties from: C:\apache-meter-2.10\bin\system.properties   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: Copyright (c) 1998-2013 The Apache Software Foundation   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: Version 2.10 r1533061   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: java.version=1.7.0_21   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM 
2013/10/23 15:34:07 INFO  - jmeter.JMeter: os.name=Windows 7   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: os.arch=amd64   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: os.version=6.1   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: file.encoding=Cp1252   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: Default Locale=English (United States)   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: JMeter  Locale=English (United States)   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: JMeterHome=C:\apache-jmeter-2.10   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: user.dir  =C:\apache-jmeter-2.10\bin   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: PWD       =C:\apache-jmeter-2.10\bin   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: IP: xxxxxxxx Name: xxxxx FullName: xxxxx   
2013/10/23 15:34:07 INFO  - jmeter.JMeter: Loaded icon properties from org/apache/jmeter/images/icon.properties   
2013/10/23 15:34:07 INFO  - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'   
2013/10/23 15:34:07 INFO  - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'   
2013/10/23 15:34:07 INFO  - jmeter.gui.action.LookAndFeelCommand: Using look and feel: javax.swing.plaf.metal.MetalLookAndFeel [Metal, CrossPlatform]   
2013/10/23 15:34:08 INFO  - jmeter.util.BSFTestElement: Registering JMeter version of JavaScript engine as work-round for BSF-22   
2013/10/23 15:34:08 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find .className property for htmlParser, using default   
2013/10/23 15:34:08 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is    
2013/10/23 15:34:08 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is    
2013/10/23 15:34:08 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is    
2013/10/23 15:34:08 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is    
2013/10/23 15:34:08 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser   
2013/10/23 15:34:08 INFO  - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.control.gui.WebServiceSamplerGui   
2013/10/23 15:34:08 INFO  - jmeter.gui.util.MenuFactory: Skipping org.apache.jmeter.protocol.http.modifier.gui.ParamModifierGui   
2013/10/23 15:34:08 INFO  - jmeter.protocol.http.proxy.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file C:\apache-jmeter-2.10\bin\proxyserver.jks   
2013/10/23 15:34:09 INFO  - jmeter.samplers.SampleResult: Note: Sample TimeStamps are START times   
2013/10/23 15:34:09 INFO  - jmeter.samplers.SampleResult: sampleresult.default.encoding is set to ISO-8859-1   
2013/10/23 15:34:09 INFO  - jmeter.samplers.SampleResult: sampleresult.useNanoTime=true   
2013/10/23 15:34:09 INFO  - jmeter.samplers.SampleResult: sampleresult.nanoThreadSleep=5000   
2013/10/23 15:34:22 WARN  - jmeter.protocol.http.proxy.ProxyControl: Could not open/read   key store C:\apache-jmeter-2.10\bin\proxyserver.jks (The system cannot find the file specified)   
2013/10/23 15:34:22 INFO  - jmeter.protocol.http.proxy.ProxyControl: Creating Proxy CA in C:\apache-jmeter-2.10\bin\proxyserver.jks   
2013/10/23 15:34:22 ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Cannot run program "keytool" (in directory "C:\apache-jmeter-2.10\bin"): CreateProcess error=2, The system cannot find the file specified  
    at java.lang.ProcessBuilder.start(Unknown Source)
    at org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:142)
    at org.apache.jorphan.exec.SystemCommand.run(SystemCommand.java:125)
    at org.apache.jorphan.exec.KeyToolUtils.genkeypair(KeyToolUtils.java:123)
    at org.apache.jorphan.exec.KeyToolUtils.generateProxyCA(KeyToolUtils.java:181)
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.initDynamicKeyStore(ProxyControl.java:1275)
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.initKeyStore(ProxyControl.java:1205)
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.startProxy(ProxyControl.java:431)
    at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.startProxy(ProxyControlGui.java:485)
    at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.actionPerformed(ProxyControlGui.java:370)
    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$200(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)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 46 more

解决方案

Since JMeter 2.10, recording has been improved to better handle embedded resources and creation of certificates on the fly. This makes recording complex HTTPS websites much easier.

To add these features, JMeter now uses keytool utility (available in JDK) so you need to ensure your configuration is correct, read this wiki page before starting:

Also ensure you read:

Note it is much better to use a JDK7. (jdk7 should be installed on the system)

If you don't want to read the long answer (which you should :-) ), then: Ensure you have JAVA_HOME and PATH set correctly, to do it: Open jmeter.bat and add this (at the top after launch.exe command):

SET JAVA_HOME=Path to JDK

SET PATH=%PATH%;%JAVA_HOME%\bin

Restart JMeter and retest.

If it doesn't work, you can workaround by defining the following JMeter property in user.properties:

proxy.cert.alias=anything

这篇关于JMeter的2.10 HTTP记录抛出异常的keytool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆