You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by jazzcat2 <jo...@globalherald.net> on 2008/01/24 17:17:45 UTC

Re: openamq


Hello,

> Attached is a patch if it is of any use to you. This should let you run 
> against the openamq broker.

Has anybody tried to use this patch, and if so, against which version of
Python QPid?  When I try to use against M2 it doesn't work - the patch
process fails.

Thanks,
-J
-- 
View this message in context: http://www.nabble.com/openamq-tp13856276p15068486.html
Sent from the Qpid Developers mailing list archive at Nabble.com.


Re: openamq

Posted by Gordon Sim <gs...@redhat.com>.
jazzcat2 wrote:
> Ok, here I've attached a full list of errors.
> http://www.nabble.com/file/p15072395/errors.log errors.log 

Thanks! There were some odd looking errors in there so I installed 
openamq and ran them myself to do some debug. Here's the initial report:

First point is that the qpid python client doesn't support heartbeats. 
You can workaround this by turning them off on openamq (amq_server 
--heartbeat 0).

Second, there are several failures due to openamq's apparent lack of 
support for multiple channels on a connection (even when the negotiated 
number of channels is increased). You may not need this feature but a 
number of the tests use different channels and fail for this reason.

Third, some failures seem to be down to some sort of race condition. If 
you publish a message on a channel, you are not guaranteed to see that 
message even from your own channel. So e.g. if you publish three 
messages then issue a queue declare to get the count, that count may not 
be accurate. This accounts for several of the queue test failures.

This same behaviour also makes the use of get on the same channel 
unreliable and causes the testing of that method fail. Adding in sleeps 
after publishes fixes the issue which is why I suggest it is a race of 
some sort; e.g. the publishes are handled in a separate thread from 
subsequent methods.

A number of other failures are due to openamq not supporting specific 
methods or functions.

It appears that though the use of no_ack = 0 on basic.consume (and 
basic.get) and the use of the basic.ack method do not raise errors, 
openamq doesn't actually support acknowledged messages.

As Robert mentioned, openamq does not seem to support transactions. 
Issuing a tx.select doesn't cause a failure, but the server doesn't 
respond with the required select-ok.

A similar issue occurs with the basic.qos method. The server doesn't 
respond with the required qos-ok.

Another unimplemented method is basic.recover. This actually causes an 
exception to be thrown on the broker for an invalid method. However it 
is part of the standard (in 0-9 and 0-8).

Then there are some more specific and generally minor issues:

* openamq's topic exchange doesn't match a.b.x given the binding a.#.b.* 
which qpid believes is valid; the other patterns tested for all work as 
expected

* openamq doesn't seem to support headers matching, or perhaps just 
interprets it differently to qpid (all our headers exchange tests fail; 
I can get more details if this is an area of interest to you)

* openamq appears to ignores the if_empty flag on queue.delete

* one of the tests for the exchanges is invalid - it attempts to bind to 
the default exchange which is not actually allowed

* openamq doesn't handle non-unique consumer tags correctly; it logs an 
error to the console but doesn't respond with either an channel or 
connection closure or with the consume-ok the client waits for

* qpid has a slightly different interpretation of the auto-deletion of 
exclusive queues (we delete them only when the connection closes, 
openamq deletes them as soon as the last consumer is cancelled). This 
doesn't really have a huge impact, but one or two of the tests rely on 
qpid interpretation

* there has been a rule change between 0-8 and 0-9 I was not aware of 
such that it a broker should now reject a basic.cancel for a consumer 
tag that is unknown; in 0-8 the broker was required to ignore that case. 
This causes a test to fail, but again is really just a corner case

* when testing that a queue already declared as exclusive can't be 
redeclared by another connection the test expects a '405, resource 
locked' error ("The client attempted to work with a server entity to 
which it has no access because another client is working with it.") but 
openamq issues a '403, access refused' ("The client attempted to work 
with a server entity to which it has no access due to security 
settings."). Again this is unlikely to be of great practical concern and 
I'm listing it mainly for completeness.

Re: openamq

Posted by jazzcat2 <jo...@globalherald.net>.

Ok, here I've attached a full list of errors.
http://www.nabble.com/file/p15072395/errors.log errors.log 
-- 
View this message in context: http://www.nabble.com/openamq-tp13856276p15072395.html
Sent from the Qpid Developers mailing list archive at Nabble.com.


Re: openamq

Posted by Gordon Sim <gs...@redhat.com>.
Robert Greig wrote:
> Do our tests have a strict distinction between "Fail" and "Error"? Or
> does "Error" just mean "Fail" but in a way we did not anticipate?

Thats about it! The "Fail" means an assertion failed; "Error" means 
something else went wrong.

I'm going to go through the detailed messages and see what I can make 
out of them.

Re: openamq

Posted by Robert Greig <ro...@gmail.com>.
On 24/01/2008, Gordon Sim <gs...@redhat.com> wrote:

> wrong. One thing to point out is that openamq may not support all these
> features.

Yes, for example OpenAMQ does not support transactions.

> Another possibility is that the tests are overly restrictive
> and fail on an implementation other than qpid even though it is amqp
> compliant - we want to get those sorts of tests either fixed or clearly
> annotated and isolated.

Do our tests have a strict distinction between "Fail" and "Error"? Or
does "Error" just mean "Fail" but in a way we did not anticipate?

RG

Re: openamq

Posted by Gordon Sim <gs...@redhat.com>.
jazzcat2 wrote:
> So far I've done the following exercise:
> 
> 1. Built and installed OpenAMQ 1.2c4; it's running OK.
> 2. Downloaded Python QPid M2.
> 3. Modified the testlib.py file so that login information is represented as
> _'\0' + user + '\0' + password_ instead of {"LOGIN": user, "PASSWORD":
> password}

Yes, it looks like the python client is using the old 'amqplain' 
authentication scheme rather than the official 'plain' scheme. I'll 
raise a JIRA for that.

> 4. Run the tests with this command line:
> 
> ./run-tests -b guest/guest@localhost:5672 -s ./amqp.0-9.xml -v > errors.log
> 2>&1

One thing to check is that this spec is identical to the one with which 
openamq was built (for 0-9 I'm not aware of any alterations made to the 
version checked into qpid).

> When I run the tests, there are a few that return OK, the rest return ERROR
> or FAIL:

If you could send the detailed output I can suggest what might be going 
wrong. One thing to point out is that openamq may not support all these 
features. Another possibility is that the tests are overly restrictive 
and fail on an implementation other than qpid even though it is amqp 
compliant - we want to get those sorts of tests either fixed or clearly 
annotated and isolated. Finally there could of course be some bugs in 
the qpid python client.

> I'll probably swim through the debug output and fix those functions that I
> need.
> 
> What are your thoughts?

If you send the full set of errors then we may be able to figure out 
what the root causes are. We really do want to start getting the details 
of interop with other impls thrashed out but no-one has yet had the 
bandwidth to do that. Thanks very much for joining the list and helping 
us out in making a start on this!

If you like you can restrict the tests that are run to only those you 
care about by creating an exclusion file for the others (see the 
cpp_failing file for an example).

Re: openamq

Posted by Carl Trieloff <cc...@redhat.com>.
As some tests pass - we can assume it is connecting correctly, and they 
all pass for qpid
and all the ones that rabbit has implementation also pass it might be 
worth asking the
openamq guys.

A secondary test can be to get M2 qpid C++ or Java broker and make sure 
they pass for you
on that to rule out any finger trouble.

Carl.



jazzcat2 wrote:
> Gordon,
>
> So far I've done the following exercise:
>
> 1. Built and installed OpenAMQ 1.2c4; it's running OK.
> 2. Downloaded Python QPid M2.
> 3. Modified the testlib.py file so that login information is represented as
> _'\0' + user + '\0' + password_ instead of {"LOGIN": user, "PASSWORD":
> password}
> 4. Run the tests with this command line:
>
> ./run-tests -b guest/guest@localhost:5672 -s ./amqp.0-9.xml -v > errors.log
> 2>&1
>
> When I run the tests, there are a few that return OK, the rest return ERROR
> or FAIL:
>
> test_example (tests.example.ExampleTest) ... ok
> test_ack (tests.basic.BasicTests) ... ERROR
> test_cancel (tests.basic.BasicTests) ... ERROR
> test_consume_exclusive (tests.basic.BasicTests) ... ERROR
> test_consume_no_local (tests.basic.BasicTests) ... ok
> test_consume_queue_errors (tests.basic.BasicTests) ... ERROR
> test_consume_unique_consumers (tests.basic.BasicTests) ... ERROR
> test_get (tests.basic.BasicTests) ... FAIL
> test_qos_prefetch_count (tests.basic.BasicTests) ... ERROR
> test_qos_prefetch_size (tests.basic.BasicTests) ... ERROR
> test_recover_requeue (tests.basic.BasicTests) ... ERROR
> test_auto_rollback (tests.tx.TxTests) ... ERROR
> test_commit (tests.tx.TxTests) ... ERROR
> test_commit_overlapping_acks (tests.tx.TxTests) ... ERROR
> test_rollback (tests.tx.TxTests) ... ERROR
> testAssertEmptyFail (tests.testlib.TestBaseTest) ... ok
> testAssertEmptyPass (tests.testlib.TestBaseTest) ... ERROR
> testMessageProperties (tests.testlib.TestBaseTest) ... ok
> test (tests.exchange.DeclareMethodPassiveFieldNotFoundRuleTests) ... ERROR
> testDefaultExchange (tests.exchange.DefaultExchangeRuleTests) ... ERROR
> ERROR
> testMatchAll (tests.exchange.HeadersExchangeTests) ... ERROR
> ERROR
> testMatchAny (tests.exchange.HeadersExchangeTests) ... ERROR
> ERROR
> testDifferentDeclaredType (tests.exchange.MiscellaneousErrorsTests) ... ok
> testTypeNotKnown (tests.exchange.MiscellaneousErrorsTests) ... ok
> testDirect (tests.exchange.RecommendedTypesRuleTests) ... ERROR
> testFanout (tests.exchange.RecommendedTypesRuleTests) ... ok
> testHeaders (tests.exchange.RecommendedTypesRuleTests) ... ERROR
> testTopic (tests.exchange.RecommendedTypesRuleTests) ... ERROR
> testAmqDirect (tests.exchange.RequiredInstancesRuleTests) ... ok
> testAmqFanOut (tests.exchange.RequiredInstancesRuleTests) ... ok
> testAmqMatch (tests.exchange.RequiredInstancesRuleTests) ... ERROR
> ERROR
> testAmqTopic (tests.exchange.RequiredInstancesRuleTests) ... ERROR
> test_amqp_basic_13 (tests.broker.BrokerTests) ... ok
> test_basic_delivery_immediate (tests.broker.BrokerTests) ... ok
> test_basic_delivery_queued (tests.broker.BrokerTests) ... ok
> test_channel_flow (tests.broker.BrokerTests) ... ok
> test_closed_channel (tests.broker.BrokerTests) ... ERROR
> test_invalid_channel (tests.broker.BrokerTests) ... ok
> test_bind (tests.queue.QueueTests) ... ERROR
> test_declare_exclusive (tests.queue.QueueTests) ... FAIL
> test_declare_passive (tests.queue.QueueTests) ... ok
> test_delete_ifempty (tests.queue.QueueTests) ... FAIL
> test_delete_ifunused (tests.queue.QueueTests) ... ERROR
> test_delete_simple (tests.queue.QueueTests) ... FAIL
> test_purge (tests.queue.QueueTests) ... FAIL
>
> I'll probably swim through the debug output and fix those functions that I
> need.
>
> What are your thoughts?
>
> Thanks,
> -J
>   


Re: openamq

Posted by jazzcat2 <jo...@globalherald.net>.

Gordon,

So far I've done the following exercise:

1. Built and installed OpenAMQ 1.2c4; it's running OK.
2. Downloaded Python QPid M2.
3. Modified the testlib.py file so that login information is represented as
_'\0' + user + '\0' + password_ instead of {"LOGIN": user, "PASSWORD":
password}
4. Run the tests with this command line:

./run-tests -b guest/guest@localhost:5672 -s ./amqp.0-9.xml -v > errors.log
2>&1

When I run the tests, there are a few that return OK, the rest return ERROR
or FAIL:

test_example (tests.example.ExampleTest) ... ok
test_ack (tests.basic.BasicTests) ... ERROR
test_cancel (tests.basic.BasicTests) ... ERROR
test_consume_exclusive (tests.basic.BasicTests) ... ERROR
test_consume_no_local (tests.basic.BasicTests) ... ok
test_consume_queue_errors (tests.basic.BasicTests) ... ERROR
test_consume_unique_consumers (tests.basic.BasicTests) ... ERROR
test_get (tests.basic.BasicTests) ... FAIL
test_qos_prefetch_count (tests.basic.BasicTests) ... ERROR
test_qos_prefetch_size (tests.basic.BasicTests) ... ERROR
test_recover_requeue (tests.basic.BasicTests) ... ERROR
test_auto_rollback (tests.tx.TxTests) ... ERROR
test_commit (tests.tx.TxTests) ... ERROR
test_commit_overlapping_acks (tests.tx.TxTests) ... ERROR
test_rollback (tests.tx.TxTests) ... ERROR
testAssertEmptyFail (tests.testlib.TestBaseTest) ... ok
testAssertEmptyPass (tests.testlib.TestBaseTest) ... ERROR
testMessageProperties (tests.testlib.TestBaseTest) ... ok
test (tests.exchange.DeclareMethodPassiveFieldNotFoundRuleTests) ... ERROR
testDefaultExchange (tests.exchange.DefaultExchangeRuleTests) ... ERROR
ERROR
testMatchAll (tests.exchange.HeadersExchangeTests) ... ERROR
ERROR
testMatchAny (tests.exchange.HeadersExchangeTests) ... ERROR
ERROR
testDifferentDeclaredType (tests.exchange.MiscellaneousErrorsTests) ... ok
testTypeNotKnown (tests.exchange.MiscellaneousErrorsTests) ... ok
testDirect (tests.exchange.RecommendedTypesRuleTests) ... ERROR
testFanout (tests.exchange.RecommendedTypesRuleTests) ... ok
testHeaders (tests.exchange.RecommendedTypesRuleTests) ... ERROR
testTopic (tests.exchange.RecommendedTypesRuleTests) ... ERROR
testAmqDirect (tests.exchange.RequiredInstancesRuleTests) ... ok
testAmqFanOut (tests.exchange.RequiredInstancesRuleTests) ... ok
testAmqMatch (tests.exchange.RequiredInstancesRuleTests) ... ERROR
ERROR
testAmqTopic (tests.exchange.RequiredInstancesRuleTests) ... ERROR
test_amqp_basic_13 (tests.broker.BrokerTests) ... ok
test_basic_delivery_immediate (tests.broker.BrokerTests) ... ok
test_basic_delivery_queued (tests.broker.BrokerTests) ... ok
test_channel_flow (tests.broker.BrokerTests) ... ok
test_closed_channel (tests.broker.BrokerTests) ... ERROR
test_invalid_channel (tests.broker.BrokerTests) ... ok
test_bind (tests.queue.QueueTests) ... ERROR
test_declare_exclusive (tests.queue.QueueTests) ... FAIL
test_declare_passive (tests.queue.QueueTests) ... ok
test_delete_ifempty (tests.queue.QueueTests) ... FAIL
test_delete_ifunused (tests.queue.QueueTests) ... ERROR
test_delete_simple (tests.queue.QueueTests) ... FAIL
test_purge (tests.queue.QueueTests) ... FAIL

I'll probably swim through the debug output and fix those functions that I
need.

What are your thoughts?

Thanks,
-J
-- 
View this message in context: http://www.nabble.com/openamq-tp13856276p15070938.html
Sent from the Qpid Developers mailing list archive at Nabble.com.


Re: openamq

Posted by Gordon Sim <gs...@redhat.com>.
jazzcat2 wrote:
> 
> Hello,
> 
>> Attached is a patch if it is of any use to you. This should let you run 
>> against the openamq broker.
> 
> Has anybody tried to use this patch, and if so, against which version of
> Python QPid?  When I try to use against M2 it doesn't work - the patch
> process fails.
> 
> Thanks,
> -J


That patch was created against trunk. It may not apply cleanly any more.

If you are using M2 I don't believe you need a patch. You should be able 
to just point the client at the spec version openamq was built to. Does 
that not work? What are the errors/symptoms you see if not?