Problem while sending e-mail alerts


(adem) #1

Hi all,

I have a problem while sending e-mail alerts.

my elasticsearch.yml file configuration:

xpack.notification.email.account:
gmail_account:
profile: gmail
smtp:
auth: true
starttls.enable: true
host: smtp.gmail.com
port: 587
user: ******@gmail.com
password: ******

My watcher rule:

“actions”: {
“send_email”: {
“email”: {
“profile”: “standard”,
“to”: [
"ademsim@gmail.com"
],
“subject”: “Watcher Notification”,
“body”: {
“text”: “Test”
}
}
}

And error:

Execution Failing

“reason”: "MessagingException[failed to send email with subject [Watcher Notification] via account [gmail_account]]; nested: MessagingException[Exception reading response]; nested: SocketTimeoutException[Read timed out]; "

Could anyone help me for this case.


(Alexander Reelsen) #2

This is not a watcher issue. The socket timeout exception indicates, that the node, which executes the watch is not able to connect to gmail. So very likely a firewall is dropping that connection, if that happens on every execution.

--Alex


(rich collier) #3

This is easy to test - from the machine you're running watcher on, try:

%> telnet smtp.gmail.com 587

You should get a response similar to:

Trying 74.125.124.108...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 smtp.gmail.com ESMTP k21sm5095469iti.28 - gsmtp

(system) #4

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