4

I am trying to use Jmeter to test my company's website. I was using Jmeter 2.9 and Firefox, and it was working fine. However, some parts of the website must be tested with Chrome, so I switched. For some reason, Jmeter 2.9 does not record interactions with my company's website, so I decided to upgrade to 2.11.

I created an HTTP(S) Test Script Recorder and changed Chrome's proxy settings to fit. When I tried to start the Proxy server, I got this error:

Could not create script recording proxy-see log for details: Command:'keytool -genkeypair -alias: root_ca: -dname "CN=_DO_NOT_INSTALL unless this is your certificate (JMeter root CA), OU=Username: <MY_USERNAME>, C=US" -keyalg RSA -keystore proxyserer.jks -storepass {redacted) -keypass {redacted) -validity 7 -ext bc:c' failed, code:1
Illegal option: -ext
Try keytool -help

I tried googling the Illegal option: -ext and nothing turns up. I typed keytool -help into a command line (I'm on Ubuntu) and didn't get back anything that seemed helpful.

I could use any help you've got.

DementedDr
  • 177
  • 2
  • 15

4 Answers4

5

I just ran in to this error when starting a recorder and generating a certificate. The problem turned out to be that Jmeter was using a Java 6 keytool instead of Java 7. I solved it by editing the startup script (jmeter.sh) and adding a java 7 installation path to the beginning of $PATH.

JohnnyMac
  • 85
  • 6
1

I had this exact same error when I upgraded from 2.9 to 2.11
Make sure you are starting JMeter with the JMeter startup script (.sh for Mac / Unix and .bat for Windows). This worked for me (with 2.9 I could click on the .jar file but it doesn't work on 2.11 - at least on a mac).

If this doesn't work did u make any changes to your Java version?

Ophir Prusak
  • 1,437
  • 13
  • 20
  • Trying to execute jmeter.sh doesn't do anything. I double-checked with `top`, and it doesn't open any processes in the background either. I have not made any changes to Java either. – DementedDr Feb 19 '14 at 20:34
  • Note (for noobs like me) to start jmeter using the jmeter.sh startup script, in the console type `sh jmeter.sh` (assuming you're in the jmeter bin directory). By starting this way, things went smoothly for me when starting the recording, and I didn't get the illegal option -ext error from keytool. I previously edited the startup script to add these java vars: http://stackoverflow.com/questions/26409355/error-starting-proxy-server-in-apache-jmeter – Danny Aug 21 '15 at 15:35
1

had the same error, for me this post solved the problem Quoting the author - paste this into your ...\apache-jmeter-2.13\bin\user.properties

proxy.cert.alias=anything

Community
  • 1
  • 1
laci
  • 86
  • 1
  • 5
-1

Hard (but more correct) way - use HTTP Header Manager to set User-Agent header which is used on server side to identify client's browser.

I.e. User-Agent for Firefox 25 would be

Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0

User-Agent for Chrome

Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36

Another option is using Google Chrome plugin which allows to record a JMeter script right from Google Chrome browser without needing to worry about proxies and SSL certificates. It also records correct user agent of your current Chrome browser along with other browser-derived headers like Accept-Language.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • I didn't try setting the User -Agent header, but I am trying the plugin. It's working, but not as well as Jmeter does. – DementedDr Feb 20 '14 at 19:21
  • I'm about to add "Chrome" user agent to **existing** scripts substituting "Firefox" for required site part rather than re-recording everything. It should be faster and easier – Dmitri T Feb 21 '14 at 07:59