No Emails sent from vCenter Server Appliance after an Alert/Event is triggered
search cancel

No Emails sent from vCenter Server Appliance after an Alert/Event is triggered

book

Article ID: 415286

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Alert/Event is triggered but action mail is not being sent from vCenter Server Appliance.
  • In /var/log/vmware/messages, you see entries similar to 

    sendmail[#####]: ######: from=###@###.com, size=925, class=0, nrcpts=1, msgid=<###@###.com>, relay=root@localhost
    sendmail[#####]: ######: to=###@###.com, ctladdr=###@###.com (0/0) delay=00:00:00,xdelay=00:00:00, mailer=relay, pri=30548, relay=[127.0.0.1][127.0.0.1],dsn=4.4.1, stat=Deferred: Connection refused by [127.0.0.1]
    systemd:Starting Sendmail Mail Transport Agent...

    sendmail[#####]: ######: from=root, size=516, class=0, nrcpts=1, msgid=<###@###.com>, relay=root@localhost
    sendmail[#####]:######:to=root,ctladdr=root(0/0),delay=00:00:00,xdelay=00:00:00,mailer=relay,pri=138896,relay=[127.0.0.1],###@###.com (0/0), delay=00:01:07, xdelay=00:01:07, mailer=relay, pri=30516, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
    systemd:sendmail.service: start opearation timed out. Terminating.
    systemd:sendmail.service: Failed with result 'timeout'.
    systemd:Failed to start Sendmail Mail Transport Agent.

  • sendmail status is shown as "failed".

    # service sendmail status
         sendmail.service - Sendmail Mail Transport Agent
         Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled; vendor >
         Active: failed (Result: timeout) since Wed YYYY-MM-DD HH:MM:SS UTC; 2 week>

         
         

Environment

VMware vCenter Server 8.0

Cause

The system attempted to automatically start the Sendmail service, but the startup process timed out, and the system ultimately terminated the startup process and declared it failed.

Resolution

To increase the start timeout duration to 6mins to fix with below command:
# systemctl stop sendmail && cp /lib/systemd/system/sendmail.service /lib/systemd/system/sendmail.service.original && sed -iE '/^\[Service\]/a TimeoutStartSec=6m' /lib/systemd/system/sendmail.service && systemctl daemon-reload && SYSTEMD_LOG_LEVEL=debug systemctl start sendmail

Additional Information

Japanese version of this KB: 
vCenter Server でイベントやアラートが発生してもEメールが送信されない