Bug 1116746 - amqp1.0 authentication hang with jbossamq
Summary: amqp1.0 authentication hang with jbossamq
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
Target Milestone: 3.1
: ---
Assignee: Gordon Sim
QA Contact: Petra Svobodová
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-07 08:37 UTC by Valiantsina Hubeika
Modified: 2015-04-14 13:48 UTC (History)
4 users (show)

Fixed In Version: qpid-cpp-0.30-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-04-14 13:48:15 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Apache JIRA QPID-5882 None None None Never
Apache JIRA QPID-5883 None None None Never
Red Hat Product Errata RHEA-2015:0805 normal SHIPPED_LIVE Red Hat Enterprise MRG Messaging 3.1 Release 2015-04-14 17:45:54 UTC

Description Valiantsina Hubeika 2014-07-07 08:37:09 UTC
Description of problem:

When trying to connection to JBoss AMQ with qpid-cpp client prividing no username and password, client hangs

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

./qc2_spout --connection-options '{ "protocol" : "amqp1.0", "sasl_mechanisms" : "PLAIN"}' newQ

Actual results:
2014-07-07 04:32:08 [System] error Caught exception in state: 3 with event: 1: internal-error: Sasl error: SASL(-4): no mechanism available: No worthy mechs found (/builddir/build/BUILD/qpid-0.22/cpp/src/qpid/SaslFactory.cpp:311)

Expected results:
Something like 
"Connection closed by peer with amqp:unauthorized-access: User name [null] or password is invalid."

Additional info:
When providing incorrect username or password, client behaves as expected:

./qc2_spout --connection-options '{ "protocol" : "amqp1.0", "sasl_mechanisms" : "PLAIN", "username" : "admin","password":"adminn" }' newQ
Connection closed by peer with amqp:unauthorized-access: User name [admin] or password is invalid.

Comment 1 Gordon Sim 2014-07-07 19:56:33 UTC
The hang should be fixed upstream by https://svn.apache.org/r1608578. This also removes the 'Caught exception in state: 3 with event: 1' part of the error message.

This is not actually a condition caused by the server, its is the client itself, through the cyrus sasl library it uses, determining that it is unable to support the requested mechanism (in this case due to missing authentication details).

So while I accept the text even after the fix above is not ideal, I think its at least better than it was and along with not hanging warrants considering it a solution to this issue. A separate, lower priority issue could be raised to try and imrpove the error message further (which would apply to any broker).

Comment 2 Gordon Sim 2014-07-08 10:41:57 UTC
Ignore previous comment regarding separate issue for better error message. I have made a small but I think reasonable change there as well: https://svn.apache.org/r1608711.

Comment 7 Petra Svobodová 2015-01-22 13:42:33 UTC
The error message was modified to a more clear text "Can't authenticate using PLAIN".

Verified on qpid-cpp-0.30-5 client with qpid-cpp-0.30-5 qpid and jboss-a-mq-6.1.1.redhat-412 brokers on machines Rhel6.6-i686 and x86_64.


Comment 9 errata-xmlrpc 2015-04-14 13:48:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.