Bug 62940 - Unable to record IP based URL
Summary: Unable to record IP based URL
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 4.0
Hardware: All All
: P2 enhancement (vote)
Target Milestone: JMETER_5.1
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2018-11-22 09:33 UTC by gsmba6
Modified: 2018-12-18 22:28 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gsmba6 2018-11-22 09:33:15 UTC
Hi Team,


When I try to record HTTPS based site which have IP rather DNS and I could see the log from jmeter as below. 

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 10.32.120.143 -dname "cn=10.32.120.143, o=JMeter Proxy (TEMPORARY TRUST ONLY)" -keyalg RSA -keystore proxyserver.jks -storepass {redacted} -keypass {redacted} -validity 7 -ext san=dns:10.32.120.143'
	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.updateKeyStore(ProxyControl.java:1563) ~[ApacheJMeter_http.jar:4.0 r1823414]
	at org.apache.jmeter.protocol.http.proxy.Proxy.getSSLSocketFactory(Proxy.java:324) [ApacheJMeter_http.jar:4.0 r1823414]
	at org.apache.jmeter.protocol.http.proxy.Proxy.startSSL(Proxy.java:429) [ApacheJMeter_http.jar:4.0 r1823414]
	at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:194) [ApacheJMeter_http.jar:4.0 r1823414]
Comment 1 gsmba6 2018-11-22 09:35:16 UTC
I have used different version of jdk and I'm getting the same result.
Comment 2 Felix Schumacher 2018-11-24 15:42:20 UTC
Date: Sat Nov 24 15:40:02 2018
Thanks for the report. It should be fixed in trunk and released with the next version (probably 5.1).

Could you please test the next nightly?

New Revision: 1847368

URL: http://svn.apache.org/viewvc?rev=1847368&view=rev
Log:
Use different cn and type of SAN extension when we are generating certificates based on IP addresses.

Bugzilla Id: 62940

Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
    jmeter/trunk/test/src/org/apache/jorphan/exec/TestKeyToolUtils.java
    jmeter/trunk/xdocs/changes.xml
Comment 3 gsmba6 2018-11-26 08:15:27 UTC
I've used revision - r1847369 and this fixed the keytool issue. 

Thanks,
Gnana sekar
Comment 4 The ASF infrastructure team 2022-09-24 20:38:15 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4929