vCenter alerts do not get sent - Error "unable to qualify my own domain name (localhost)"
search cancel

vCenter alerts do not get sent - Error "unable to qualify my own domain name (localhost)"

book

Article ID: 394638

calendar_today

Updated On:

Products

VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

vCenter cannot send emails even though SMTP is configured correctly

Environment

vCenter 7.0

vCenter 8.0

Cause

syslog in /var/log/vmware/syslog.log shows entries similar to these:

2025-03-17T10:02:56.339090+00:00 localhost sendmail[54608]: My unqualified host name (localhost) unknown; sleeping for retry
2025-03-17T10:03:56.339391+00:00 localhost sendmail[54608]: unable to qualify my own domain name (localhost) -- using short name

The issue here is that the host has no FQDN, but only a shortname (localhost). Sendmail, the MTA that vCenter uses, requires an FQDN in the format <host>.<domain>.<tld> in order to be able to send email.

Resolution

  • Make sure that vCenter has a fully qualified domain name (FQDN).
    • open SSH to vCSA
    • enter BASH 
      > shell
    • issue the command 
      hostname
    • the output is the fully qualified hostname
  • Make sure the vCenter Server PNID matches the hostname.
    1. Open SSH to the vCenter Server Appliance as root user.
    2. Don’t enter the BASH.
    3. Type the following on the command line to display the PNID: /usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost
    4. The value displayed is the PNID.
  • Make sure the vCenter Server FQDN resolves both forward and reverse in DNS.