
感謝您花時間檢查我的問題。
我目前正在解決一個以前只出現過一次的問題。 1 月 3 日,當這個問題首次出現時,我們能夠重新啟動伺服器,一切看起來都很好,但現在它又回來了。這是一個生產資料庫系統,因此找到一個重新啟動的視窗有時可能很困難。我希望在幾天后再次重新啟動以提供針對該問題的另一個臨時修復之前,能夠牢牢掌握這次可能實際發生的情況。開始了...
相關係統的使用者驗證是透過 Red Hat Directory Server 9 使用 LDAP 進行處理的。截至目前,沒有 LDAP 帳戶能夠驗證並登入伺服器。 LDAP 驗證由 SSSD 處理,目前無法停止或重新啟動。當嘗試執行任一操作時,SSH 控制台將變成無響應。 (ctrl-c無法退出發出的命令)
PS 顯示通常的 sssd 相關進程正在運行,但嘗試kill -9
它們似乎並沒有成功停止其中任何一個。
ps aux | grep sss | grep -v grep
root 1150 0.0 0.0 150828 2908 ? D 09:05 0:00 /usr/libexec/sssd/sssd_nss -d 0 --debug-to-files
root 7025 0.0 0.0 93616 2504 pts/2 D 16:18 0:00 /usr/sbin/sssd -f -D
root 11148 0.0 0.0 179436 5672 ? D Jan08 16:22 /usr/libexec/sssd/sssd_be -d 0 --debug-to-files --domain default
root 32700 0.0 0.0 150784 2908 ? D 10:10 0:00 /usr/libexec/sssd/sssd_pam -d 0 --debug-to-files
使用strace getent -s sss passwd
我可以看到一些連接嘗試被拒絕,但我不太確定該如何處理它們。
connect(3, {sa_family=AF_FILE, path="/var/lib/sss/pipes/nss"...}, 110) = -1 ECONNREFUSED (Connection refused)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_FILE, path="/var/lib/sss/pipes/nss"...}, 110) = -1 ECONNREFUSED (Connection refused)
close(3) = 0
socket(PF_FILE, SOCK_STREAM, 0) = 3
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
connect(3, {sa_family=AF_FILE, path="/var/lib/sss/pipes/nss"...}, 110) = -1 ECONNREFUSED (Connection refused)
檢查lsof | head -n1; lsof | grep /var/lib/sss/pipes/
顯示,好系統和壞系統之間的開放管道要少得多。這些管道的 PID 與 報告的相同ps aux
,因此對它們的嘗試kill -9
也沒有結果。
固態硬碟壞了
lsof | head -n1; lsof | grep /var/lib/sss/pipes/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sssd_be 11148 root 15u unix 0xffff8806635911c0 0t0 31817638 /var/lib/sss/pipes/private/sbus-dp_default.11148
sssd_be 11148 root 16u unix 0xffff880d443d6180 0t0 31783555 /var/lib/sss/pipes/private/sbus-dp_default.11148
sssd_be 11148 root 17u unix 0xffff880c536d94c0 0t0 31783560 /var/lib/sss/pipes/private/sbus-dp_default.11148
好的固態硬碟
lsof | head -n1; lsof | grep /var/lib/sss/pipes/
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sssd 26793 root 13u unix 0xffff88030b5d8c40 0t0 3248762734 /var/lib/sss/pipes/private/sbus-monitor
sssd 26793 root 14u unix 0xffff8808cc064bc0 0t0 3248762735 /var/lib/sss/pipes/private/sbus-monitor
sssd 26793 root 15u unix 0xffff880a9d9bc840 0t0 3248768164 /var/lib/sss/pipes/private/sbus-monitor
sssd 26793 root 16u unix 0xffff880040a32f00 0t0 3248768165 /var/lib/sss/pipes/private/sbus-monitor
sssd_be 26794 root 15u unix 0xffff8808cc064200 0t0 3248767368 /var/lib/sss/pipes/private/sbus-dp_default.26794
sssd_be 26794 root 16u unix 0xffff880a9d9bd880 0t0 3248763661 /var/lib/sss/pipes/private/sbus-dp_default.26794
sssd_be 26794 root 17u unix 0xffff8809841b4480 0t0 3248763662 /var/lib/sss/pipes/private/sbus-dp_default.26794
sssd_nss 26795 root 16u unix 0xffff880a9d9bd200 0t0 3248751954 /var/lib/sss/pipes/nss
sssd_pam 26796 root 16u unix 0xffff880859e26180 0t0 3248774325 /var/lib/sss/pipes/pam
sssd_pam 26796 root 17u unix 0xffff880859e27b80 0t0 3248774326 /var/lib/sss/pipes/private/pam
此外,/var/log/secure 包含多個條目
sshd[9177]: pam_succeed_if(sshd:auth): error retrieving information about user
su: pam_sss(su-l:session): Request to sssd failed. Connection refuse
crond[29568]: pam_sss(crond:session): Request to sssd failed. Connection refused
此外,我注意到的第一件事是 /var/log/messages 檔案不包含任何資料。它和 /var/log/sssd/ 日誌似乎都在今天早上 9:03 左右停止收集,/var/log/secure 繼續累積數據,沒有出現問題。重新啟動 syslog 修復了訊息問題,但 sssd 日誌仍然無法正常運作。
我最後注意到 dmesg 充滿了諸如audit: backlog limit exceeded
audit: audit_backlog=322 > audit_backlog_limit=320
和 之類的消息audit_log_start: 122 callbacks suppressed
。我認為這些是系統日誌無法正常工作時產生的,但尚未驗證這一點。
我仍在對此進行研究,希望能找到一些東西,但非常歡迎人們願意提供的任何建議和回饋。
多謝!
-奧姆尼
答案1
我遇到了在同一系統上執行 pam_ldap 和 sssd 的問題。如果您想停止將 sssd 與 pam 一起使用,您應該確保運行:
pam-config -a --ldap
這會將 LDAP 新增到 pam,然後執行:
pam-config -d --sss
這將刪除 /etc/pam.d/ 中 pam 相關設定檔中的 sssd 設定
為了確保不使用 sss,您可能還需要檢查 nsswitch.conf 是否在正確的位置有 ldap(或至少沒有 sss)。這是啟用了 sss 的 /etc/nsswitch.conf:
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# compat Use compatibility setup
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# [NOTFOUND=return] Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#
passwd: compat sss
group: compat sss
hosts: files mdns_minimal [NOTFOUND=return] dns
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files
aliases: files
passwd_compat: files
group_compat: files
該檔案禁用了 sss 並啟用了 ldap:
passwd: compat ldap
group: compat ldap
hosts: files mdns_minimal [NOTFOUND=return] dns
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files
aliases: files
passwd_compat: files
group_compat: files