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
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:
Created an email destination with smtp host as smtp.XXX.com, port as 587 , security TLS.
Configured the sender details in elasticsearch-keystore file as sender@XXX.com and
password as XXX.
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”
}
}
}
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
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:
SSL certificate trust issue
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
Anti-virus programs or firewall preventing you from connecting to SMTP port 529