Bug 39641 - Support required for amf requests
Summary: Support required for amf requests
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.1.1
Hardware: Other All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-23 10:34 UTC by smanya
Modified: 2008-05-29 06:26 UTC (History)
1 user (show)



Attachments
Test plan with recorded amf request (8.08 KB, patch)
2007-04-18 06:40 UTC, Alf Hogemark
Details | Diff
AMF content was not saved by Proxy Server (60.11 KB, image/png)
2008-05-27 07:31 UTC, Bruno Ghisi
Details
JMeter log file (23.60 KB, application/octet-stream)
2008-05-27 10:09 UTC, Bruno Ghisi
Details
Wrong Response Data when AMF collected by proxy is POSTed (57.17 KB, image/png)
2008-05-27 11:33 UTC, Bruno Ghisi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description smanya 2006-05-23 10:34:23 UTC
Flash applications use amf protocol to communicate with the web service. Jmeter
can not record amf requests. This primarily because jmeter treats the http
request as string of parametername value pairs. So the following must be necessary:
1. Ability to record amf requests.
2. Ability to save them in the test plan.
Comment 1 Sebb 2006-05-23 11:19:03 UTC
Please provide more details of the protocol, and it will be considered for a 
future release.

Are you saying that JMeter cannot currently generate AMF requests, even if you 
create the HTTP Sampler yourself?
Comment 2 Alf Hogemark 2007-04-18 06:40:13 UTC
Created attachment 19991 [details]
Test plan with recorded amf request

I think this bug can be closed as "Fixed".

Attached is a test plan that I recorded using the HTTP Proxy server.
I then changed the value of the "User-Agent" of the derived browser headers to
"JMeter 2.2".

Open http://www.themidnightcoders.com/examples/flash-application-activation.htm
in your browser, and then you will see the number of invocations of that
service.
Now run the testplan, and then go back to your browser and hit "reload", and
you will see that the number for "JMeter 2.2" has increased by 10, which was
the number of requests the testplan executed.

This proves that the HTTP Proxy is able to record amf requests, and that the
HTTP Sampler is able to send such requests. I have also tested that it works
with HTTP Request HTTP Client sampler.
Comment 3 Sebb 2007-04-18 12:49:17 UTC
Thanks!

Please re-open if the problem has not been solved.
Comment 4 Bruno Ghisi 2008-05-27 07:31:19 UTC
Created attachment 22011 [details]
AMF content was not saved by Proxy Server
Comment 5 Bruno Ghisi 2008-05-27 07:32:30 UTC
I tried to record AMF requests using Proxy Server but without success. The request was recorded but without the content as you can see in the attached image. So, without the content, it is not possible to simulate these POST requests.

Thanks.
Comment 6 Sebb 2008-05-27 07:51:28 UTC
We'll need more information to understand this.

Are there any messages in jmeter.log?

Can you provide exact details of how to generate the error?
Is there there public server we can test against?
Or an easy way to set up a local test?
Comment 7 Bruno Ghisi 2008-05-27 08:03:41 UTC
It was a local test, but the thing was pretty simple:

1 - I have created a Proxy Server in JMeter and configured Mozilla to use it.
2 - Than I have accessed a default BlazeDS application (http://www.brightworks.com/flex_ability/?p=73) that runs in Tomcat and it is part of Flex demo. This application uses AMF (binary protocol over HTTP) to communicate.
3 - I looked in the Thread Group (image I have sent) and the HTTP POST request was saved but without the binary content.

I think there are more people with this problem trying some work arounds: http://90kts.com/blog/2008/performance-testing-flex-remoting-amf-with-jmeter/ and http://note19.com/2008/05/06/how-to-use-jmeter-to-load-test-flex-applications/

Thanks.
Comment 8 Sebb 2008-05-27 08:27:07 UTC
Thanks for the info.

Were there any messages in the JMeter log file?
Or the console window?

Just curious - I would expect some error to be generated.

I think the way to do this is to save the binary data in a file and add the file details to the POST request, as suggested in one of the links.

However, first there needs to be a reliable way to detect when this is needed; hopefully this can be determined from the headers.
Comment 9 Bruno Ghisi 2008-05-27 10:07:38 UTC
(In reply to comment #8)
> Thanks for the info.

Thank you for helping! I have noticed that I am using an old version, should I try the last RC of version 2.3?

> 
> Were there any messages in the JMeter log file?
> Or the console window?
> 
> Just curious - I would expect some error to be generated.
>

I have attached the log file. There are some messages.
 
> I think the way to do this is to save the binary data in a file and add the
> file details to the POST request, as suggested in one of the links.

Yes, this is the way. But would it be possible to do directly with JMeter Server Proxy, bcause otherwise would be too much hand work.

> 
> However, first there needs to be a reliable way to detect when this is needed;
> hopefully this can be determined from the headers.

AMF has application/x-amf in the content type of a response.

> 

Thanks.
Comment 10 Bruno Ghisi 2008-05-27 10:09:06 UTC
Created attachment 22016 [details]
JMeter log file
Comment 11 Bruno Ghisi 2008-05-27 10:24:17 UTC
Sorry,I have just tried RC4 and  it seems that Proxy Server is working, it got the AMF content. I let you know if anything happens wrongly, I will put the tests to run.
Thank you very much!
Comment 12 Sebb 2008-05-27 10:34:25 UTC
The log file shows that you are not running a release build.

The current release is 2.3.1.

The log also shows several errors relating to org.openamf classes. 

Has the JMeter application been updated to add these?
It looks as though the proxy has somehow been integrated with these new
classes; if so, then perhaps you should discuss the problem with whoever
updated the code.
Comment 13 Bruno Ghisi 2008-05-27 11:31:56 UTC
For some reason when I try to run the Sampler with the AMF collected previously, it happens a OutOfMemoryError in Tomcat, because BlazeDS (Flex Bridge that handle AMF) tries to deserialize the content and probably the binary format is wrong.

I am not able to see the Response Data (from View Result Tree Listener) in JMeter 2.3.1, just in 2.3.1 RC4, as the pic attached. Probably this problem could be due to some wrong stuff when the protocol is being saved by the Proxy, because I have tried to sniff using another tool, saving the AMF and attaching in the POST request and worked fine.

Thanks in advance.
Comment 14 Bruno Ghisi 2008-05-27 11:33:55 UTC
Created attachment 22017 [details]
Wrong Response Data when AMF collected by proxy is POSTed
Comment 15 Sebb 2008-05-27 12:21:05 UTC
Not being able to display the data in 2.3.1 is a known bug: 44011.
See the bug for details of a work-round.
Comment 16 Bruno Ghisi 2008-05-27 12:27:35 UTC
Yes. Thanks for letting me know about this bug, but the problem around AMF is still ocuring.

Quoting last entry: "For some reason when I try to run the Sampler with the AMF collected previously, it happens a OutOfMemoryError in Tomcat, because BlazeDS (Flex Bridge that handle AMF) tries to deserialize the content and probably the
binary format is wrong. Probably this problem could be due to some wrong stuff when the protocol is being saved by the Proxy, because I have tried to sniff using another tool, saving the AMF and attaching in the POST request and worked fine."

Do you know if AMF is being treated as a binary protocol and not only string stuff? Any ideas where is it in the JMeter code, because I tried to search without success. Should I send an email to dev list?

Thanks in advance.
Comment 17 Sebb 2008-05-27 12:40:12 UTC
(In reply to comment #16)
> Yes. Thanks for letting me know about this bug, but the problem around AMF is
> still ocuring.
> 
> Quoting last entry: "For some reason when I try to run the Sampler with the AMF
> collected previously, it happens a OutOfMemoryError in Tomcat, because BlazeDS
> (Flex Bridge that handle AMF) tries to deserialize the content and probably the
> binary format is wrong. Probably this problem could be due to some wrong stuff
> when the protocol is being saved by the Proxy, because I have tried to sniff
> using another tool, saving the AMF and attaching in the POST request and worked
> fine."

Well, that's what you will need to do for now.

> Do you know if AMF is being treated as a binary protocol and not only string
> stuff? Any ideas where is it in the JMeter code, because I tried to search
> without success.

JMeter proxy does not currently support binary data.

> Should I send an email to dev list?

The Bugzilla updates already get sent there, so no need to duplicate the information.
Comment 18 Bruno Ghisi 2008-05-27 12:47:08 UTC
Thank you very much. I think I have now found the answer about JMeter not supporting binary protocols. Do you know how difficult would be to implement that and how to do it? Otherwise I will have to make that workarounds in the previous links.

Thanks! 
Comment 19 Sebb 2008-05-27 14:00:56 UTC
It will be very easy if someone provide a patch and test cases ;-)

Otherwise I don't know...
Comment 20 Sebb 2008-05-28 12:06:19 UTC
I've had a further look, and it seems it may not be all that difficult to do.

Watch this space...
Comment 21 Sebb 2008-05-28 16:19:52 UTC
SVN updated:

URL: http://svn.apache.org/viewvc?rev=661141&view=rev
Log:
Bugs 44808 & 39641 - Proxy support for binary requests

The night build has the fix - please report any problems.
Comment 22 Bruno Ghisi 2008-05-29 06:26:35 UTC
Awesome! Worked perfeclty in the first thats I have made! Congratulations! JMeter rocks!
Comment 23 The ASF infrastructure team 2022-09-24 20:37:37 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1726