rabbitmq / rabbitmq-amqp1.0

AMQP 1.0 support for RabbitMQ
https://www.rabbitmq.com/
Other
93 stars 20 forks source link

error while receiving transfer message #51

Closed antonyereshchenko-mobius closed 7 years ago

antonyereshchenko-mobius commented 7 years ago

Hi While server gets the transfer message following error is received : Reason for termination == {function_clause, [{rabbit_amqp1_0_message,to_expiration, [{uint,1000}], [{file,"src/rabbit_amqp1_0_message.erl"},{line,173}]}, {rabbit_amqp1_0_message,translate_header,2, [{file,"src/rabbit_amqp1_0_message.erl"},{line,146}]}, {rabbit_amqp1_0_message,assemble,4, [{file,"src/rabbit_amqp1_0_message.erl"},{line,35}]}, {rabbit_amqp1_0_message,assemble,1, [{file,"src/rabbit_amqp1_0_message.erl"},{line,30}]}, {rabbit_amqp1_0_incoming_link,transfer,4, [{file,"src/rabbit_amqp1_0_incoming_link.erl"},{line,147}]}, {rabbit_amqp1_0_session_process,handle_control,2, [{file,"src/rabbit_amqp1_0_session_process.erl"},{line,214}]}, {rabbit_amqp1_0_session_process,handle_cast,2, [{file,"src/rabbit_amqp1_0_session_process.erl"},{line,134}]}, {gen_server2,handle_msg,2, [{file,"src/gen_server2.erl"},{line,1048}]}]}

michaelklishin commented 7 years ago

Thank you for your time.

Team RabbitMQ uses GitHub issues for specific actionable items engineers can work on. This assumes two things:

  1. GitHub issues are not used for questions, investigations, root cause analysis, discussions of potential issues, etc (as defined by this team)
  2. We have a certain amount of information to work with

We get at least a dozen of questions through various venues every single day, often quite light on details. At that rate GitHub issues can very quickly turn into a something impossible to navigate and make sense of even for our team. Because of that questions, investigations, root cause analysis, discussions of potential features are all considered to be mailing list material by our team. Please post this to rabbitmq-users.

Getting all the details necessary to reproduce an issue, make a conclusion or even form a hypothesis about what's happening can take a fair amount of time. Our team is multiple orders of magnitude smaller than the RabbitMQ community. Please help others help you by providing a way to reproduce the behavior you're observing, or at least sharing as much relevant information as possible on the list:

Feel free to edit out hostnames and other potentially sensitive information.

When/if we have enough details and evidence we'd be happy to file a new issue.

Thank you.

michaelklishin commented 7 years ago

This is quite likely to be #13.

michaelklishin commented 7 years ago

@kjnilsson suggests that #13 was fixed in December 2016: https://github.com/rabbitmq/rabbitmq-amqp1.0/commit/60e9fb3362a31b17c7c610f2ba87a9d5890cabf2 and backported to stable recently.

antonyereshchenko-mobius commented 7 years ago

I have write own AMQP 1.0 client and use your server (and plugin) for test and debugging.

server: rabbitmq-server package in Ubuntu (3.6.6-1 2017-04-20) plugin: https://github.com/rabbitmq/rabbitmq-amqp1.0

SERVER LOGS:

=INFO REPORT==== 20-Jun-2017::08:20:48 ===
accepting AMQP connection <0.24452.0> (82.207.113.63:50130 -> 10.0.0.6:5672)

=ERROR REPORT==== 20-Jun-2017::08:20:52 ===
** Generic server <0.24458.0> terminating
** Last message in was {'$gen_cast',
                           {frame,
                               {{'v1_0.transfer',
                                    {uint,0},
                                    {uint,0},
                                    {binary,<<"132)">>},
                                    {uint,0},
                                    false,false,undefined,undefined,undefined,
                                    undefined,undefined},
                                <<0,83,116,193,44,6,161,2,116,115,129,0,0,0,0,
                                  0,6,157,5,161,2,115,110,82,1,161,11,97,112,
                                  112,80,114,111,112,101,114,116,121,161,9,
                                  115,111,109,101,86,97,108,117,101,0,83,117,
                                  160,5,104,101,108,108,111,0,83,115,192,21,5,
                                  64,64,64,64,161,14,114,101,112,108,121,84,
                                  111,65,100,100,114,101,115,115,0,83,112,192,
                                  4,2,65,80,3>>},
                               <0.24452.0>}}
** When Server state == {state,<0.24461.0>,<0.24467.0>,unlimited,<0.24452.0>,
                            <0.24457.0>,
                            {[],[]},
                            {session,0,2147483647,0,0,65535,65535,0,65535,
                                65535,1,0,
                                {0,nil},
                                {0,nil}}}
** Reason for termination == 
** {{unexpected_trailing_sections,
        {{'v1_0.properties',undefined,undefined,undefined,undefined,
             {utf8,<<"replyToAddress">>},
             undefined,undefined,undefined,undefined,undefined,undefined,
             undefined,undefined},
         <<0,83,112,192,4,2,65,80,3>>}},
    [{rabbit_amqp1_0_message,assemble,4,
         [{file,"src/rabbit_amqp1_0_message.erl"},{line,113}]},
     {rabbit_amqp1_0_message,assemble,1,
         [{file,"src/rabbit_amqp1_0_message.erl"},{line,30}]},
     {rabbit_amqp1_0_incoming_link,transfer,4,
         [{file,"src/rabbit_amqp1_0_incoming_link.erl"},{line,147}]},
     {rabbit_amqp1_0_session_process,handle_control,2,
         [{file,"src/rabbit_amqp1_0_session_process.erl"},{line,214}]},
     {rabbit_amqp1_0_session_process,handle_cast,2,
         [{file,"src/rabbit_amqp1_0_session_process.erl"},{line,134}]},
     {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1048}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}

=ERROR REPORT==== 20-Jun-2017::08:20:55 ===
closing AMQP connection <0.24452.0> (82.207.113.63:50130 -> 10.0.0.6:5672):
{handshake_error,running,<0.24458.0>,
    {{symbol,<<"amqp:internal-error">>},
     "Session error: ~p~n~p~n",
     [{unexpected_trailing_sections,
          {{'v1_0.properties',undefined,undefined,undefined,undefined,
               {utf8,<<"replyToAddress">>},
               undefined,undefined,undefined,undefined,undefined,undefined,
               undefined,undefined},
           <<0,83,112,192,4,2,65,80,3>>}},
      [{rabbit_amqp1_0_message,assemble,4,
           [{file,"src/rabbit_amqp1_0_message.erl"},{line,113}]},
       {rabbit_amqp1_0_message,assemble,1,
           [{file,"src/rabbit_amqp1_0_message.erl"},{line,30}]},
       {rabbit_amqp1_0_incoming_link,transfer,4,
           [{file,"src/rabbit_amqp1_0_incoming_link.erl"},{line,147}]},
       {rabbit_amqp1_0_session_process,handle_control,2,
           [{file,"src/rabbit_amqp1_0_session_process.erl"},{line,214}]},
       {rabbit_amqp1_0_session_process,handle_cast,2,
           [{file,"src/rabbit_amqp1_0_session_process.erl"},{line,134}]},
       {gen_server2,handle_msg,2,[{file,"src/gen_server2.erl"},{line,1048}]},
       {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]]}}

I attach file with client's traffic capturing. amqp.pcapng.zip

Thank you for answer.

michaelklishin commented 7 years ago

@antonyereshchenko-mobius I'm sorry but this is not a support forum and our small team doesn't have the manpower to assist you with the development of your client library.

As with any client, it is important to test against multiple servers if they are available. Our Erlang AMQP 1.0 client is tested against 4 (RabbitMQ, Azure, Qpid, IBM WebSphereMQ Lite), for instance, and we've discovered curious assumptions in some of them that are not technically a part of the spec.

Feel free to post this to rabbitmq-users, perhaps someone would be interested in taking a look.

kjnilsson commented 7 years ago

Hi, The fix was only very recently back-ported from our master branch to 3.6.*. It should be in the next 3.6.x release. @antonyereshchenko-mobius if you want to verify that you could try your client against one of our 3.7 pre-releases as that has had the fix for some time.

michaelklishin commented 7 years ago

OK, so it wasn't backported in Dec 2016. Sorry about that. You can try the most recent 3.7.0 milestone release.