<div dir="ltr">Marco - Thanks I got the file and was able to look at it in Wireshark. Upon first glance I see two issues: the frame type is wrong (the first byte should be 0x01 instead of 0x02), and there appears to be an added 0x05 octet right at the beginning of the frame payload (it should be 0x00, 0x0a, 0x00, 0x0b). There may also be some other issues as I didn't look more deeply than that. �Question for you: is your armv6 system running in little or big-endian mode? It appears that we've correctly detected the endianness of the system, but I'm not 100% sure on that.<div>
<div><br></div><div>Also when compiling the library did you notice any compiler warnings? (Enable -Wall -Wextra if necessary).</div><div><br></div><div><b>To one of the RabbitMQ broker developers</b>: for the following message in the RabbitMQ broker logs:<br>
<div><br></div><div><div class="im" style="font-family:arial,sans-serif;font-size:13px">� � =ERROR REPORT==== 3-Apr-2014::15:05:35 ===<br>� � closing AMQP connection <0.380.0> (<a href="http://192.168.1.117:52890/" target="_blank">192.168.1.117:52890</a><br>
</div><span style="font-family:arial,sans-serif;font-size:13px">� � <</span><a href="http://192.168.1.117:52890/" target="_blank" style="font-family:arial,sans-serif;font-size:13px">http://192.168.1.117:52890</a><span style="font-family:arial,sans-serif;font-size:13px">> ->�</span><a href="http://192.168.1.133:5672/" target="_blank" style="font-family:arial,sans-serif;font-size:13px">192.168.1.133:5672</a><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">� � <</span><a href="http://192.168.1.133:5672/" target="_blank" style="font-family:arial,sans-serif;font-size:13px">http://192.168.1.133:5672</a><span style="font-family:arial,sans-serif;font-size:13px">>):</span><div class="im" style="font-family:arial,sans-serif;font-size:13px">
<br>� � {handshake_error,starting,0,<br>� � � � � � � � � � � {amqp_error,frame_error,<br>� � � � � � � � � � � � � � � � � "type 0, first 16 octets =<br></div><span style="font-family:arial,sans-serif;font-size:13px">� � <<5,10,0,11,0,0,0,80,98,112,__</span><u style="font-family:arial,sans-serif;font-size:13px"></u><span style="font-family:arial,sans-serif;font-size:13px">114,111,100,117,99,116>>...",</span><div class="im" style="font-family:arial,sans-serif;font-size:13px">
<br>� � � � � � � � � � � � � � � � � none}}</div><div><br></div><div>Are those first 16 octets including or not including the frame header?</div><div><br></div><div>-Alan</div><div><br></div></div></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Apr 6, 2014 at 2:25 AM, Marco Scoffier <span dir="ltr"><<a href="mailto:marco@metm.org" target="_blank">marco@metm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Alan,<br>
<br>
I just re-uploaded the file to include all the packets around the handshake (not just the 3 I get when filtering for AMQP) as you mentioned wireshark itself might also have parsing issues.<span class="HOEnZb"><font color="#888888"><br>

<br>
Marco</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On 04/06/2014 03:16 AM, Marco Scoffier wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sure,<br>
<br>
I dumped the 3 packets to a separate file. This is the binary data which<br>
you can open in wireshark:<br>
<br>
<a href="http://metm.org/images/amqp_handshake_wireshark.log" target="_blank">http://metm.org/images/amqp_<u></u>handshake_wireshark.log</a><br>
<br>
Thanks for looking into this and happy to provide any additional tests,<br>
<br>
Marco<br>
<br>
On 04/06/2014 12:48 AM, Alan Antonuk wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Marco;<br>
<br>
�From the wireshark info, it sounds like the rabbitmq-c client is<br>
sending completely the wrong data. It should send a Connection.Start-Ok<br>
method and not a content-header frame (e.g., the frame type should be 1<br>
first few bytes of that frame should be: 0x01 {Method Frame}, 0x00, 0x00<br>
{Channel 0}, 0x00, 0x00 0xXX, 0xXX {Big Endian length of frame in bytes}<br>
). I'm also not sure what to to think about the sent header length: that<br>
should be 8 bytes or 64 bits, I suspect thats a wireshark oddity though.<br>
<br>
The octets reported by the RabbitMQ server error message don't really<br>
make sense to me: I'm having trouble correlating what is reported vs<br>
what I think should be, even if the system is doing an incorrect<br>
byteswap. I'm not 100% sure we're clear of any unaligned access issues,<br>
but I would guess we'd be hitting bus-errors in that case, though I'm<br>
not quite sure<br>
<br>
Would you be willing to send me a filtered down wireshark log of the<br>
failed handshake?<br>
<br>
-Alan<br>
<br>
<br>
On Fri, Apr 4, 2014 at 6:38 PM, Marco Scoffier <<a href="mailto:marco@metm.org" target="_blank">marco@metm.org</a><br>
<mailto:<a href="mailto:marco@metm.org" target="_blank">marco@metm.org</a>>> wrote:<br>
<br>
� � Hello,<br>
<br>
� � I apologize if this has been discussed before. I checked the<br>
� � archives but did not find any mention of the issue.<br>
<br>
� � I've compiled rabbitmq-c [1] for the arm architecture [2] �from and<br>
� � am trying to send messages to a broker running on another machine<br>
� � [3]. The rabbitmq-c examples run perfectly on the 64bit linux, same<br>
� � code compiled for arm device and running there sends a corrupt<br>
packet.<br>
<br>
� � [1] <a href="https://github.com/alanxz/__rabbitmq-c" target="_blank">https://github.com/alanxz/__<u></u>rabbitmq-c</a><br>
� � <<a href="https://github.com/alanxz/rabbitmq-c" target="_blank">https://github.com/alanxz/<u></u>rabbitmq-c</a>><br>
� � [2] armv6 linaro toolchain<br>
� � [3] linux 64bit rabbitmq-server ppa for ubuntu. running on 12.04<br>
<br>
� � I'm a little stuck about how to debug further and am looking for<br>
� � some pointers where to look in the code or what extra information I<br>
� � can provide.<br>
<br>
� � Wireshark shows three packets for the amqp_sendstring example<br>
<br>
� � ARM device/Source = 192.168.1.117<br>
� � 64bit broker/Destination = 192.168.1.133<br>
<br>
� � Source � � � � �Destination � �protocol length info<br>
� � --------------+---------------<u></u>__+--------+------+-----------<u></u>-<br>
� � 192.168.1.117 � 192.168.1.133 � AMQP � �74 � � �Protocol-Header 9-1<br>
� � 192.168.1.133 � 192.168.1.117 � AMQP � �522 � � Connection.Start<br>
� � 192.168.1.117 � 192.168.1.133 � AMQP � �190 � � Content-Header<br>
<br>
� � wireshark's amqp frame dissection shows an error on the 3rd<br>
� � Content-Header packet:<br>
<br>
� � Expert Info (Error/Protocol): Unknown header class 1290<br>
� � Message: Unknown header class 1290<br>
� � Severity level: Error<br>
� � Group: Protocol<br>
<br>
� � the rabbitmq-server on the linux machine provides this log message:<br>
<br>
� � =ERROR REPORT==== 3-Apr-2014::15:05:35 ===<br>
� � closing AMQP connection <0.380.0> (<a href="http://192.168.1.117:52890" target="_blank">192.168.1.117:52890</a><br>
� � <<a href="http://192.168.1.117:52890" target="_blank">http://192.168.1.117:52890</a>> -> <a href="http://192.168.1.133:5672" target="_blank">192.168.1.133:5672</a><br>
� � <<a href="http://192.168.1.133:5672" target="_blank">http://192.168.1.133:5672</a>>):<br>
� � {handshake_error,starting,0,<br>
� � � � � � � � � � � {amqp_error,frame_error,<br>
� � � � � � � � � � � � � � � � � "type 0, first 16 octets =<br>
� � <<5,10,0,11,0,0,0,80,98,112,__<u></u>114,111,100,117,99,116>>...",<br>
� � � � � � � � � � � � � � � � � none}}<br>
<br>
� � repeat that the same code compiled for 64bit linux same command<br>
� � works as expected.<br>
<br>
� � Thanks for any pointers,<br>
<br>
� � Marco<br>
� � ______________________________<u></u>___________________<br>
� � rabbitmq-discuss mailing list<br>
� � rabbitmq-discuss@lists.__<a href="http://rabbitmq.com" target="_blank">rabbi<u></u>tmq.com</a><br>
� � <mailto:<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@<u></u>lists.rabbitmq.com</a>><br>
<br>
<a href="https://lists.rabbitmq.com/__cgi-bin/mailman/listinfo/__rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/__<u></u>cgi-bin/mailman/listinfo/__<u></u>rabbitmq-discuss</a><br>
<br>
<<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a>><br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div>