Hi Marek,<br><br>That has fixed the issue when building from scratch, thanks.<br><br>However, we would like to get it working in 1.8.1 if possible. I've tried checking out the revision of rabbitmq-jsonrpc-channel that Simon suggested most likely to work with 1.8.1 (0a920cb5180b) and loaded it into the 1.8.1 release version of rabbitmq, along with the head versions of rfc4627_jsonrpc, rabbit_jsonrpc, rabbit_mochiweb, mochiweb. Unfortunately this gives me the error I reported in my first post.<br>
<br>I tried building rabbitmq-server tag 1.8.1, but I got errors relating to what files were available in rabbit-codegen, and rabbit-codegen only has a 1.8.0 tag. Many of the other plugins aren't tagged for 1.8.1, so is using the head version of those likely to cause a problem? Most of the comments on the commits also reference bug numbers.. is there a public bug tracker anywhere so that I can work out what the commits are for? <br>
<br><br>On a more interesting, related note: is there any way of writing javascript that runs on a seperate webserver that connects to the rabbitmq-server's json-rpc? I'm guessing either you could use JSONP, or in standards compliant browsers, you'd need to use CORS/XHR2, and IE would need to use XDomainRequest (which needs support in the javascript lib doesn't it?). Has this issue been considered yet? To do CORS and JSONP would both require support in the web server, wouldn't they?<br>
<br>Thanks,<br clear="all">Cameron Harris<br>
<br><br><div class="gmail_quote">On 11 August 2010 17:41, Marek Majkowski <span dir="ltr"><<a href="mailto:majek04@gmail.com">majek04@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Cameron,<br>
<br>
It appears that rabbitmq-jsonrpc-channel had outdated signature for<br>
basic.consume. We've fixed that in the default branch.<br>
<br>
Could you try again, and let us know if the new code works better?<br>
<br>
Cheers,<br>
Marek<br>
<br>
<br>
On Fri, Aug 6, 2010 at 17:05, Cameron Harris <<a href="mailto:cameron@cameronharris.org">cameron@cameronharris.org</a>> wrote:<br>
> I was running 1.8.1...<br>
><br>
> Anyway, I've reinstalled now, on Ubuntu Linux 10.04 this time. I built<br>
> everything from the umbrella.<br>
><br>
> Now I'm getting a different problem on the examples:<br>
<div class="im">><br>
> test_main<br>
> {"installGenericProxy":{"name":"open","idempotent":false,"params":<br>
> [{"name":"username","type":"str"},{"name":"password","type":"str"},<br>
> {"name":"sessionTimeout","type":"num"},<br>
> {"name":"virtualHost","type":"str"}]}}<br>
> open<br>
</div>> {"installGenericProxy":{"name":"poll","idempotent":false,"params":[]}}<br>
> {"installGenericProxy":{"name":"close","idempotent":false,"params":<br>
> []}}<br>
> {"installGenericProxy":{"name":"call","idempotent":false,"params":<br>
> [{"name":"method","type":"str"},{"name":"args","type":"arr"}]}}<br>
> {"installGenericProxy":{"name":"cast","idempotent":false,"params":<br>
> [{"name":"method","type":"str"},{"name":"args","type":"arr"},<br>
> {"name":"content","type":"str"},{"name":"props","type":"arr"}]}}<br>
> handle_channel_ready<br>
> {"q2":"test-queue-1b"}<br>
> {"q1":"test-queue-1a"}<br>
> JsonRPC error:<br>
> Service: "/rpc/8DCB5AAAE542E25A84F64EE11A1398E1"<br>
> Method: "call"<br>
> Params: ["basic.consume",[0,"test-queue-1a","aa-cons-<br>
> tag1",false,false,false,false]]<br>
> Response: {"version":"1.1","id":8,"error":<br>
<div class="im">> {"name":"JSONRPCError","code":500,"message":"Internal<br>
</div>> error","error":"{noproc,<br>
> {gen_server,call,<br>
> [<0.875.0>,<br>
> {jsonrpc,<<\"call\">>,<br>
<div class="im">> {obj,<br>
> [{\"http_method\",<<\"POST\">>},<br>
> {\"http_query_parameters\",{obj,[]}},<br>
> {\"http_headers\",<br>
> {obj,<br>
> [{\"accept\",<<\"*/*\">>},<br>
> {\"accept-charset\",<br>
> <<\"ISO-8859-1,utf-8;q=0.7,*;q=0.7\">>},<br>
> {\"accept-encoding\",<<\"gzip, deflate\">>},<br>
> {\"accept-language\",<<\"en-us,en;q=0.5\">>},<br>
> {\"cache-control\",<<\"no-cache\">>},<br>
> {\"connection\",<<\"keep-alive\">>},<br>
</div>> {\"content-length\",<<\"126\">>},<br>
<div class="im">> {\"content-type\",<<\"application/json;<br>
> charset=UTF-8\">>},<br>
</div>> {\"host\",<<\"vmrab1:55672\">>},<br>
<div class="im">> {\"keep-alive\",<<\"115\">>},<br>
> {\"pragma\",<<\"no-cache\">>},<br>
> {\"referer\",<br>
</div>> <<\"<a href="http://vmrab1:55672/rabbitmq_lib/www-" target="_blank">http://vmrab1:55672/rabbitmq_lib/www-</a><br>
<div class="im">> examples/test/index.html\">>},<br>
> {\"user-agent\",<br>
</div>> <<\"Mozilla/5.0 (Windows; Windows NT 6.1;<br>
> WOW64; rv:2.0b3pre) Gecko/20100801 Minefield/4.0b3pre ( .NET CLR<br>
> 3.5.30729; .NET4.0E)\">>},<br>
> {\"x-json-rpc-timeout\",<<\"5000\">>},<br>
> {\"x-requested-with\",<<\"XMLHttpRequest<br>
> \">>}]}},<br>
> {\"remote_peername\",<<\"172.20.5.26\">>},<br>
> {\"scheme\",<<\"http\">>}]},<br>
> [<<\"basic.consume\">>,<br>
> [0,<<\"test-queue-1a\">>,<<\"aa-cons-<br>
> tag1\">>,false,false,false,<br>
> false]]},<br>
> 5000]}}"}}<br>
> JsonRPC error:<br>
> Service: "/rpc/8DCB5AAAE542E25A84F64EE11A1398E1"<br>
> Method: "call"<br>
> Params: ["basic.consume",[0,"test-<br>
> queue-1b","",false,false,false,false]]<br>
> Response: {"version":"1.1","id":7,"error":<br>
> {"name":"JSONRPCError","code":500,"message":"AMQP error","error":<br>
> {"code":"command_invalid","text":"unimplemented<br>
> method","method":"basic.consume"}}}<br>
><br>
><br>
><br>
> "unimplemented method"?<br>
> My rabbitmqctl status is:<br>
> Status of node rabbit@vmrab1 ...<br>
<div class="im">> [{running_applications,<br>
> [{rabbit_jsonrpc_channel,"RabbitMQ JSON-RPC Channels","0.01"},<br>
</div>> {rabbit,"RabbitMQ","%%VSN%%"},<br>
> {os_mon,"CPO CXC 138 46","2.2.4"},<br>
> {sasl,"SASL CXC 138 11","2.1.8"},<br>
<div class="im">> {rabbit_jsonrpc,"Rabbit JSON-RPC","0.01"},<br>
> {rfc4627_jsonrpc,"JSON RPC Service","0.01"},<br>
> {rabbit_mochiweb,"RabbitMQ Mochiweb Embedding","0.01"},<br>
> {mochiweb,"MochiMedia Web Server","1.3"},<br>
</div>> {crypto,"CRYPTO version 1","1.6.3"},<br>
> {inets,"INETS CXC 138 49","5.2"},<br>
> {mnesia,"MNESIA CXC 138 12","4.4.12"},<br>
> {stdlib,"ERTS CXC 138 10","1.16.4"},<br>
> {kernel,"ERTS CXC 138 10","2.13.4"}]},<br>
> {nodes,[{disc,[rabbit@vmrab1]}]},<br>
> {running_nodes,[rabbit@vmrab1]}]<br>
> ...done.<br>
><br>
><br>
> The queues are being created, however:<br>
><br>
> $ scripts/rabbitmqctl list_queues<br>
> Listing queues ...<br>
> test-queue-1b 0<br>
> amq.gen-CDzvGz+lPWtoz5uOQz1wMA== 0<br>
> test-queue-1a 0<br>
> amq.gen-VKcoc8C1V6yxQ2f2Nj/sEg== 0<br>
> ...done.<br>
><br>
><br>
> Also, not sure if I'm doing something wrong, but to get to the example<br>
> pages, I have to copy them from priv/www-examples to priv/www then<br>
> access them using the URL /rabbitmq_lib/www-examples. This happened on<br>
> both Ubuntu and OS X. The paths in the README just return 404 Not<br>
> Found.<br>
><br>
> Thanks,<br>
> Cameron<br>
><br>
> On Aug 5, 11:35 pm, Simon MacMullen <<a href="mailto:si...@rabbitmq.com">si...@rabbitmq.com</a>> wrote:<br>
>> Hi Cameron.<br>
>><br>
>> I think you're trying to use a too-new version of<br>
>> rabbitmq-jsonrpc-channel. I haven't tested, but I think revision<br>
>> 0a920cb5180b is more likely to work with RabbitMQ 1.8.1. Or you could<br>
>> build the server from default as well as the plugins.<br>
>><br>
>> Cheers, Simon<br>
<div><div></div><div class="h5">>><br>
>> On 04/08/10 16:06, Cameron Harris wrote:<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> > Hi all,<br>
>><br>
>> > I've installed rabbitmq on OS X 10.6 via MacPorts, and built and<br>
>> > installed the rabbitmq-jsonrpc, rabbitmq-jsonrpc-channel, mochiweb,<br>
>> > rabbitmq-mochiweb, rfc4627_jsonrpc plugins.<br>
>><br>
>> > After installing, I went to the example page on localhost:55672, and<br>
>> > clicked the Simple JSONRPC test. I get the following output:<br>
>><br>
>> > test_main<br>
>> > {"installGenericProxy":{"name":"open","idempotent":false,"params":<br>
>> > [{"name":"username","type":"str"},{"name":"password","type":"str"},<br>
>> > {"name":"sessionTimeout","type":"num"},<br>
>> > {"name":"virtualHost","type":"str"}]}}<br>
>> > open<br>
>> > JsonRPC error:<br>
>> > Service: "/rpc/rabbitmq"<br>
>> > Method: "open"<br>
>> > Params: ["guest","guest",5,null]<br>
>> > Response: {"version":"1.1","id":2,"error":<br>
>> > {"name":"JSONRPCError","code":500,"message":"Internal<br>
>> > error","error":"{{{badmatch,{error,{{badmatch,<0.13932.0>},<br>
>> > [{rabbit_jsonrpc_channel,init,1},<br>
>> > {gen_server,init_it,6},<br>
>> > {proc_lib,init_p_do_apply,3}]}}},<br>
>> > [{rabbit_jsonrpc_channel,open,1},<br>
>> > {rabbit_jsonrpc_channel_factory,handle_call,3},<br>
>> > {gen_server,handle_msg,5},<br>
>> > {proc_lib,init_p_do_apply,3}]},<br>
>> > {gen_server,call,<br>
>> > [<0.8986.0>,<br>
>> > {jsonrpc,<<\"open\">>,<br>
>> > {obj,[{\"http_method\",<<\"POST\">>},<br>
>> > {\"http_query_parameters\",{obj,[]}},<br>
>> > {\"http_headers\",<br>
>> > {obj,[{\"accept\",<<\"*/*\">>},<br>
>><br>
>> > {\"accept-charset\",<<\"ISO-8859-1,utf-8;q=0.7,*;q=0.7\">>},<br>
>><br>
>> > {\"accept-encoding\",<<\"gzip,deflate\">>},<br>
>><br>
>> > {\"accept-language\",<<\"en-us,en;q=0.5\">>},<br>
>> > {\"cache-control\",<<\"no-cache\">>},<br>
>> > {\"connection\",<<\"keep-alive\">>},<br>
>> > {\"content-length\",<<\"74\">>},<br>
>><br>
>> > {\"content-type\",<<\"application/json;charset=UTF-8\">>},<br>
>> > {\"host\",<<\"localhost:55672\">>},<br>
>> > {\"keep-alive\",<<\"115\">>},<br>
>> > {\"pragma\",<<\"no-cache\">>},<br>
>><br>
>> > {\"referer\",<<\"<a href="http://localhost:55672/rabbitmq_lib/www-examples/test/index.html%5C" target="_blank">http://localhost:55672/rabbitmq_lib/www-examples/test/index.html\</a>">>},<br>
>> > {\"user-agent\",<<\"Mozilla/5.0<br>
>> > (Macintosh; IntelMac OS X 10.6; rv:2.0b3pre) Gecko/20100729<br>
>> > Minefield/4.0b3pre\">>},<br>
>> > {\"x-json-rpc-timeout\",<<\"30000\">>},<br>
>><br>
>> > {\"x-requested-with\",<<\"XMLHttpRequest\">>}]}},<br>
>> > {\"remote_peername\",<<\"127.0.0.1\">>},<br>
>> > {\"scheme\",<<\"http\">>}]},<br>
>> > [<<\"guest\">>,<<\"guest\">>,5,null]},<br>
>> > 30000]}}"}}<br>
>> > -------<br>
>><br>
>> > The broker has started without any errors and appears to be<br>
>> > functioning, and when I tried the rabbitmq-status plugin, that worked<br>
>> > fine.<br>
>><br>
>> > My rabbitmqctl status is:<br>
>> > Status of node rabbit@Bilbo ...<br>
>> > [{running_applications,<br>
>> > [{rabbit_jsonrpc_channel,"RabbitMQ JSON-RPC Channels","0.01"},<br>
>> > {rabbit,"RabbitMQ","1.8.1"},<br>
>> > {os_mon,"CPO CXC 138 46","2.2.5"},<br>
>> > {sasl,"SASL CXC 138 11","2.1.9.2"},<br>
>> > {rfc4627_jsonrpc,"JSON RPC Service","0.01"},<br>
>> > {rabbit_jsonrpc,"Rabbit JSON-RPC","0.01"},<br>
>> > {rabbit_mochiweb,"RabbitMQ Mochiweb Embedding","0.01"},<br>
>> > {mochiweb,"MochiMedia Web Server","1.3"},<br>
>> > {crypto,"CRYPTO version 2","2.0"},<br>
>> > {inets,"INETS CXC 138 49","5.4"},<br>
>> > {mnesia,"MNESIA CXC 138 12","4.4.14"},<br>
>> > {stdlib,"ERTS CXC 138 10","1.17"},<br>
>> > {kernel,"ERTS CXC 138 10","2.14"}]},<br>
>> > {nodes,[{disc,[rabbit@Bilbo]}]},<br>
>> > {running_nodes,[rabbit@Bilbo]}]<br>
>> > ...done.<br>
>><br>
>> > Thanks,<br>
>> > Cameron<br>
>><br>
</div></div>>> > _______________________________________________<br>
>> > rabbitmq-discuss mailing list<br>
>> > <a href="mailto:rabbitmq-disc...@lists.rabbitmq.com">rabbitmq-disc...@lists.rabbitmq.com</a><br>
>> ><a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
>><br>
>> _______________________________________________<br>
>> rabbitmq-discuss mailing list<br>
>> rabbitmq-disc...@lists.rabbitmq.comhttps://<a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
> _______________________________________________<br>
> rabbitmq-discuss mailing list<br>
> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
> <a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
><br>
</blockquote></div><br>