Posted: 2012-07-26 13:39:39 by Alasdair Keyes
I had someone come to me today with a CentOS 5.x machine that was taking upwards of 10 minutes to get to the login prompt.
When I rebooted the box, It hung for a long time on Sendmail and the Sendmail sm-client services
Between the two of them they took over 8 minutes to start. Helpfully /var/log/messages and /var/log/maillog didn't have any entries about why it took so long. After a bit of poking it turns out that he had changed the hostname from kvmhost01.local to kvmhost01.testlocal but hadn't updated /etc/hosts so sendmail couldn't find the IP associated with the hostname.
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 kvmhost01.testlocal localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
It's only a small thing but obviously makes a big difference to Sendmail.
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
© Alasdair Keyes
I'm now available for IT consultancy and software development services - Cloudee LTD.
Happy user of Digital Ocean (Affiliate link)