Bug 1109873 - "qpid-stat -c does not show clients names connected from Windows
Summary: "qpid-stat -c does not show clients names connected from Windows
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-tools
Version: Development
Hardware: Unspecified
OS: All
medium
medium
Target Milestone: 3.1
: ---
Assignee: Irina Boverman
QA Contact: Petra Svobodová
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-16 14:21 UTC by Petra Svobodová
Modified: 2015-04-14 13:48 UTC (History)
2 users (show)

Fixed In Version: qpid-tools-0.30-3.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1113194 (view as bug list)
Environment:
Last Closed: 2015-04-14 13:48:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to replace empty fields with "unknown". (1.38 KB, patch)
2014-06-25 14:51 UTC, Irina Boverman
no flags Details | Diff
Revised patch for qpid-stat to replace empty fields with "unknown" (1.49 KB, text/plain)
2014-09-10 18:33 UTC, Irina Boverman
no flags Details
Revised patch for qpid-stat to replace empty fields with "-" (1.47 KB, patch)
2014-09-19 15:13 UTC, Irina Boverman
no flags Details | Diff


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

Description Petra Svobodová 2014-06-16 14:21:20 UTC
Description of problem:
"qpid-stat" tool with "-c" option does not show a name of connected client from Windows machine. 

Try to compare, please:
When the drain client is connected to the broker from a Linux machine, the name of the client is displayed correctly:

# qpid-stat -c
Connections
  connection                                 cproc      cpid   mech  auth       connected  idle  msgIn  msgOut
  ==============================================================================================================
  qpid.10.34.33.251:5672-10.34.33.199:57589  drain      3735         anonymous  2s         0s       0      0
  qpid.[::1]:5672-[::1]:60305                qpid-stat  11814        anonymous  0s         0s       1      0

-------------------------------------------------------------------------------

However if the drain client is connected from a Windows machine,the "cproc" column is empty:

# qpid-stat -c
Connections
  connection                                cproc      cpid   mech  auth       connected  idle  msgIn  msgOut
  =============================================================================================================
  qpid.10.34.33.251:5672-10.34.74.82:57245             1456                    1s         0s       0      0
  qpid.[::1]:5672-[::1]:60306               qpid-stat  11843        anonymous  0s         0s       1      0



Version-Release number of selected component (if applicable):
qpid-tools-0.22-13.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Unpack and compile qpid-cpp-win packages
2. Start a broker
3. Connect "drain" client from the Windows machine to the broker with a large timeout:
   drain.exe --broker <hostname>:5672 --timeout 120 amq.topic
4. Run "qpid-stat -c" while the "drain" is connected

Actual results:
Connection opened by the drain client is displayed without a name of the process.

Expected results:
Connection opened by the drain client should be displayed with the name of the process.

Comment 1 Irina Boverman 2014-06-25 14:51:24 UTC
Created attachment 912136 [details]
Patch to replace empty fields with "unknown".

Comment 2 Irina Boverman 2014-06-25 15:21:13 UTC
How to test changes:

(1) Change broker config file to this:
auth=no

(2) Start broker on localhost
service qpidd start

(3) Use spout to send messages (RHEL):
spout -b localhost test0

(4) Use drain (Windows and RHEL):

(a) RHEL:
drain -b localhost --timeout 120 amq.topic

(b) Windows:
$ alias rdp='rdesktop  -u mrg -g 1024x800 mrg-win-1.ml3.eng.bos.redhat.com'
$ rdp

User mrg (usual team root password), and a screen geometry that works for you if 1600x1024 doesn't fit.

Open up a dos box command prompt. Drain is located at
D:\Users\mrg\winsdk\qpid-cpp-x86-VS2010-3.22.41.1\bin\Debug

Details (per Chuck's instructions):

C:\>
C:\>d:
D:\>cd Users\mrg\winsdk\qpid-cpp-x86-VS2010-3.22.41.1\bin\debug
D:\Users\mrg\winsdk\qpid-cpp-x86-VS2010-3.22.41.1\bin\Debug>drain -b <broker> --timeout 120 amq.topic

(5) 
# qpid-stat -c

Result after changes:

Connections
  connection                                  cproc      cpid   mech     auth       connected  idle   msgIn  msgOut
  ===================================================================================================================
  qpid.10.16.44.229:5672-10.19.176.108:60550  unknown    2320   unknown  unknown    1m 2s      1m 1s     0      0
  qpid.[::1]:5672-[::1]:37979                 drain      27240  unknown  anonymous  16s        13s       0      0
  qpid.[::1]:5672-[::1]:37981                 qpid-stat  27253  unknown  anonymous  0s         0s        1      0


There are also bugs in Windows client not passing "cproc" and "auth" fields to the broker, and in both Windows/Linux code not passing "mech" field to the broker.

Comment 6 Justin Ross 2014-07-22 18:20:43 UTC
I think you'll find that this patch produces syntax errors on older versions of python.  The inline if-else is a new feature since python 2.5.  I recommend using an approach that will work on rhel 5's python.

Comment 7 Justin Ross 2014-08-19 13:49:18 UTC
(In reply to Justin Ross from comment #6)
> I think you'll find that this patch produces syntax errors on older versions
> of python.  The inline if-else is a new feature since python 2.5.  I
> recommend using an approach that will work on rhel 5's python.

Comment 8 Irina Boverman 2014-09-10 18:33:16 UTC
Created attachment 936281 [details]
Revised patch for qpid-stat to replace empty fields with "unknown"

Comment 12 Irina Boverman 2014-09-19 15:13:39 UTC
Created attachment 939372 [details]
Revised patch for qpid-stat to replace empty fields with "-"

Comment 13 Justin Ross 2014-09-23 13:28:52 UTC
https://svn.apache.org/r1627015

Comment 15 Petra Svobodová 2015-02-06 15:53:26 UTC
I am very sorry, but I still can see no information about connected client from Windows. 
Now the output looks like:
# qpid-stat -c
Connections
  connection                                cproc      cpid   mech       auth       connected  idle  msgIn  msgOut
  ==================================================================================================================
  qpid.10.34.75.189:5672-10.34.74.67:60566  -          2520   PLAIN      -          4s         2s       0      0
  qpid.[::1]:5672-[::1]:32773               qpid-stat  32604  ANONYMOUS  anonymous  0s         0s       1      0

"cproc" column still contains no client name.

--> ASSIGNED

Comment 18 Petra Svobodová 2015-02-10 08:17:30 UTC
The qpid-stat tool is able to show all connections parameters. If the name of a connected client is unknown, a dash is displayed.

Verified on Rhel 6.6 i686 and x86_64 and Windows 7-x64, Windows 8-x64, Windows Server 2008-x64 and R2 and Windows Server 2012-x64 with packages qpid-cpp-0.30.6.el6 and qpid-cpp-win-3.30.6.1-1.

--> VERIFIED

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