You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Noel O'Brien <no...@newbay.com> on 2009/05/19 15:07:28 UTC

Recording from J2ME WTK App

Hi All, 

I'm trying to use the Recording Proxy to capture the traffic from our client (a J2ME app which uses HTTP) to our server. I've set up JMeter (2.3.2) correctly and when I enable my browser to user the JMeter proxy (as a test) it successfully records requests. 

I've set the proxy settings in the Wireless Toolkit (Sun, 2.5.2) and run the emulator. Traffic is hitting the proxy but I'm getting "[Sample Failed]" and "Cannot handle CONNECT - probably used HTTPS". I'm not using HTTPS , all the traffic is HTTP. From looking at the code, the problem seems to be that the JMeter proxy won't handle a CONNECT request (I've substituted the url): 


2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: browser request: CONNECT <the url>:80 HTTP/1.1 

2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parser input: CONNECT <the url>:80 HTTP/1.1 

2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed method: CONNECT 
2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed url: <the url>:80 
2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed version:HTTP/1.1 
2009/05/19 13:50:45 ERROR - jmeter.protocol.http.proxy.Proxy: Not implemented (probably used https) java.lang.IllegalArgumentException: Cannot handle CONNECT - probably used HTTPS 
at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parseFirstLine(HttpRequestHdr.java:212) 
at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parse(HttpRequestHdr.java:164) 
at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:165) 

Any thoughts on how to get around this problem? 

-- 
Regards, 
Noel 

Re: Recording from J2ME WTK App

Posted by sebb <se...@gmail.com>.
On 19/05/2009, Noel O'Brien <no...@newbay.com> wrote:
> Hi,
>
>  Thanks for you input sebb. I was planning to use it for building a traffic model for use in performance testing, which is due to start tomorrow. I don't know how much work it is to set up a real proxy so I think it would be more wise to spend my time picking up the traffic model with Wireshark and manually inputting it into JMeter.

There are several proxies that are quite easy to set up.

For example:

http://wiki.apache.org/jakarta-jmeter/NetworkSniffer

Try TCPMon.

If the requests are not all that complicated, you can record the URLs
in a file and use CSV Dataset to read them. Full URLs can be used in
the HTTP Path: field.

It gets a bit more complicated for POST requests, unless these always
have the same number of parameters.

>  For what it's worth, this seems to be the answer to my question:
>  http://forums.java.net/jive/thread.jspa?messageID=296830&tstart=0#296830

Thanks!

>  The WTK tunnels both HTTP and HTTPS, so unfortunately it won't work. There is a code workaround posted in that link so I might be abe to convince the developers here to stick it in for me ;)
>
>  Regards,
>  Noel
>
>
>  ----- Original Message -----
>  From: "sebb" <se...@gmail.com>
>  To: "JMeter Users List" <jm...@jakarta.apache.org>
>  Sent: Tuesday, 19 May, 2009 14:42:29 GMT +00:00 GMT Britain, Ireland, Portugal
>  Subject: Re: Recording from J2ME WTK App
>
>  On 19/05/2009, Noel O'Brien <no...@newbay.com> wrote:
>  > Hi All,
>  >
>  > I'm trying to use the Recording Proxy to capture the traffic from our client (a J2ME app which uses HTTP) to our server. I've set up JMeter (2.3.2) correctly and when I enable my browser to user the JMeter proxy (as a test) it successfully records requests.
>  >
>  > I've set the proxy settings in the Wireless Toolkit (Sun, 2.5.2) and run the emulator. Traffic is hitting the proxy but I'm getting "[Sample Failed]" and "Cannot handle CONNECT - probably used HTTPS". I'm not using HTTPS , all the traffic is HTTP. From looking at the code, the problem seems to be that the JMeter proxy won't handle a CONNECT request (I've substituted the url):
>  >
>  >
>  > 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: browser request: CONNECT <the url>:80 HTTP/1.1
>  >
>  > 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parser input: CONNECT <the url>:80 HTTP/1.1
>  >
>  > 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed method: CONNECT
>  > 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed url: <the url>:80
>  > 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed version:HTTP/1.1
>  > 2009/05/19 13:50:45 ERROR - jmeter.protocol.http.proxy.Proxy: Not implemented (probably used https) java.lang.IllegalArgumentException: Cannot handle CONNECT - probably used HTTPS
>  > at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parseFirstLine(HttpRequestHdr.java:212)
>  > at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parse(HttpRequestHdr.java:164)
>  > at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:165)
>  >
>  > Any thoughts on how to get around this problem?
>
>  JMeter Proxy does not support CONNECT; I doubt it ever will, as it is
>  not intended as a general-purpose proxy.
>
>  Not sure why the application should be sending a CONNECT for HTTP;
>  perhaps it is due to the way the proxy was set up? Maybe because the
>  Sun toolkit is wireless, it uses CONNECT to tunnel SSL over HTTP?
>
>  You could try using a "real" HTTP proxy to see what traffic is
>  actually being sent. If that can record the requests to a file, you
>  should be able to use that to build up a JMeter test plan.
>
>  > --
>  > Regards,
>  >
>  > Noel
>  >
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
>
>  --
>  Regards,
>
> Noel
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Recording from J2ME WTK App

Posted by Noel O'Brien <no...@newbay.com>.
Hi, 

Thanks for you input sebb. I was planning to use it for building a traffic model for use in performance testing, which is due to start tomorrow. I don't know how much work it is to set up a real proxy so I think it would be more wise to spend my time picking up the traffic model with Wireshark and manually inputting it into JMeter. 

For what it's worth, this seems to be the answer to my question: 
http://forums.java.net/jive/thread.jspa?messageID=296830&tstart=0#296830 

The WTK tunnels both HTTP and HTTPS, so unfortunately it won't work. There is a code workaround posted in that link so I might be abe to convince the developers here to stick it in for me ;) 

Regards, 
Noel 

----- Original Message ----- 
From: "sebb" <se...@gmail.com> 
To: "JMeter Users List" <jm...@jakarta.apache.org> 
Sent: Tuesday, 19 May, 2009 14:42:29 GMT +00:00 GMT Britain, Ireland, Portugal 
Subject: Re: Recording from J2ME WTK App 

On 19/05/2009, Noel O'Brien <no...@newbay.com> wrote: 
> Hi All, 
> 
> I'm trying to use the Recording Proxy to capture the traffic from our client (a J2ME app which uses HTTP) to our server. I've set up JMeter (2.3.2) correctly and when I enable my browser to user the JMeter proxy (as a test) it successfully records requests. 
> 
> I've set the proxy settings in the Wireless Toolkit (Sun, 2.5.2) and run the emulator. Traffic is hitting the proxy but I'm getting "[Sample Failed]" and "Cannot handle CONNECT - probably used HTTPS". I'm not using HTTPS , all the traffic is HTTP. From looking at the code, the problem seems to be that the JMeter proxy won't handle a CONNECT request (I've substituted the url): 
> 
> 
> 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: browser request: CONNECT <the url>:80 HTTP/1.1 
> 
> 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parser input: CONNECT <the url>:80 HTTP/1.1 
> 
> 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed method: CONNECT 
> 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed url: <the url>:80 
> 2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed version:HTTP/1.1 
> 2009/05/19 13:50:45 ERROR - jmeter.protocol.http.proxy.Proxy: Not implemented (probably used https) java.lang.IllegalArgumentException: Cannot handle CONNECT - probably used HTTPS 
> at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parseFirstLine(HttpRequestHdr.java:212) 
> at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parse(HttpRequestHdr.java:164) 
> at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:165) 
> 
> Any thoughts on how to get around this problem? 

JMeter Proxy does not support CONNECT; I doubt it ever will, as it is 
not intended as a general-purpose proxy. 

Not sure why the application should be sending a CONNECT for HTTP; 
perhaps it is due to the way the proxy was set up? Maybe because the 
Sun toolkit is wireless, it uses CONNECT to tunnel SSL over HTTP? 

You could try using a "real" HTTP proxy to see what traffic is 
actually being sent. If that can record the requests to a file, you 
should be able to use that to build up a JMeter test plan. 

> -- 
> Regards, 
> 
> Noel 
> 

--------------------------------------------------------------------- 
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org 



-- 
Regards, 
Noel 

Re: Recording from J2ME WTK App

Posted by sebb <se...@gmail.com>.
On 19/05/2009, Noel O'Brien <no...@newbay.com> wrote:
> Hi All,
>
>  I'm trying to use the Recording Proxy to capture the traffic from our client (a J2ME app which uses HTTP) to our server. I've set up JMeter (2.3.2) correctly and when I enable my browser to user the JMeter proxy (as a test) it successfully records requests.
>
>  I've set the proxy settings in the Wireless Toolkit (Sun, 2.5.2) and run the emulator. Traffic is hitting the proxy but I'm getting "[Sample Failed]" and "Cannot handle CONNECT - probably used HTTPS". I'm not using HTTPS , all the traffic is HTTP. From looking at the code, the problem seems to be that the JMeter proxy won't handle a CONNECT request (I've substituted the url):
>
>
>  2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: browser request: CONNECT <the url>:80 HTTP/1.1
>
>  2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parser input: CONNECT <the url>:80 HTTP/1.1
>
>  2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed method: CONNECT
>  2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed url: <the url>:80
>  2009/05/19 13:50:45 DEBUG - jmeter.protocol.http.proxy.HttpRequestHdr: parsed version:HTTP/1.1
>  2009/05/19 13:50:45 ERROR - jmeter.protocol.http.proxy.Proxy: Not implemented (probably used https) java.lang.IllegalArgumentException: Cannot handle CONNECT - probably used HTTPS
>  at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parseFirstLine(HttpRequestHdr.java:212)
>  at org.apache.jmeter.protocol.http.proxy.HttpRequestHdr.parse(HttpRequestHdr.java:164)
>  at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:165)
>
>  Any thoughts on how to get around this problem?

JMeter Proxy does not support CONNECT; I doubt it ever will, as it is
not intended as a general-purpose proxy.

Not sure why the application should be sending a CONNECT for HTTP;
perhaps it is due to the way the proxy was set up? Maybe because the
Sun toolkit is wireless, it uses CONNECT to tunnel SSL over HTTP?

You could try using a "real" HTTP proxy to see what traffic is
actually being sent. If that can record the requests to a file, you
should be able to use that to build up a JMeter test plan.

>  --
>  Regards,
>
> Noel
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org