Could not connect to SMTP host when testing

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Opensearch Version 2.11.1

Describe the issue:
I have configured alerting and notification on my Opensearch cluster but whenever I test the notification, it errors out. On the Opensearch dashboard I see {“statusCode”:424,“error”:“Failed Dependency”,“message”:“unknown error”}.

On the pod logs I see:
{“status_code”:“424”,“status_text”:“sendEmail Error, status:Could not convert socket to TLS”}

I have configured the STMP sender (analytics) with the correct custom smtp host and port 587 with encryption: STARTTLS. I know this custom smtp host works because it works in a separate java spring boot api.

Please let me know if there is something I may be missing. I can also provide additional information if I missed anything in my initial description. Thanks


I ran the keystore cli to add it to all pods and restarted cluster

Relevant Logs or Screenshots:

1 Like

Hi @ic1000

Have you tried to use SSL/TLS instead of STARTTLS ?

Hi yes I have, when switched to SSL/TLS i see this error message: statusCode=424, statusText=sendEmail Error, status:Could not connect to SMTP host

Please ensure that TLS configuration is compatible with the SMTP server.

Hi @ic1000 ,

In order to check whether the SMTP server is reachable, please execute from the OpenSearch server the following command:

curl --ssl-reqd \
  --url 'smtps://' \
  --user '' \
  --mail-from '' \
  --mail-rcpt '' \
  --upload-file mail.txt

An example mail.txt could look like this:

From: John Smith <>
To: Joe Smith <>
Subject: an example email
Date: Mon, 7 Nov 2016 08:45:16

Dear Joe,
Welcome to this example email. 

Hi @ic1000 or others,

I am quite new in the Opensearch world.
Could you please provide me with the full procedure for how to set up the mailing notification?
I have filled the mailing section but it is missing the credentials thus fails to send the email.

Thanks in advance, Yehuda

Must ensure that the TLS/SSL setting are correctly configured for the SMTP connection. Also check there is no firewall is blocking the connection from the openssh server to SMTP server on a specified port.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.