Linux

無法啟動審核

  • June 14, 2012

我在 CentOS 5.8 final

我最近auditd通過安裝yum install audit但是我無法啟動它。

我編輯了配置文件以給出它在啟動時收到的錯誤的詳細輸出,這是輸出:

# service auditd start
Starting auditd: Config file /etc/audit/auditd.conf opened for parsing
log_file_parser called with: /var/log/audit/audit.log
log_format_parser called with: RAW
log_group_parser called with: root
priority_boost_parser called with: 4
flush_parser called with: INCREMENTAL
freq_parser called with: 20
num_logs_parser called with: 4
qos_parser called with: lossy
dispatch_parser called with: /sbin/audispd
name_format_parser called with: NONE
max_log_size_parser called with: 5
max_log_size_action_parser called with: ROTATE
space_left_parser called with: 75
space_action_parser called with: SYSLOG
action_mail_acct_parser called with: root
admin_space_left_parser called with: 50
admin_space_left_action_parser called with: SUSPEND
disk_full_action_parser called with: SUSPEND
disk_error_action_parser called with: SUSPEND
tcp_listen_queue_parser called with: 5
tcp_max_per_addr_parser called with: 1
tcp_client_max_idle_parser called with: 0
enable_krb5_parser called with: no
GSSAPI support is not enabled, ignoring value at line 30
krb5_principal_parser called with: auditd
GSSAPI support is not enabled, ignoring value at line 31
Started dispatcher: /sbin/audispd pid: 3097
type=DAEMON_START msg=audit(1339336882.187:9205): auditd start, ver=1.8 format=raw kernel=2.6.32-042stab056.8 auid=4294967295 pid=3095 res=success
config_manager init complete
Error setting audit daemon pid (Connection refused)
type=DAEMON_ABORT msg=audit(1339336882.189:9206): auditd error halt, auid=4294967295 pid=3095 res=failed
Unable to set audit pid, exiting
The audit daemon is exiting.
Error setting audit daemon pid (Connection refused)
                                                          [FAILED]

我可以在網上找到的唯一資訊是這可能是由於 SELinux 造成的,但是 SELinux 給我帶來了它自己的問題。無論我做什麼,它似乎都被禁用(我想啟用它)。配置設置為enforced並且伺服器已多次重新啟動但sestatus仍然返回SELinux status: disabled

任何人都可以對這個問題有所了解嗎?

**編輯:**我不知道它是否相關,但我注意到以下消息出現在我的/var/log/messages

Jun 10 16:25:22 s1 iscsid: iSCSI logger with pid=2056 started!
Jun 10 16:25:22 s1 iscsid: Missing or Invalid version from /sys/module/scsi_transport_iscsi/version. Make sure a up to date scsi_transport_iscsi module is loaded and a up todate version of iscsid is running. Exiting...

我嘗試自己啟動 iSCSI 守護程序(我不知道它的作用;我是 linux 新手),我收到以下錯誤:

Starting iSCSI daemon: FATAL: Could not load /lib/modules/2.6.32-042stab056.8/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-042stab056.8/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-042stab056.8/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-042stab056.8/modules.dep: No such file or directory
FATAL: Could not load /lib/modules/2.6.32-042stab056.8/modules.dep: No such file or directory
                                                          [FAILED]

如果我去/lib/modules/我注意到目錄存在但完全是空的。

我正在使用2.6.32-042stab056.8 SMP的與 OpenVZ 一起打包的核心似乎不支持 auditd。

Error setting audit daemon pid (Connection refused)

看起來它無法寫入 pid 文件(通常在 /var/run 中)。確保守護程序有權寫入該目錄以寫入 pid 文件。

引用自:https://serverfault.com/questions/397344