啟動Jmeter錄制代理進行錄制,報 jmeter.protocol.http.proxy.ProxyControl
使用jmeter代理錄制Http請求時,啟動HTTP(S) Test Script Recorder報jmeter.protocol.http.proxy.ProxyControl,
日誌為:
2018/05/19 15:47:05 INFO - jmeter.protocol.http.proxy.ProxyControl: Creating Proxy CA in D:\LT\Jmeter\apache-jmeter-3.0\bin\proxyserver.jks
2018/05/19 15:47:05 ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: >> 非法選項: -ext
嘗試 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: liutao, C=CN" -keyalg RSA -keystore proxyserver.jks -storepass {redacted} -keypass {redacted} -validity 7 -ext bc:c‘
at org.apache.jorphan.exec.KeyToolUtils.genkeypair(KeyToolUtils.java:165)
at org.apache.jorphan.exec.KeyToolUtils.generateProxyCA(KeyToolUtils.java:232)
at org.apache.jmeter.protocol.http.proxy.ProxyControl.initDynamicKeyStore(ProxyControl.java:1426)
at org.apache.jmeter.protocol.http.proxy.ProxyControl.initKeyStore(ProxyControl.java:1353)
at org.apache.jmeter.protocol.http.proxy.ProxyControl.startProxy(ProxyControl.java:476)
at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.startProxy(ProxyControlGui.java:516)
at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.actionPerformed(ProxyControlGui.java:390)
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.LightweightDispatche
解決過程:
1、查看各個原件配置是否正常
2、jmeter下bin目錄是否有proxyserver.jks,目錄下面確實沒有,拷貝進去之後,重啟Jmeter問題沒有解決
3、
問題解決,可以正常錄制。
PS:作為jmeter新手解決問題之後,會特別高興。
啟動Jmeter錄制代理進行錄制,報 jmeter.protocol.http.proxy.ProxyControl