Skip to contentSkip to conversation

Daemon start problems

DISCUSSION Stephen Quinney 2 participants 3 messages Nov 22, 2011 – Dec 13, 2011

lore
Share & tools
lore
#0 lore raw

I'm seeing some problems with the audit daemon not starting at boot-time on a RHEL6 machine. If I login as root after the boot sequence has finished it can be manually started without any problems. At first I thought this might be a bad interaction with the readahead tool (as noted in the technical docs for RHEL6) so I removed that package entirely but the problem remains.

We have a slightly peculiar environment due to the config management tool we use so I'm fairly confident this is our problem rather than a bug in the auditd code. However, I'm struggling to debug why it is failing each time. All I get back from the daemon is an exit code of 1, this seems to mean "generic or unspecified error", and no useful error messages so I'm a bit stuck on what to do next.

Any suggestions?

Stephen Quinney

Signature · 2 lines
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
#1 lore raw
Quoted 5 lines · Stephen Quinney

However, I'm struggling to debug why it is failing each time. All I get back from the daemon is an exit code of 1, this seems to mean "generic or unspecified error", and no useful error messages so I'm a bit stuck on what to do next.

Any suggestions?

Have you looked in syslog? Generally the audit daemon writes about any problem it runs into there.

-Steve

#2 lore raw
Quoted 10 lines · Steve Grubb
Quoted 5 lines · Stephen Quinney

However, I'm struggling to debug why it is failing each time. All I get back from the daemon is an exit code of 1, this seems to mean "generic or unspecified error", and no useful error messages so I'm a bit stuck on what to do next.

Any suggestions?

Have you looked in syslog? Generally the audit daemon writes about any problem it runs into there.

I have finally tracked down what was going on here. The daemon only fails to start at boot time when the action_mail_acct configuration option is set. A look in the audit_config.c code reveals that the email address is passed through the validate_email() function which uses gethostbyname() to check the host. Although the network is up before auditd starts, at that point in the boot sequence there are no reachable DNS servers. This is due to a local configuration oddity with the resolv.conf file. Moving auditd to later in the boot sequence resolves the problem.

Stephen Quinney

Signature · 2 lines
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.