[rabbitmq-discuss] JSONRPCError - Internal error: badmatch

Cameron Harris cameron at cameronharris.org
Fri Aug 6 17:05:19 BST 2010


I was running 1.8.1...

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 at 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 at vmrab1]}]},
 {running_nodes,[rabbit at 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

On Aug 5, 11:35 pm, Simon MacMullen <si... at rabbitmq.com> wrote:
> Hi Cameron.
>
> 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
>
> On 04/08/10 16:06, Cameron Harris wrote:
>
>
>
>
>
> > Hi all,
>
> > I've installed rabbitmq on OS X 10.6 via MacPorts, and built and
> > installed the rabbitmq-jsonrpc, rabbitmq-jsonrpc-channel, mochiweb,
> > rabbitmq-mochiweb, rfc4627_jsonrpc plugins.
>
> > After installing, I went to the example page on localhost:55672, and
> > clicked the Simple JSONRPC test. I get the following output:
>
> > 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
> > JsonRPC error:
> > Service: "/rpc/rabbitmq"
> > Method: "open"
> > Params: ["guest","guest",5,null]
> > Response: {"version":"1.1","id":2,"error":
> > {"name":"JSONRPCError","code":500,"message":"Internal
> > error","error":"{{{badmatch,{error,{{badmatch,<0.13932.0>},
> >                     [{rabbit_jsonrpc_channel,init,1},
> >                      {gen_server,init_it,6},
> >                      {proc_lib,init_p_do_apply,3}]}}},
> >   [{rabbit_jsonrpc_channel,open,1},
> >    {rabbit_jsonrpc_channel_factory,handle_call,3},
> >    {gen_server,handle_msg,5},
> >    {proc_lib,init_p_do_apply,3}]},
> >   {gen_server,call,
> >              [<0.8986.0>,
> >               {jsonrpc,<<\"open\">>,
> >                        {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\",<<\"74\">>},
>
> > {\"content-type\",<<\"application/json;charset=UTF-8\">>},
> >                                     {\"host\",<<\"localhost:55672\">>},
> >                                     {\"keep-alive\",<<\"115\">>},
> >                                     {\"pragma\",<<\"no-cache\">>},
>
> > {\"referer\",<<\"http://localhost:55672/rabbitmq_lib/www-examples/test/index.html\">>},
> >                                     {\"user-agent\",<<\"Mozilla/5.0
> > (Macintosh; IntelMac OS X 10.6; rv:2.0b3pre) Gecko/20100729
> > Minefield/4.0b3pre\">>},
> >                                     {\"x-json-rpc-timeout\",<<\"30000\">>},
>
> > {\"x-requested-with\",<<\"XMLHttpRequest\">>}]}},
> >                              {\"remote_peername\",<<\"127.0.0.1\">>},
> >                              {\"scheme\",<<\"http\">>}]},
> >                        [<<\"guest\">>,<<\"guest\">>,5,null]},
> >               30000]}}"}}
> > -------
>
> > The broker has started without any errors and appears to be
> > functioning, and when I tried the rabbitmq-status plugin, that worked
> > fine.
>
> > My rabbitmqctl status is:
> > Status of node rabbit at Bilbo ...
> > [{running_applications,
> >      [{rabbit_jsonrpc_channel,"RabbitMQ JSON-RPC Channels","0.01"},
> >       {rabbit,"RabbitMQ","1.8.1"},
> >       {os_mon,"CPO  CXC 138 46","2.2.5"},
> >       {sasl,"SASL  CXC 138 11","2.1.9.2"},
> >       {rfc4627_jsonrpc,"JSON RPC Service","0.01"},
> >       {rabbit_jsonrpc,"Rabbit JSON-RPC","0.01"},
> >       {rabbit_mochiweb,"RabbitMQ Mochiweb Embedding","0.01"},
> >       {mochiweb,"MochiMedia Web Server","1.3"},
> >       {crypto,"CRYPTO version 2","2.0"},
> >       {inets,"INETS  CXC 138 49","5.4"},
> >       {mnesia,"MNESIA  CXC 138 12","4.4.14"},
> >       {stdlib,"ERTS  CXC 138 10","1.17"},
> >       {kernel,"ERTS  CXC 138 10","2.14"}]},
> >   {nodes,[{disc,[rabbit at Bilbo]}]},
> >   {running_nodes,[rabbit at Bilbo]}]
> > ...done.
>
> > Thanks,
> > Cameron
>
> > _______________________________________________
> > rabbitmq-discuss mailing list
> > rabbitmq-disc... at lists.rabbitmq.com
> >https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-disc... at lists.rabbitmq.comhttps://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list