[rabbitmq-discuss] RabbitMQ JSON-RPC test in 2.2.0-1

Ben Bennett benbennett at gmail.com
Wed Dec 1 18:45:20 GMT 2010


Hello,

I am trying to get the sample json rpc tests working on three
different systems in which all do not work.
I downloaded the following from the plugins page.
    * mochiweb
    * rfc4627_jsonrpc
    * rabbitmq-mochiweb
    * rabbitmq-jsonrpc
    * rabbitmq-jsonrpc-channel
    * rabbitmq-jsonrpc-channel-examples
I then drop them in the correct plugins folder. I change the owner and
group of the ez files to be root.
The first two boxes are  running ubuntu 10.10 server i386 and 10.04.1
LTS , when I access the remote
ur(http://IPADDRESS:55672/rpc-examples/test/index.html)l nothing is
displayed.
No errors , nothing, just a blank page with the rabbitmq logo and text
test_main.

The second box is running ubuntu 9.10 x64 the error is displayed below
when I access http://localhost:55672/rpc-examples/test/index.html .

What I am missing? Is there some setup script that must be ran to
setup the queues and exchanges? Is something broken?


{"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,
          {undef,
              [{amqp_connection,start,
                   [direct,

{amqp_params,<<\"guest\">>,<<\"guest\">>,<<\"/\">>,\"localhost\",
                        5672,0,0,0,none,[]}]},
               {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.292.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/rpc-examples/test/index.html\">>},
                     {\"user-agent\",
                      <<\"Mozilla/5.0 (X11; U; Linux x86_64; en-US;
rv:1.9.2.12) Gecko/20101027 Ubuntu/9.10 (karmic) Firefox/3.6.12\">>},
                     {\"x-json-rpc-timeout\",<<\"30000\">>},
                     {\"x-requested-with\",<<\"XMLHttpRequest\">>}]}},
               {\"remote_peername\",<<\"127.0.0.1\">>},
               {\"scheme\",<<\"http\">>}]},
          [<<\"guest\">>,<<\"guest\">>,5,null]},
      30000]}}"}}


More information about the rabbitmq-discuss mailing list