Dear list, I have questions about content of the following error messages. ---</var/log/secure>--- dovecot-auth:?PAM?unable?todlopen(/lib/security/pam_nologin.so) dovecot-auth:?PAM?[error:/lib/security/pam_nologin.so:?cannot?open?shared?object?file:?Too?many?open?files] dovecot-auth:?PAM?adding?faulty?module:/lib/security/pam_nologin.so dovecot-auth:?PAM?_pam_load_conf_file:?unable?to?open?/etc/pam.d/system-auth dovecot-auth:?PAM?unable?to?dlopen(<*unknown?module?path*>) dovecot-auth:?PAM?[error:?*unknown?module?path*>:?cannot?open?shared?object?file:?Too?many?open?files] dovecot-auth:?PAM?adding?faulty?module:?<*unknown?module?path*> dovecot-auth:?PAM?_pam_load_conf_file:?unable?to?open?/etc/pam.d/system-auth dovecot-auth:?PAM?_pam_load_conf_file:?unable?to?open?/etc/pam.d/system-auth dovecot-auth:?PAM?unable?to?dlopen(/lib/security/pam_deny.so) dovecot-auth:?PAM?[error:/lib/security/pam_deny.so:?cannot?open?shared?object?file:?Too?many?open?files] dovecot-auth:?PAM?adding?faulty?module:/lib/security/pam_deny.so ---</var/log/maillog>--- dovecot: auth(default): pam(xxx at xxx.com,127.0.0.1): pipe() failed: Too many open files dovecot: auth(default): pam(xxx at xxx.com,127.0.0.1): pipe() failed: Too many open files It seems that this is due to that there are files existed to open beyond its limitation. Other information that could be relevant are as follows. # ulimit -n 1024 # cat /proc/`cat /var/run/dovecot/master.pid`/limits cat: /proc/7273/limits: No such file or directory # lsof -p `cat /var/run/dovecot/master.pid` | wc -l 29 # ls /proc/`pidof dovecot-auth`/fd | wc -l 1024>From the above result, dovecot-auth proccess opened 10243files, and that seems to be the limit. So I expect that adding following lines into /etc/init.d/dovecot could be fix this issue. # vi /etc/init.d/dovecot --- . /etc/init.d/functions ulimit -n 4098 <-add test -x /usr/sbin/dovecot || exit 0 <-add if [ -f /etc/sysconfig/dovecot ]; then . /etc/sysconfig/dovecot fi --- Is my understanding right? Even if so, how could I verify what files are opened by dovecot-auth? I would very much appreciate it if someone in this list could provide comments/suggestions. Sincerely,
On 26.3.2010, at 8.27, Masaharu Kawada wrote:> dovecot: auth(default): pam(xxx at xxx.com,127.0.0.1): pipe() failed: Too many open files..>> From the above result, dovecot-auth proccess opened 10243 > files, and that seems to be the limit. So I expect that > adding following lines into /etc/init.d/dovecot could be > fix this issue...> ulimit -n 4098 <-addHow many dovecot-auth processes were there running? Unless there were 1024 dovecot-auth processes, it sounds more like a file descriptor leak and adding more fds will only delay the error. Anyway, the problem is only with v1.0 and I've already rewritten the PAM code, so it's fixed in newer versions at least. Too much trouble trying to debug v1.0 bugs anymore..