Re: sendmail and sm-client very slow to start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2005-02-01 at 22:12 -0600, Jonathan Berry wrote:
> Hi all,
> I did a quick search and didn't see anything like this mentioned yet. 
> I noticed the other day that when my machine booted, sendmail and
> sm-client took a very long time (about 3 minutes) to start.  Tests
> with a booted system show that it is not just happening on boot.  They
> just take that long to start.  I've done some investigation and found
> that sendmail is hanging with the command:
> /usr/bin/newaliases
> and then again at:
> initlog -q -c '/usr/sbin/sendmail -bd -q1h'
> I'm actually not sure where this second command comes from, as I don't
> see it explicitly in /etc/init.d/sendmail.  sm-client seems to hang at
> a similar initlog command.  I'm running /etc/init.d/sendmail with
> #!/bin/bash -x to see these commands.
> The newaliases program itself takes about 1 minute to run.  Running
> strace seems to reveal why; it hangs at the noted position in the
> strace:
> ....selection from strace....
> rt_sigaction(SIGPIPE, {0x2a96542cd0, [], 0x4000000}, {SIG_IGN}, 8) = 0
> socket(PF_FILE, SOCK_DGRAM, 0)          = 3
> fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
> connect(3, {sa_family=AF_FILE, path="/dev/log"}, 16) = 0
> sendto(3, "<18>Feb  1 21:52:25 sendmail[656"..., 101, 0, NULL, 0) = 101
> rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
> rt_sigprocmask(SIG_BLOCK, [ALRM], [], 8) = 0
> rt_sigaction(SIGALRM, {0x552ab38360, [], SA_RESTART|0x4000000},
> {SIG_DFL}, 8) = 0
> alarm(60)                               = 0
> rt_sigprocmask(SIG_UNBLOCK, [ALRM], [ALRM], 8) = 0
> rt_sigprocmask(SIG_UNBLOCK, [ALRM], [], 8) = 0
> # the program hangs right after printing "pause(" below
> pause()                                 = ? ERESTARTNOHAND (To be restarted)
> --- SIGALRM (Alarm clock) @ 0 (0) ---
> alarm(0)                                = 0
> alarm(0)                                = 0
> rt_sigreturn(0)                         = -1 EINTR (Interrupted system call)
> stat("/etc/mail/service.switch", 0x7fbfffb2f0) = -1 ENOENT (No such
> file or directory)
> ....end from strace....
> I can post the entire strace somewhere if it might be relevant.
> It sets an alarm for 60 seconds, which must eventually time out. 
> Anyone know what is going on here?
> $ rpm -qa sendmail
> sendmail-8.13.1-2.x86_64
> 
> I haven't changed any configuration files, exept for a recent alais to
> send root's mail to me.  The problems happened prior to that change
> though.  I don't know when this started, but I think it must be a
> recent development.  sendmail isn't mentioned in /var/log/yum.log, so
> maybe from a kernel upgrade?  I can try an older kernel and see if
> that speeds things up if that might be relevant.  I'm currently
> running kernel 2.6.10-1.741_FC3 x86_64.  Any ideas?  Has anyone else
> seen this?
----
usually when sendmail is sluggish starting - it's because it can't
figure out hostname details.

# cat /etc/hosts
127.0.0.1       localhost.localdomain   localhost

above needs to be the very first line of /etc/hosts

if you are accepting email for a domain then it would help if you have
the fully qualified domain name set in /etc/sysconfig/network and that
name resolves via dns or at least is listed with an ip address
in /etc/hosts...
i.e.

# hostname
linuxserver.azapple.com

# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=linuxserver.azapple.com

[root@linuxserver cyrus-imap-utils]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
192.168.0.1     linuxserver.azapple.com linuxserver

# host linuxserver.azapple.com
linuxserver.azapple.com has address 192.168.0.1

# cat /etc/mail/local-host-names
azapple.com
linuxserver.azapple.com
www.azapple.com
localhost
localhost.localdomain

Craig



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux