Erlang/OTP Forums

Author Message

<  RabbitMQ mailing list  ~  Errors using Windows .NET Client Library

Guest
Posted: Sun Mar 30, 2008 6:01 am Reply with quote
Guest
Please can someone help me with an explanation.
Guest
Posted: Sun Mar 30, 2008 8:18 am Reply with quote
Guest
Bill,

Bill Chikirivao wrote:
> If I make code changes such that I change the protocol to AMQP_0_8 in my
> app.config file and then set the protocol as
> Protocols.FromConfiguration("my-protocol");
> Then I am able to connect and I don't get the same exception. Is this
> the expected behavior?

Yes, that is the expected behaviour. Note that you can switch protocols
without changing the code by setting the AMQP_PROTOCOL environment
variable, e.g. run the examples like this
AMQP_PROTOCOL=AMQP_0_8 ./bin/ExampleProgram.exe

> and further does the RabbitMQ server only support AMQP 0-8?

Correct. 0-9 support is under development.

> And if the examples are primarily targeted for
> RabbitMQ then why have the default to AMQP 0-9 such that you have to
> explicitly change the protocol to 0-8 when running against RabbitMQ?

The .NET client was actually developed with a different broker as the
primary target. Your point is valid though; we should change the default
to whatever protocol is supported by the latest version of the RabbitMQ
broker.

Matthias.

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist
Guest
Posted: Sun Mar 30, 2008 5:54 pm Reply with quote
Guest
Thanks a lot guys for all your help.
tonyg
Posted: Sun Mar 30, 2008 6:03 pm Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Hi again,

BillC wrote:
> If I make code changes such that I change the protocol to AMQP_0_8 in my
> app.config file and then set the protocol as
> Protocols.FromConfiguration("my-protocol");
> Then I am able to connect and I don't get the same exception. Is this
> the expected behavior?

Yes, it is, for the current release, anyway. The RabbitMQ .NET client
library supports

- stock AMQP 0-9 brokers (and this is the default setting)
- stock AMQP 0-8 brokers (like RabbitMQ's current release)
- some of QPid's extensions to the AMQP 0-8 specification

Furthermore, because RabbitMQ is the only broker that implements the
"access.request" method, there's a way of disabling the use of
access.request on the client side.

At the time we developed the library, we were commissioned to make it
work by default against a stock 0-9 broker. Perhaps we should try some
kind of automatic graceful-downgrade renegotiation instead. Hmm.

> and further does the RabbitMQ server only
> support AMQP 0-8?

It does, yes. So far!

> And if the examples are primarily targeted for
> RabbitMQ then why have the default to AMQP 0-9 such that you have to
> explicitly change the protocol to 0-8 when running against RabbitMQ?

We tried to make the examples broker-neutral - they should work on *any*
AMQP 0-8 or 0-9 broker. So really I guess we should be looking at ways
of avoiding the having-to-set-the-protocol-version problem...

Regards,
Tony


_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist
View user's profile Send private message MSN Messenger
tonyg
Posted: Sun Mar 30, 2008 6:10 pm Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Wow, that's really weird. Everything looks normal up until the
connection goes away. Neither side is sending any complaint to the other.

Have you checked the RabbitMQ server logs? They will contain lines like:

=INFO REPORT==== 30-Mar-2008::18:51:31 ===
accepted TCP connection on 0.0.0.0:5672 from 127.0.0.1:52676
=INFO REPORT==== 30-Mar-2008::18:51:31 ===
closing TCP connection from 127.0.0.1:52676

etc etc. Perhaps the server is suffering from some problem it doesn't
get the opportunity to inform the client about.

Regards,
Tony

BTW. If you use IRC, I'm in #rabbitmq on freenode.



BillC wrote:
> Thanks a lot guys for all your help. Tony I ran the tool as per your
> instructions and this is what appears on the screen dump of the Tracer:
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
>
> C:\Documents and Settings\Development>cd
> C:\downloads\complete-rabbitmq-bundle-1
> .2.0\librabbitmq-java-1.2.0
>
> C:\downloads\complete-rabbitmq-bundle-1.2.0\librabbitmq-java-1.2.0>runjava
> com.r
> abbitmq.tools.Tracer
> Usage: Tracer [<listenport> [<connecthost> [<connectport>]]]
> Invoked as: Tracer 5673 localhost 5672
> conn#0 ch#0 -> {#method<connection.start-ok>(client
> properties={product=RabbitMQ
> , information=Licensed under the MPL. See http://www.rabbitmq.com/,
> platform=.N
> ET, copyright=Copyright (C) 2007 LShift Ltd., Cohesive Financial
> Technologies LL
> C., and Rabbit Technologies Ltd., version=1.2.8025.1832},
> mechanism=PLAIN, respo
> nse= guest guest, locale=en_US),null,""}
> conn#0 ch#0 <- {#method<connection.start>(version major=8, version
> minor=0, serv
> er properties={product=RabbitMQ, information=Licensed under the MPL.
> See http:/
> /www.rabbitmq.com/, platform=Erlang/OTP, copyright=Copyright (C) 2007
> LShift Ltd
> ., Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.,
> version=1
> .2.0}, mechanisms=PLAIN AMQPLAIN, locales=en_US),null,""}
> conn#0 ch#0 -> {#method<connection.tune-ok>(channel max=0, frame
> max=131072, hea
> rtbeat=3),null,""}
> conn#0 ch#0 -> {#method<connection.open>(virtual host=/, capabilities=,
> insist=t
> rue),null,""}
> conn#0 ch#0 <- {#method<connection.tune>(channel max=0, frame
> max=131072, heartb
> eat=0),null,""}
> conn#0 ch#1 -> {#method<channel.open>(out of band=),null,""}
> conn#0 ch#0 <- {#method<connection.open-ok>(known
> hosts=billcmacxp:5672),null,""
> }
> conn#0 ch#1 -> {#method<access.request>(realm=/data, exclusive=false,
> passive=tr
> ue, active=true, write=true, read=true),null,""}
> conn#0 ch#1 <- {#method<channel.open-ok>(),null,""}
> conn#0 ch#1 -> {#method<exchange.declare>(ticket=101,
> exchange=testexchange, typ
> e=direct, passive=false, durable=false, auto delete=false,
> internal=false, nowai
> t=false, arguments={}),null,""}
> conn#0 ch#1 <- {#method<access.request-ok>(ticket=101),null,""}
> conn#0 ch#1 <- {#method<exchange.declare-ok>(),null,""}
> conn#0 ch#1 -> {#method<queue.declare>(ticket=101, queue=testqueue,
> passive=fals
> e, durable=false, exclusive=false, auto delete=false, nowait=false,
> arguments={}
> ),null,""}
> conn#0 ch#1 <- {#method<queue.declare-ok>(queue=testqueue, message
> count=3, cons
> umer count=0),null,""}
> conn#0 ch#1 -> {#method<queue.bind>(ticket=101, queue=testqueue,
> exchange=testex
> change, routing key=routingkey, nowait=false, arguments={}),null,""}
> conn#0 ch#1 <- {#method<queue.bind-ok>(),null,""}
> conn#0 ch#1 -> {#method<basic.consume>(ticket=101, queue=testqueue,
> consumer tag
> =, no local=false, no ack=false, exclusive=false, nowait=false),null,""}
> conn#0 ch#1 <- {#method<basic.consume-ok>(consumer
> tag=amq.ctag13_rabbit@billcma
> cxp_20080330164613_),null,""}
> conn#0 ch#1 <- {#method<basic.deliver>(consumer
> tag=amq.ctag13_rabbit@billcmacxp
> _20080330164613_, delivery tag=10000, redelivered=false,
> exchange=testexchange,
> routing key=routingkey),#contentHeader<basic>(content type=text/plain,
> content e
> ncoding=null, headers=null, delivery mode=2, priority=null, correlation
> id=null,
> reply to=null, expiration=null, message id=null, timestamp=null,
> type=null, use
> r id=null, app id=null, cluster id=null),"Hello, world! .. hello Vero
> hello"}
> conn#0 ch#1 <- {#method<basic.deliver>(consumer
> tag=amq.ctag13_rabbit@billcmacxp
> _20080330164613_, delivery tag=10001, redelivered=false,
> exchange=testexchange,
> routing key=routingkey),#contentHeader<basic>(content type=text/plain,
> content e
> ncoding=null, headers=null, delivery mode=2, priority=null, correlation
> id=null,
> reply to=null, expiration=null, message id=null, timestamp=null,
> type=null, use
> r id=null, app id=null, cluster id=null),"Hello, world! .. hello Vero
> hello"}
> conn#0 ch#1 <- {#method<basic.deliver>(consumer
> tag=amq.ctag13_rabbit@billcmacxp
> _20080330164613_, delivery tag=10002, redelivered=false,
> exchange=testexchange,
> routing key=routingkey),#contentHeader<basic>(content type=text/plain,
> content e
> ncoding=null, headers=null, delivery mode=2, priority=null, correlation
> id=null,
> reply to=null, expiration=null, message id=null, timestamp=null,
> type=null, use
> r id=null, app id=null, cluster id=null),"Hello, world! .. hello Vero
> hello"}
> conn#0 ch#1 -> {#method<basic.ack>(delivery tag=10000,
> multiple=false),null,""}
> conn#0 ch#1 -> {#method<basic.ack>(delivery tag=10001,
> multiple=false),null,""}
> conn#0 ch#1 -> {#method<basic.ack>(delivery tag=10002,
> multiple=false),null,""}
> java.io.EOFException
> at java.io.DataInputStream.readUnsignedByte(Unknown Source)
> at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:103)
> at
> com.rabbitmq.tools.Tracer$DirectionHandler.readFrame(Tracer.java:144)
>
> at
> com.rabbitmq.tools.Tracer$DirectionHandler.doFrame(Tracer.java:152)
> at com.rabbitmq.tools.Tracer$DirectionHandler.run(Tracer.java:170)
> at java.lang.Thread.run(Unknown Source)
>
>
>
>
>
> ----- Forwarded Message ----
> From: Bill Chikirivao <billc@inworksol.com>
> To: rabbitmq-discuss@lists.rabbitmq.com
> Sent: Sunday, March 30, 2008 1:00:37 AM
> Subject: Errors using Windows .NET Client Library
>
> Please can someone help me with an explanation. I really appreciate any
> help you can give me.I am getting some errors when I try to run any of
> the examples that come with the .NET
> rabbitmq-dotnet-1.2.8025.1832-net-2.0 download. I am running RabbitMQ
> server 1.2.0 which comes from the bundles in the windows
> complete-rabbitmq-bundle-1.2.0.zip
> <http://www.rabbitmq.com/releases/windows/complete-rabbitmq-bundle-1.2.0.zip>
> download. When I run any of the samples I get the following error:
>
> {RabbitMQ.Client.Exceptions.ProtocolVersionMismatchException: AMQP
> server protocol negotiation failure: server version 0-8, transport
> parameters -1:-1
> at RabbitMQ.Client.Impl.ConnectionBase.Open(Boolean insist)
> at RabbitMQ.Client.Impl.ConnectionBase..ctor(ConnectionParameters
> parameters, Boolean insist, IFrameHandler frameHandler)
> at
> RabbitMQ.Client.Framing.Impl.v0_9.Connection..ctor(ConnectionParameters
> parameters, Boolean insist, IFrameHandler frameHandler)
> at
> RabbitMQ.Client.Framing.Impl.v0_9.ProtocolBase.CreateConnection(ConnectionParameters
> parameters, Boolean insist, IFrameHandler frameHandler)
> at RabbitMQ.Client.ConnectionFactory.FollowRedirectChain(Int32
> maxRedirects, IDictionary connectionAttempts, IDictionary
> connectionErrors, AmqpTcpEndpoint[]& mostRecentKnownHosts,
> AmqpTcpEndpoint endpoint)}
>
> If I make code changes such that I change the protocol to AMQP_0_8 in my
> app.config file and then set the protocol as
> Protocols.FromConfiguration("my-protocol");
> Then I am able to connect and I don't get the same exception. Is this
> the expected behavior? and further does the RabbitMQ server only
> support AMQP 0-8? And if the examples are primarily targeted for
> RabbitMQ then why have the default to AMQP 0-9 such that you have to
> explicitly change the protocol to 0-8 when running against RabbitMQ?
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss@lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post recived from mailinglist
View user's profile Send private message MSN Messenger
tonyg
Posted: Fri Apr 04, 2008 4:06 pm Reply with quote
User Joined: 07 Nov 2006 Posts: 199
Hi Bill,

The heartbeat issue we've been discussing is possibly related to the
issue in the "troubleshooting" section,
View user's profile Send private message MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum