Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem with JMeter and HTTP Proxy Server with SSL

Tags:

jmeter

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?

like image 796
rbrayb Avatar asked Aug 02 '10 02:08

rbrayb


People also ask

Does JMeter support HTTPS?

The JMeter HTTP Request is a sampler that lets you send an HTTP/HTTPS request to a web server for load testing. There are different methods the sampler is able to use, like: GET.

How SSL works in proxy server?

How Does SSL Proxy Work? SSL proxy provides secure transmission of data between a client and a server through a combination of following: Authentication-Server authentication guards against fraudulent transmissions by enabling a Web browser to validate the identity of a webserver.

Where is HTTP proxy server configured for the JMeter?

Start JMeter. Add a Thread Group by right-clicking on Test Plan and navigating to Add | Threads (User) | Thread Group. Add the HTTP Proxy Server element by right-clicking on WorkBench and navigating to Add | Non-Test Elements | HTTP Proxy Server. Change the port to 7000 (under Global Settings).


2 Answers

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

like image 64
Milamber Avatar answered Oct 04 '22 22:10

Milamber


From http://jmeter.apache.org/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

like image 21
JoseK Avatar answered Oct 04 '22 21:10

JoseK