Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1116746

Summary: amqp1.0 authentication hang with jbossamq
Product: Red Hat Enterprise MRG Reporter: Valiantsina Hubeika <vhubeika>
Component: qpid-cppAssignee: Gordon Sim <gsim>
Status: CLOSED ERRATA QA Contact: Petra Svobodová <psvobodo>
Severity: unspecified Docs Contact:
Priority: medium    
Version: DevelopmentCC: esammons, gsim, jross, psvobodo
Target Milestone: 3.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.30-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-14 13:48:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
qpid-cpp-0.22-42


How reproducible:
100%


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.

--> VERIFIED

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.

https://rhn.redhat.com/errata/RHEA-2015-0805.html