Using Email for Alerting, but getting an error

Hi all,

I’ve config an alert with destination type is Email. But I got an error following when I made a testing message

[2020-11-12T03:00:07,406][INFO ][c.a.o.a.m.d.Destination ] [odfe-node1] Message published for action name: Test Destination, messageid: Could not convert socket to TLS, statuscode: 1

Can anyone help me?

@devexps Could you please paste the complete stack trace.

Iam also facing the same issue.

  1. Alerting plugin version Iam using is 1.13.1.0. and our elasticsearch as 4 nodes coordinating node, master node, node1 and node2.

Steps i followed is:

  1. Created an email destination with smtp host as smtp.XXX.com, port as 587 , security TLS.

  2. Configured the sender details in elasticsearch-keystore file as sender@XXX.com and
    password as XXX.

  3. Reloaded the security settings API in dev tool of kibana using as follows
    POST _nodes/reload_secure_settings
    Response of the above API is:
    {
    “_nodes” : {
    “total” : 4,
    “successful” : 4,
    “failed” : 0
    },
    “cluster_name” : “odfe-cluster”,
    “nodes” : {
    “1234” : {
    “name” : “odfe-cn”
    },
    “5678” : {
    “name” : “odfe-master”
    },
    “12ED” : {
    “name” : “odfe-node1”
    },
    “A123D” : {
    “name” : “odfe-node2”
    }
    }
    }

  4. Created monitor , trigger and tried to send a test mail from action faced the above error in elasticsearch docker container log.
    [2021-11-29T13:32:36,803][INFO ][c.a.o.a.m.d.Destination ] [odfe-cn] Message published for action name: XXXX, messageid: Could not convert socket to TLS, statuscode: 1

Hi,
Any update on this issue?

Hey @sowmiyapj,

It’s hard to tell for certain from just the log entry but it’s possible there is a configuration issue unrelated with Alerting that is preventing you from making the connection to the SMTP host.

A couple possibilities I can think of:

  1. SSL certificate trust issue
  2. Application not supporting TLS version being used by SMTP host
    • Ex. application using TLSv1.1 and SMTP host is using TLSv1.2 without fallback
    • For Alerting 1.13.1.0 we’re using javax.mail:1.6.2 which supports TLSv1.2
  3. Anti-virus programs or firewall preventing you from connecting to SMTP port 529