I think you're trying to use a too-new version of
rabbitmq-jsonrpc-channel. I haven't tested, but I think revision
0a920cb5180b is more likely to work with RabbitMQ 1.8.1. Or you could
build the server from default as well as the plugins.
Cheers, Simon
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq...@lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Anyway, I've reinstalled now, on Ubuntu Linux 10.04 this time. I built
everything from the umbrella.
Now I'm getting a different problem on the examples:
test_main
{"installGenericProxy":{"name":"open","idempotent":false,"params":
[{"name":"username","type":"str"},{"name":"password","type":"str"},
{"name":"sessionTimeout","type":"num"},
{"name":"virtualHost","type":"str"}]}}
open
{"installGenericProxy":{"name":"poll","idempotent":false,"params":[]}}
{"installGenericProxy":{"name":"close","idempotent":false,"params":
[]}}
{"installGenericProxy":{"name":"call","idempotent":false,"params":
[{"name":"method","type":"str"},{"name":"args","type":"arr"}]}}
{"installGenericProxy":{"name":"cast","idempotent":false,"params":
[{"name":"method","type":"str"},{"name":"args","type":"arr"},
{"name":"content","type":"str"},{"name":"props","type":"arr"}]}}
handle_channel_ready
{"q2":"test-queue-1b"}
{"q1":"test-queue-1a"}
JsonRPC error:
Service: "/rpc/8DCB5AAAE542E25A84F64EE11A1398E1"
Method: "call"
Params: ["basic.consume",[0,"test-queue-1a","aa-cons-
tag1",false,false,false,false]]
Response: {"version":"1.1","id":8,"error":
{"name":"JSONRPCError","code":500,"message":"Internal
error","error":"{noproc,
{gen_server,call,
[<0.875.0>,
{jsonrpc,<<\"call\">>,
{obj,
[{\"http_method\",<<\"POST\">>},
{\"http_query_parameters\",{obj,[]}},
{\"http_headers\",
{obj,
[{\"accept\",<<\"*/*\">>},
{\"accept-charset\",
<<\"ISO-8859-1,utf-8;q=0.7,*;q=0.7\">>},
{\"accept-encoding\",<<\"gzip, deflate\">>},
{\"accept-language\",<<\"en-us,en;q=0.5\">>},
{\"cache-control\",<<\"no-cache\">>},
{\"connection\",<<\"keep-alive\">>},
{\"content-length\",<<\"126\">>},
{\"content-type\",<<\"application/json;
charset=UTF-8\">>},
{\"host\",<<\"vmrab1:55672\">>},
{\"keep-alive\",<<\"115\">>},
{\"pragma\",<<\"no-cache\">>},
{\"referer\",
<<\"http://vmrab1:55672/rabbitmq_lib/www-
examples/test/index.html\">>},
{\"user-agent\",
<<\"Mozilla/5.0 (Windows; Windows NT 6.1;
WOW64; rv:2.0b3pre) Gecko/20100801 Minefield/4.0b3pre ( .NET CLR
3.5.30729; .NET4.0E)\">>},
{\"x-json-rpc-timeout\",<<\"5000\">>},
{\"x-requested-with\",<<\"XMLHttpRequest
\">>}]}},
{\"remote_peername\",<<\"172.20.5.26\">>},
{\"scheme\",<<\"http\">>}]},
[<<\"basic.consume\">>,
[0,<<\"test-queue-1a\">>,<<\"aa-cons-
tag1\">>,false,false,false,
false]]},
5000]}}"}}
JsonRPC error:
Service: "/rpc/8DCB5AAAE542E25A84F64EE11A1398E1"
Method: "call"
Params: ["basic.consume",[0,"test-
queue-1b","",false,false,false,false]]
Response: {"version":"1.1","id":7,"error":
{"name":"JSONRPCError","code":500,"message":"AMQP error","error":
{"code":"command_invalid","text":"unimplemented
method","method":"basic.consume"}}}
"unimplemented method"?
My rabbitmqctl status is:
Status of node rabbit@vmrab1 ...
[{running_applications,
[{rabbit_jsonrpc_channel,"RabbitMQ JSON-RPC Channels","0.01"},
{rabbit,"RabbitMQ","%%VSN%%"},
{os_mon,"CPO CXC 138 46","2.2.4"},
{sasl,"SASL CXC 138 11","2.1.8"},
{rabbit_jsonrpc,"Rabbit JSON-RPC","0.01"},
{rfc4627_jsonrpc,"JSON RPC Service","0.01"},
{rabbit_mochiweb,"RabbitMQ Mochiweb Embedding","0.01"},
{mochiweb,"MochiMedia Web Server","1.3"},
{crypto,"CRYPTO version 1","1.6.3"},
{inets,"INETS CXC 138 49","5.2"},
{mnesia,"MNESIA CXC 138 12","4.4.12"},
{stdlib,"ERTS CXC 138 10","1.16.4"},
{kernel,"ERTS CXC 138 10","2.13.4"}]},
{nodes,[{disc,[rabbit@vmrab1]}]},
{running_nodes,[rabbit@vmrab1]}]
...done.
The queues are being created, however:
$ scripts/rabbitmqctl list_queues
Listing queues ...
test-queue-1b 0
amq.gen-CDzvGz+lPWtoz5uOQz1wMA== 0
test-queue-1a 0
amq.gen-VKcoc8C1V6yxQ2f2Nj/sEg== 0
...done.
Also, not sure if I'm doing something wrong, but to get to the example
pages, I have to copy them from priv/www-examples to priv/www then
access them using the URL /rabbitmq_lib/www-examples. This happened on
both Ubuntu and OS X. The paths in the README just return 404 Not
Found.
Thanks,
Cameron
> > rabbitmq-disc...@lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc...@lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
It appears that rabbitmq-jsonrpc-channel had outdated signature for
basic.consume. We've fixed that in the default branch.
Could you try again, and let us know if the new code works better?
Cheers,
Marek
The bug tracker is not public at the moment.
I'm afraid I'm not able to assist you with building the plugins for 1.8.1.
Instead, I'd ask you to give us some time. On the next release
(which should happen pretty soon) all the plugins will be correctly
tagged and hopefully working.
> 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?
That is a very valid question. From my knowledge no one has ever tried
to use these plugins in production.
If anyone has - please shout now!
> 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?
I did heard of the solution to this problem via iframe hack, but it's all messy.
On the other hand there seem to be few projects that try to do 'comet'
things via a hosted service. For example http://pusherapp.com/.
What problem are you actually trying to solve via rabbitmq-jsonrpc-channel?
Cheers,
Marek
On 12/08/10 11:27, Cameron Harris wrote:
> Hi Marek,
>
> 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.
Thanks for pointing that out - a 1.8.1 tag has been added to the
rabbitmq-codegen repository, which will show as soon as you perform a
refresh.
Emile