[rabbitmq-discuss] Failed to add an exchange via the web interface

Lionel Cons lionel.cons at cern.ch
Mon Mar 26 06:41:43 BST 2012


Tony Garnock-Jones writes:
 > That's the way the code already was. However, it was confusing two cases: a
 > missing "port" argument, and a "port" argument of non-numeric type. I've
 > just pushed a tweak to the error reporting that'll distinguish the two.
 > 
 > Lionel, please have another try with current master.

This still does not work. With the new master, I get:

{error,
    {exit,
        {{badarg,
             [{io_lib,format,
                  ["Invalid 'port' argument to ~p exchange (wrong type)",
                   {resource,<<"rabbitmq">>,exchange,<<"test.udp">>}]},
              {rabbit_misc,format,2},
              {rabbit_misc,amqp_error,4},
              {rabbit_misc,protocol_error,4},
              {udp_exchange,endpoint_params,1},
              {udp_exchange,validate,1},
              {rabbit_exchange,declare,6},
              {rabbit_channel,handle_method,3}]},
         {gen_server,call,
             [<0.1258.0>,
              {call,
                  {'exchange.declare',0,<<"test.udp">>,<<"x-udp">>,false,
                      true,false,false,false,
                      [{<<"port">>,longstr,<<"12345">>}]},
                  none,<0.832.0>},
              infinity]}},
        [{gen_server,call,3},
         {rabbit_mgmt_util,'-amqp_request/5-fun-0-',4},
         {rabbit_mgmt_util,with_channel,5},
         {rabbit_mgmt_util,http_to_amqp,5},
         {webmachine_resource,resource_call,3},
         {webmachine_resource,do,3},
         {webmachine_decision_core,resource_call,1},
         {webmachine_decision_core,accept_helper,0}]}}

As you see, the web interface passed the port argument as "longstr",
which must be handled explicitly in endpoint_params I guess.

Cheers,

Lionel


More information about the rabbitmq-discuss mailing list