I am cc'ing akalend who wrote amqpcpp.
alexis
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq...@lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq...@lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
That email is quite old.
> Note that I'm using the rabbitmq-cpp wrapper around it (I think it's called amqpcpp officially).
>
> client sees:
>
> Expected 0x000A000A method frame on channel 0, got frame type 65
> [...]
>
> Any help you can give on this would be greatly appreciated. I'm
> testing against 1.6.0 because that's what apt-get gave me, but I'm not
> averse to upgrading.
You are using a version of the rabbitmq-c client that only talks
AMQP-0.9.1 with a version of rabbitmq-server that only talks AMQP-0.8.
The easiest route forward is to upgrade your servert to 2.0 or later.
--
David Wragg
Staff Engineer, RabbitMQ
VMware, Inc.
Pieter
On 4/28/11 5:55 AM, "David Wragg" <da...@rabbitmq.com> wrote:
> David Hawthorne <dha...@3crowd.com> writes:
>> I saw this, which indicates that rabbitmq-c should Just Work:
>>
>> http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-June/003858.html
>
> That email is quite old.
>
>> Note that I'm using the rabbitmq-cpp wrapper around it (I think it's called
>> amqpcpp officially).
>>
>> client sees:
>>
>> Expected 0x000A000A method frame on channel 0, got frame type 65
>> [...]
>>
>> Any help you can give on this would be greatly appreciated. I'm
>> testing against 1.6.0 because that's what apt-get gave me, but I'm not
>> averse to upgrading.
>
> You are using a version of the rabbitmq-c client that only talks
> AMQP-0.9.1 with a version of rabbitmq-server that only talks AMQP-0.8.
> The easiest route forward is to upgrade your servert to 2.0 or later.
_______________________________________________
Anyone know why the apt-installed package hasn't been updated since 1.6.0?
Thanks for the help!
dhawth@u16$ ./example_get
server connection error 504, message: CHANNEL_ERROR - unexpected method in connection state running
dhawth@u16$ ./example_consume
server connection error 504, message: CHANNEL_ERROR - unexpected method in connection state running
Server logs don't show anything other than connection open and close.
This happens after the createQueue, and then queue->Declare lines.
On Apr 28, 2011, at 9:38 AM, Pieter de Zwart wrote:
1. amqpcpp doesn't work with versions 2.0, 2.2, or 2.4.1
2. the server is sending a AMQP_RESPONSE_SERVER_EXCEPTION back during the amqp_channel_open call in rabbitmq-c
3. the rabbitmq-c tools in the tools/ subdirectory all work fine
4. rabbitmq the server doesn't give any logging outside of starting and closing the TCP connection, and I can't find a way to enable more verbose logging
I'll keep digging to see if I can find more useful information.
from amqp.h:
typedef enum amqp_response_type_enum_ {
AMQP_RESPONSE_NONE = 0,
AMQP_RESPONSE_NORMAL,
AMQP_RESPONSE_LIBRARY_EXCEPTION,
AMQP_RESPONSE_SERVER_EXCEPTION
} amqp_response_type_enum;
from my test program:
0 [0x7f1033a7f750] DEBUG AMQP null - Making new connection to amqp server
2 [0x7f1033a7f750] DEBUG AMQP null - Logging into amqp server
5 [0x7f1033a7f750] DEBUG main null - creating queue foobar
5 [0x7f1033a7f750] DEBUG AMQP null - creating queue with name foobar
5 [0x7f1033a7f750] DEBUG AMQPQueue null - constructing new queue with channelNum 0 and name foobar
5 [0x7f1033a7f750] DEBUG AMQPQueue null - opening channel
amqp_simple_rpc_decoded reply type is 3 in amqp_simple_rpc_decoded in amqp_socket.c
5 [0x7f1033a7f750] DEBUG AMQPQueue null - amqp_channel_open returned null
David Hawthorne <dsrt...@gmail.com> writes:
> On Apr 28, 2011, at 2:48 PM, David Hawthorne wrote:
>
>> Here's another problem, this time using amqpcpp with 2.4.1:
>>
>> dhawth@u16$ ./example_get
>> server connection error 504, message: CHANNEL_ERROR - unexpected method in connection state running
>>
>> dhawth@u16$ ./example_consume
>> server connection error 504, message: CHANNEL_ERROR - unexpected method in connection state running
This error suggests that you are trying to use channel number 0 (which
has a special role in AMQP) for general methods.
> [...]
> from my test program:
>
> 0 [0x7f1033a7f750] DEBUG AMQP null - Making new connection to amqp server
> 2 [0x7f1033a7f750] DEBUG AMQP null - Logging into amqp server
> 5 [0x7f1033a7f750] DEBUG main null - creating queue foobar
> 5 [0x7f1033a7f750] DEBUG AMQP null - creating queue with name foobar
> 5 [0x7f1033a7f750] DEBUG AMQPQueue null - constructing new queue with
> channelNum 0 and name foobar
And this line suggests the same thing.
But looking at the amqpcpp code on github, I don't see how that could
happen. AMQP::init sets channelNumber to 0, and AMQP::createQueue
increments it. Are you using amqpcpp from github without modification
(other than adding the logging)?
Alexandre: By the way, the channelNumber allocation logic in amqpcpp
looks wrong to me. But it shouldn't affect the examples where only a
single channel is used, so I don't think that's the cause of David's
problem.
David
--
David Wragg
Staff Engineer, RabbitMQ
VMware, Inc.
FWIW, it's not easy to find out what versions of the AMQP spec the various versions of rabbitmq support when digging through the website.
Or take a look at
http://www.rabbitmq.com/specification.html#release-version-mapping
:)
Matthias.