keytool错误:java.lang.RuntimeException:java.io.IOException:DNSName组件必须以字母<<开头命令失败,代码:1

时间:2018-05-28 07:08:58

标签: jmeter jmx jmeter-plugins

  

这个问题已经有了答案here

过去几天我与jmeter合作。它工作得很好。

但是今天当我尝试使用http脚本记录器录制新脚本时,当我点击开始时,我会遇到异常......

java.io.IOException:   >> keytool error: java.lang.RuntimeException: java.io.IOException: DNSName components must begin with a letter <<
Command failed, code: 1
'keytool -genkeypair -alias 104.211.242.218 -dname "cn=104.211.242.218, o=JMeter Proxy (TEMPORARY TRUST ONLY)" -keyalg RSA -keystore proxyserver.jks -storepass {redacted} -keypass {redacted} -validity 7 -ext san=dns:104.211.242.218'
    at org.apache.jorphan.exec.KeyToolUtils.genkeypair(KeyToolUtils.java:171) ~[jorphan.jar:4.0 r1823414]
    at org.apache.jorphan.exec.KeyToolUtils.generateSignedCert(KeyToolUtils.java:285) ~[jorphan.jar:4.0 r1823414]
    at org.apache.jorphan.exec.KeyToolUtils.generateHostCert(KeyToolUtils.java:276) ~[jorphan.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.initDynamicKeyStore(ProxyControl.java:1540) ~[ApacheJMeter_http.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.initKeyStore(ProxyControl.java:1447) ~[ApacheJMeter_http.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.http.proxy.ProxyControl.startProxy(ProxyControl.java:530) [ApacheJMeter_http.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.startProxy(ProxyControlGui.java:569) [ApacheJMeter_http.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.http.proxy.gui.ProxyControlGui.actionPerformed(ProxyControlGui.java:424) [ApacheJMeter_http.jar:4.0 r1823414]
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) [?:1.8.0_131]
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) [?:1.8.0_131]
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) [?:1.8.0_131]
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source) [?:1.8.0_131]
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) [?:1.8.0_131]
    at java.awt.Component.processMouseEvent(Unknown Source) [?:1.8.0_131]
    at javax.swing.JComponent.processMouseEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.Component.processEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.Container.processEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.Component.dispatchEventImpl(Unknown Source) [?:1.8.0_131]
    at java.awt.Container.dispatchEventImpl(Unknown Source) [?:1.8.0_131]
    at java.awt.Component.dispatchEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.Container.dispatchEventImpl(Unknown Source) [?:1.8.0_131]
    at java.awt.Window.dispatchEventImpl(Unknown Source) [?:1.8.0_131]
    at java.awt.Component.dispatchEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_131]
    at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_131]
    at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_131]
    at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_131]
    at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_131]
    at java.awt.EventQueue$4.run(Unknown Source) [?:1.8.0_131]
    at java.awt.EventQueue$4.run(Unknown Source) [?:1.8.0_131]
    at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_131]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_131]
    at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_131]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_131]
    at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_131]

1 个答案:

答案 0 :(得分:1)

这可能是由bug in Java引起的,因为有很多域以数字开头,如

所以选项包括: