Bug 446955 - Running "qpidd -c" gives the wrong answer for qpidd run from service
Summary: Running "qpidd -c" gives the wrong answer for qpidd run from service
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: beta
Hardware: All
OS: Linux
urgent
medium
Target Milestone: ---
: ---
Assignee: Ted Ross
QA Contact: Kim van der Riet
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-16 18:53 UTC by Andrew Stitcher
Modified: 2009-05-07 20:09 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-02 16:06:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrew Stitcher 2008-05-16 18:53:37 UTC
Description of problem:

If you start qpidd as a service using "sudo /sbin/service qpidd start" then
running "sudo /usr/sbin/qpidd -c" gives the output:
Exception: Cannot open /var/run/qpidd.5672.pid: No such file or directory
to stderr. Even though qpidd is actually running according to ps

"sudo /sbin/service qpidd status" gives the correct result though.

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

qpidd-0.2.656926-1.el5

How reproducible:

Repeatable

Comment 1 Ted Ross 2008-05-19 20:47:45 UTC
The reason this happens is that qpidd uses /var/run if running as root and /tmp
if not running as root.  When the service is started, the daemon is started
under user "qpidd", thus the pid is stored in /tmp/qpidd.5672.pid.  Then "qpidd
-c" is run directly under sudo, it is root and looks in /var/run/qpidd.5672.pid
and fails.


Comment 2 Carl Trieloff 2008-05-21 13:48:53 UTC
turn this off by default / rip it out.

Comment 3 Carl Trieloff 2008-05-21 13:50:51 UTC

Add a option that specifies that we want a pid file and where to write it.

Comment 4 Jeff Needle 2008-05-22 19:25:34 UTC
Since this is called from the rhmd init script, this keeps the service from
starting:

[root@dhcp-10-16-61-243 ~]# service rhmd start
Starting RHM daemon:                                       [  OK  ]
Exception: Cannot open /tmp/qpidd.5672.pid: No such file or directory

[root@dhcp-10-16-61-243 ~]# service rhmd status
rhmd is stopped

bumping priority

Comment 5 Jeff Needle 2008-05-22 19:26:37 UTC
Oh, the above was on RHEL4, by the way.  Fresh install, packages added from BT4
RHEL4 repository on webqa.

Comment 6 Mike Bonnet 2008-06-20 03:51:39 UTC
qpidc-0.2.667603-1.el5, qpidc-perftest-0.2.667603-1.el5, qpidd-0.2.667603-1.el5, and rhm-0.2.2153-1.el5 have been pushed to the staging repo for testing


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