Bug 432135

Summary: Need better error reporting when stats file can't be accessed
Product: [Retired] 389 Reporter: Nathan Kinder <nkinder>
Component: Directory ServerAssignee: Nathan Kinder <nkinder>
Status: CLOSED CURRENTRELEASE QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: high    
Version: 1.1.0CC: benl, jgalipea, nhosoi, rmeggins
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 8.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-29 23:02:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 249650, 493682    
Description Flags
CVS Diffs
Revised Diffs none

Description Nathan Kinder 2008-02-09 00:31:32 UTC
I missed cleaning up an old DS install completely on my system, which caused
some problems with a new install that were hard to track down.  My old install
was configured to run as "nobody", and I forgot to remove the /var/run/dirsrv
directory when I cleaned everything up.

I installed DS again, but this time told it to run as a special "dirsrv" user. 
When the server first attempts to start doing setup, it just exits.  All the
errors log shows is the "starting up" message.

I then tried to start the server from the debugger, and I see this output in my
gdb window:

 Failed to open stats file (/var/run/dirsrv/slapd-test.stats) (error 1).

This message is output to the terminal that you are trying to start DS from, but
I was unable to see it from the installer.  Since we can log to the errors log
at this point, it would be nice to output this message there as well.

Comment 1 Rich Megginson 2008-02-28 04:15:20 UTC
Or we should just fix https://bugzilla.redhat.com/show_bug.cgi?id=428946

Comment 4 Nathan Kinder 2008-12-12 21:14:29 UTC
Created attachment 326777 [details]
CVS Diffs

Log message to errors log instead of to terminal.

Comment 5 Rich Megginson 2008-12-12 21:22:50 UTC
Please add the string error message using slapd_system_strerror(err)

Comment 6 Nathan Kinder 2008-12-12 21:38:26 UTC
Created attachment 326783 [details]
Revised Diffs

Added text description of system error.

Comment 7 Nathan Kinder 2008-12-12 23:41:05 UTC
Checked into ldapserver (HEAD).  Thanks to Rich and Noriko for their reviews!

Checking in ldap/servers/slapd/snmp_collator.c;
/cvs/dirsec/ldapserver/ldap/servers/slapd/snmp_collator.c,v  <--  snmp_collator.c
new revision: 1.19; previous revision: 1.18

Comment 8 Jenny Severance 2009-03-17 14:08:13 UTC
Fix verified RHEL 5 DS 8.1

[17/Mar/2009:10:06:08 -0400] - Red Hat-Directory/8.1.0 B2009.076.813 starting up
[17/Mar/2009:10:06:08 -0400] - Failed to delete old semaphore for stats file (/var/run/dirsrv/slapd-jennyv1.stats). Error 13 (Permission denied).

Comment 9 Chandrasekar Kannan 2009-04-29 23:02:31 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.