[rabbitmq-discuss] MQTT And RabbitMQ

Mark Wolfe mark at wolfe.id.au
Thu Jun 5 11:59:01 BST 2014


Gday All

Just wanted to see if others are having similar issues with RabbitMQ and
MQTT.

Firstly we are seeing a lot of errors around duplicate client-ids, after
debugging this a few times it seemed there were orphaned or somehow
retained connections which aren't showing in the standard rabbitmq session
list.

These connections are somehow leading to the newer connection being kicked
off, like a routine is kicking off the oldest connection for a given
client, where there is only one..

We are also getting these traces from time to time (see below).

I saw there is some pretty significant work going on around the MQTT
plugin, is this related to any of the symptoms I described?

Lastly as you can see in the trace we are running an SSL proxy in front of
RabbitMQ.

=ERROR REPORT==== 7-May-2014::14:11:25 ===
** Generic server <0.710.30> terminating
** Last message in was {inet_async,#Port<0.567958>,12806,

 {ok,<<16,69,0,6,77,81,73,115,100,112,3,194,0,30,0,
                                 20,52,57,51,45,54,66,67,66,50,66,68,67,49,

 53,65,48,56,67,56,68,0,7,115,116,114,101,97,
                                 109,115,0,24,72,97,118,106,101,114,104,111,
                                 70,114,97,110,74,111,103,114,121,111,99,78,
                                 111,110,115,55>>}}
** When Server state == {state,#Port<0.567958>,
                            "127.0.0.1:34267 -> 127.0.0.1:2883
",true,running,
                            {none,<0.731.30>},
                            <0.711.30>,false,none,
                            {proc_state,#Port<0.567958>,
                                {dict,4,16,16,8,80,48,
                                    {[],[],[],[],[],[],[],[],[],[],[],[],[],
                                     [],[],[]},

{{[["$bkt/c884c1f687e7a3227666d1...",1]],
                                      [],[],[],[],[],[],
                                      [["$bkt/c884c1f687e7a32...",1]],
                                      [],[],[],
                                      [["$bkt/c884c1f687e...",1]],
                                      [],
                                      [["$bkt/c884c1f68...",0]],
                                      [],[]}}},
                                {<<"amq.ctag-6D0VFf1CiAX92MduztwyMQ">>,
                                 <<"amq.ctag-xsYcdvDhFzF7PROcEpeYgA">>},
                                {0,nil},
                                {0,nil},
                                undefined,2,"493-6BCB2BDC15A08C8D",true,
                                undefined,
                                {<0.721.30>,undefined},
                                <0.715.30>,<<"amq.topic">>}}
** Reason for termination ==
** {function_clause,
       [{rabbit_mqtt_processor,process_login,
            [<<"useraccounthere">>,<<"XXXXXXX">>,3,
             {proc_state,#Port<0.567958>,
                 {dict,4,16,16,8,80,48,
                     {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
                     {{[["$bkt/c884...",1]],
                       [],[],[],[],[],[],
                       [["$blo...",1]],
                       [],[],[],
                       [["...",1]],
                       [],
                       [["...",0]],
                       [],[]}}},
                 {<<"amq.ctag-6D0VFf1CiAX92MduztwyMQ">>,
                  <<"amq.ctag-xsYcdvDhFzF7PROcEpeYgA">>},
                 {0,nil},
                 {0,nil},
                 undefined,2,"493-6BCB2BDC15A08C8D",true,undefined,
                 {<0.721.30>,undefined},
                 <0.715.30>,<<"amq.topic">>}],
            []},
        {rabbit_mqtt_processor,process_request,3,[]},
        {rabbit_mqtt_reader,process_received_bytes,2,[]},
        {gen_server2,handle_msg,2,[]},
        {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,237}]}]}

=ERROR REPORT==== 7-May-2014::14:11:25 ===
** Generic server <0.715.30> terminating
** Last message in was {'EXIT',<0.710.30>,
                        {function_clause,
                         [{rabbit_mqtt_processor,process_login,
                           [<<"useraccounthere">>,<<"XXXXXXX">>,3,
                            {proc_state,#Port<0.567958>,
                             {dict,4,16,16,8,80,48,
                              {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
                               []},
                              {{[["$b...",1]],
                                [],[],[],[],[],[],
                                [["...",1]],
                                [],[],[],
                                [["...",'...']],
                                [],
                                [['...']],
                                [],[]}}},
                             {<<"amq.ctag-6D0VFf1CiAX92MduztwyMQ">>,
                              <<"amq.ctag-xsYcdvDhFzF7PROcEpeYgA">>},
                             {0,nil},
                             {0,nil},
                             undefined,2,"493-6BCB2BDC15A08C8D",true,
                             undefined,
                             {<0.721.30>,undefined},
                             <0.715.30>,<<"amq.topic">>}],
                           []},
                          {rabbit_mqtt_processor,process_request,3,[]},
                          {rabbit_mqtt_reader,process_received_bytes,2,[]},
                          {gen_server2,handle_msg,2,[]},
                          {proc_lib,wake_up,3,
                           [{file,"proc_lib.erl"},{line,237}]}]}}
** When Server state == {state,amqp_direct_connection,
                         {state,rabbit at somehostsomewhere,
                          {user,<<"useraccounthere">>,
                           [whatever],
                           rabbit_auth_backend_internal,
                           {internal_user,<<"useraccounthere">>,

<<161,99,227,145,114,48,147,95,100,75,53,57,61,183,
                              253,109,128,232,30,86>>,
                            [whatever]}},
                          <<"/">>,
                          {amqp_params_direct,<<"useraccounthere">>,
                           <<"XXXXXXX">>,<<"/">>,
                           rabbit at somehostsomewhere,
                           {amqp_adapter_info,
                            {0,0,0,0,0,65535,32512,1},
                            2883,
                            {0,0,0,0,0,65535,32512,1},
                            34267,<<"127.0.0.1:34267 -> 127.0.0.1:2883">>,
                            {'MQTT',"3"},
                            [{ssl,false}]},
                           []},
                          {amqp_adapter_info,
                           {0,0,0,0,0,65535,32512,1},
                           2883,
                           {0,0,0,0,0,65535,32512,1},
                           34267,<<"127.0.0.1:34267 -> 127.0.0.1:2883">>,
                           {'MQTT',"3"},
                           [{ssl,false}]},
                          <0.718.30>,undefined},
                         <0.717.30>,
                         {amqp_params_direct,<<"useraccounthere">>,
                          <<"XXXXXXX">>,<<"/">>,
                          rabbit at somehostsomewhere,
                          {amqp_adapter_info,
                           {0,0,0,0,0,65535,32512,1},
                           2883,
                           {0,0,0,0,0,65535,32512,1},
                           34267,<<"127.0.0.1:34267 -> 127.0.0.1:2883">>,
                           {'MQTT',"3"},
                           [{ssl,false}]},
                          []},
                         0,
                         [{<<"capabilities">>,table,
                           [{<<"publisher_confirms">>,bool,true},
                            {<<"exchange_exchange_bindings">>,bool,true},
                            {<<"basic.nack">>,bool,true},
                            {<<"consumer_cancel_notify">>,bool,true},
                            {<<"connection.blocked">>,bool,true},
                            {<<"consumer_priorities">>,bool,true},

{<<"authentication_failure_close">>,bool,true}]},

{<<"cluster_name">>,longstr,<<"rabbit at somehostsomewhere">>},
                          {<<"copyright">>,longstr,
                           <<"Copyright (C) 2007-2013 GoPivotal, Inc.">>},
                          {<<"information">>,longstr,
                           <<"Licensed under the MPL.  See
http://www.rabbitmq.com/">>},
                          {<<"platform">>,longstr,<<"Erlang/OTP">>},
                          {<<"product">>,longstr,<<"RabbitMQ">>},
                          {<<"version">>,longstr,<<"3.3.0">>}],
                         none,false}
** Reason for termination ==
** {unexpected_msg,
       {'EXIT',<0.710.30>,
           {function_clause,
               [{rabbit_mqtt_processor,process_login,
                    [<<"useraccounthere">>,<<"XXXXXXX">>,3,
                     {proc_state,#Port<0.567958>,
                         {dict,4,16,16,8,80,48,

 {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
                             {{[["...",1]],
                               [],[],[],[],[],[],
                               [['...']],
                               [],[],[],
                               ['...'],
                               [],
                               ['...'],
                               [],[]}}},
                         {<<"amq.ctag-6D0VFf1CiAX92MduztwyMQ">>,
                          <<"amq.ctag-xsYcdvDhFzF7PROcEpeYgA">>},
                         {0,nil},
                         {0,nil},
                         undefined,2,"493-6BCB2BDC15A08C8D",true,undefined,
                         {<0.721.30>,undefined},
                         <0.715.30>,<<"amq.topic">>}],
                    []},
                {rabbit_mqtt_processor,process_request,3,[]},
                {rabbit_mqtt_reader,process_received_bytes,2,[]},
                {gen_server2,handle_msg,2,[]},
                {proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,237}]}]}}}

=WARNING REPORT==== 7-May-2014::14:11:25 ===
MQTT disconnect from "493-6BCB2BDC15A08C8D"


-- 
Regards,

Mark Wolfe

--
I am not young enough to know everything.
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140605/166bcbed/attachment.html>


More information about the rabbitmq-discuss mailing list