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.
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).
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.
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
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