Error: "Could not convert socket to TLS" due to SMTP hostname mismatch in VCF Usage Meter 9.x
search cancel

Error: "Could not convert socket to TLS" due to SMTP hostname mismatch in VCF Usage Meter 9.x

book

Article ID: 446475

calendar_today

Updated On:

Products

VMware Usage Meter

Issue/Introduction

When configuring or saving SMTP email notification settings in the VCF Usage Meter 9.x Web UI, the operation fails with the following error:

General error occurred while sending mail - Could not convert socket to TLS.

Environment

VCF Usage Meter 9.x

Cause

The appliance attempts a STARTTLS upgrade but the UI-configured SMTP hostname does not match the server's certificate CN/SAN

Resolution

  1. Identify the Certificate identity: Run the following command from the Usage Meter console to view the certificate presented by the SMTP server:
    openssl s_client -connect <SMTP_SERVER_IP>:25 -starttls smtp

  2. Look for the Subject (CN) or Subject Alternative Name in the output.

  3. Update Usage Meter Configuration:
     Log in to the Usage Meter Web UI.
     Navigate to Settings > Email.
     Update the SMTP Server field to the FQDN that matches the certificate identified in Step 1.

  4. Handle DNS Resolution (If necessary): If the matching FQDN does not resolve to the SMTP server's IP via your DNS provider, add a local entry to the appliance:
    Edit the hosts file: vi /etc/hosts
    Add the mapping: <SMTP_IP_ADDRESS> <MATCHING_FQDN>

  5. Restart services:

    /opt/vmware/cloudusagemetering/scripts/stop.sh all
    /opt/vmware/cloudusagemetering/scripts/start.sh all

Additional Information

Error: "Saving email notification settings failed: The mail test connection attempt failed." when saving email notification settings