Bug 446955 - Running "qpidd -c" gives the wrong answer for qpidd run from service
Running "qpidd -c" gives the wrong answer for qpidd run from service
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp (Show other bugs)
beta
All Linux
urgent Severity medium
: ---
: ---
Assigned To: Ted Ross
Kim van der Riet
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-16 14:53 EDT by Andrew Stitcher
Modified: 2009-05-07 16:09 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-02 11:06:04 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Stitcher 2008-05-16 14:53:37 EDT
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 16:47:45 EDT
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 09:48:53 EDT
turn this off by default / rip it out.
Comment 3 Carl Trieloff 2008-05-21 09:50:51 EDT

Add a option that specifies that we want a pid file and where to write it.
Comment 4 Jeff Needle 2008-05-22 15:25:34 EDT
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 15:26:37 EDT
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-19 23:51:39 EDT
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.