Bug 1115969 - qpid c++ AMQP1.0 client weird authentication failed message error Caught exception in state: 3 with event: 1: Failed to authenticate
Summary: qpid c++ AMQP1.0 client weird authentication failed message error Caught exce...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 3.1
: ---
Assignee: Gordon Sim
QA Contact: Eric Sammons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-03 12:23 UTC by Frantisek Reznicek
Modified: 2015-04-14 13:48 UTC (History)
5 users (show)

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


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Apache JIRA QPID-5882 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 Frantisek Reznicek 2014-07-03 12:23:05 UTC
Description of problem:

qpid c++ AMQP1.0 client weird authentication failed message error Caught exception in state: 3 with event: 1: Failed to authenticate

qpid c++ client when using AMQP 1.0 trasport do not raise connection-forced exception as in AMQP 0-10 case, but different message ([System] error Caught exception in state: 3 with event: 1: Failed to authenticate):


[root@dhcp-27-117 ~]# /var/dtests/node_data/clients/qc2_spout  --log-msgs dict --broker 10.34.27.117:5672 --connection-options "{  username : 'client', sasl_mechanisms : 'PLAIN', password : 'xx' }" --count 1  "amq.topic;{}"
2014-07-03 14:09:35 [Client] warning Broker closed connection: 320, connection-forced: Authentication failed
connection-forced: Authentication failed
[root@dhcp-27-117 ~]# echo $?
1
[root@dhcp-27-117 ~]# /var/dtests/node_data/clients/qc2_spout  --log-msgs dict --broker 10.34.27.117:5672 --connection-options "{  username : 'client', sasl_mechanisms : 'PLAIN', password : 'xx', protocol : 'amqp1.0' }" --count 1  "amq.topic;{}"
2014-07-03 14:09:47 [System] error Caught exception in state: 3 with event: 1: Failed to authenticate
Failed to authenticate
[root@dhcp-27-117 ~]# echo $?
1


C++ client is logging inappropriate message:
 * log message should have category of [client]
 * log message should be compatible with AMQP 0-10 one connection-forced 320
 * current wording 'Caught exception in state: 3 with event: 1' is awkward


Version-Release number of selected component (if applicable):
# rpm -q qpid-cpp-client
qpid-cpp-client-0.22-42.el6.i686


How reproducible:
100%

Steps to Reproduce:
1. see above, any c++ client (for instance spout) with above parameters
2. stdout/err


Actual results:
  Inappropriate client log message when authentication fails when AMQP 1.0 used

Expected results:
  Better client log message, preferably connection-forced 320

Additional info:

Comment 1 Gordon Sim 2014-07-07 19:45:17 UTC
Fixed upstream by: https://svn.apache.org/r1608578

Comment 2 Gordon Sim 2014-07-07 19:47:59 UTC
Note, on AMQP 1.0 an AuthenticationFailure is thrown. This is a subclass of the  ConnectionError used for 0-10 as on 0-10 there was no explicit mechanism in the protocol to indicate an authentication failure, and we had to resort to using connection-forced. I haven't added connection-forced to the text of the error on 0-10 as it is really a workaround from this broken aspect of 0-10.

Comment 6 Valiantsina Hubeika 2014-10-20 20:56:27 UTC
Tested on 
qpid-cpp-client-0.30-2.el6.x86_64

Currently amqp1.0 client returns following error:

#/var/dtests/node_data/clients/qc2_spout  --log-msgs dict  --connection-options "{  username : 'client', sasl_mechanisms : 'PLAIN', password : 'xx', protocol:amqp1.0 }" --count 1  "amq.topic;{}" -b 10.34.75.173:5672
Authentication failed

Comment 9 errata-xmlrpc 2015-04-14 13:48:13 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


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