VCSA inodes getting full due to large files queued for mails /var/spool/clientmqueue
search cancel

VCSA inodes getting full due to large files queued for mails /var/spool/clientmqueue

book

Article ID: 318475

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • Unable to log into vCenter Web Client, /storage/core at high/100% utilization filled with core.sendmail.
  • vCenter vpxd service crashes and Web Client is inaccessible.
  • Monitor alerts show /storage/core exceeding 95% threshold. vCenter remains accessible but disk pressure is critical.
  • Take ssh to vCenter appliance and check Filesystem utilization using the command : df -h
    Filesystem                                Size  Used Avail Use% Mounted on
    /dev/mapper/core_vg-core                   50G   49G    1G  98% /storage/core
  • The below files are generated every 5 minutes under /storage/core:

root filesize MM DD HH:MM core.sendmail.#####
root filesize MM DD HH:MM core.sendmail.#####
root filesize MM DD HH:MM core.sendmail.#####

  • You might see the below errors in /var/log/vmware/messages:

sendmail[]: to=<#######.com>, delay=HH:MM:SS, xdelay=00:00:00, mailer=esmtp, pri=120832, relay=#######.com., dsn=4.0.0, stat=Deferred: Connection timed out with #######.com.
or
sendmail[558120]: 69KFAZOB558120: to=vmwareadmin@#####.com, ctladdr=vcenterealerts@####.com (0/0), delay=00:09:12, xdelay=00:04:36, mailer=relay, pri=30973, relay=[127.0.0.1] [127.0.0.1], dsn=4.4.2, stat=Deferred: Name server: [127.0.0.1]: host name lookup failure



Environment

VMware vCenter Server 8.x

Cause

  • Open vCenter Web Client, verify Mail server settings: Select vCenter > Configure > General > Edit > Mail.
  • The relay configured(relaymail.example,com) was not reachable as it was decommissioned or the connection may fail due to DNS resolution failure
  • As a result, a number of mails were queued as a SMTP relay was defined which VC was not able to communicate with.
  • Due to large queued mails, sendmail service started crashing and filling /storage/core.

Resolution

  • To stop the core.sendmail files from being generated, we need to stop the sendmail.service and reconfigure mail server relay or resolve the DNS issues.
  • Run below command to stop the service:
    systemctl stop sendmail.service
  • Run below command to delete files in /var/spool/clientmqueue:
    cd /var/spool/clientmqueue
    echo * | xargs -n 100 rm 
    OR
    find /var/spool/clientmqueue/* -exec rm {} \;
  • Above commands clear the entire folder to show zero contents eventually and run the below command to check the same:
    ls -ltrh /var/spool/clientmqueue/
  • Confirm that no new core files are being created:
    root filesize MM DD HH:MM core.sendmail.#####
    root@#### [ /storage/core ]# date
    Day MM DD HH:DD:SS UTC YYYY
  • Clear out the old core files:
    rm -rf core.sendmail.*
  • Verify vCenter Mail Settings: Log into the vSphere Web Client and navigate to vCenter > Configure > General > Edit > Mail. Ensure the SMTP server, sender address, and email addresses are correctly formatted and active.
  • Run the below command to start the service: 
    systemctl start sendmail.service

Additional Information

  • Workaround:
    • If you are unable to pinpoint the source of the core.sendmail files, just stop the sendmail.service and clear out the core.sendmail files, after clearing out the /var/spool/clientmqueue directory.
  • Broadcom Contact Support