tags:

views:

301

answers:

3

We are using JMeter 2.4 and are trying to use the HTTP Proxy Server to capture a test plan.

"Attempt HTTPS spoofing" is not ticked.

The error we get in the JMeter log is:

2010/08/02 14:46:02 ERROR - jmeter.protocol.http.proxy.Proxy: Problem with SSL certificate? Ensure browser is set to accept the JMeter proxy cert:
Connection closed by remote host 2010/08/02 14:46:02 INFO - jmeter.protocol.http.sampler.HTTPSampler: Error Response Code: 404
2010/08/02 14:46:02 INFO - jmeter.protocol.http.sampler.HTTPSampler: Error Response Code: 404
2010/08/02 14:46:02 ERROR - jmeter.protocol.http.proxy.Proxy: java.net.SocketException: Connection closed by remote host
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWrite(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at org.apache.jmeter.protocol.http.proxy.Proxy.writeToClient(Proxy.java:443)
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:264)

Any ideas?

A: 

From http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Proxy_Server

When recording HTTPS, the JMeter proxy server uses a dummy certificate to enable it to accept the SSL connection from the browser. This certificate is not one of the certificates that browsers normally trust, and will not be for the correct host, so the browser should display a dialogue asking if you want to accept the certificate or not. For example: 1) The server's name "www.example.com" does not match the certificate's name "JMeter Proxy". Somebody may be trying to eavesdrop on you. 2) The certificate for "JMeter Proxy" is signed by the unknown Certificate Authority "JMeter Proxy". It is not possible to verify that this is a valid certificate. You will need to accept the certificate in order to allow the JMeter Proxy to intercept the SSL traffic in order to record it. You should only accept the certificate temporarily.

Also see here http://osdir.com/ml/jmeter-dev.jakarta.apache.org/2009-08/msg00005.html

JoseK
A: 

You may have to create the certificate for Jmeter. Below is a fantastic article detailing how to do it:

http://www.java-samples.com/showtutorial.php?tutorialid=210

BlackGaff
A: 

Hello,

You must remove in your browser the auto-signed certificat in relation with your website, and restart a record session with JMeter 2.4. In this new session, accept the JMeter's dummy cert.

(in Firefox : Options > Advanced > Encryption > View Certificates ==> Certificat Manager > Servers > choose website cert and Delete...)

Milamber

Milamber