Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error Sending Email Alerts with SMTP - "tls: first record does not look like a TLS handshake" #8071

Closed
petershrom opened this issue Apr 7, 2017 · 8 comments

Comments

@petershrom
Copy link

Read before posting:

Please prefix your title with [Bug] or [Feature request].

Please include this information:

  • What Grafana version are you using?
    4.2.0

  • What datasource are you using?
    InfluxDb

  • What OS are you running grafana on?
    Ubuntu Trusty

  • What did you do?
    tried to send an email alert

  • What was the expected result?
    an email alert

  • What happened instead?
    UI Says: "Problem! Failed to send alert notifications"
    Logs say: logger=alerting.notifier.email error="tls: first record does not look like a TLS handshake"

  • If related to metric query / data viz:

    • Include raw network request & response: get by opening Chrome Dev Tools (F12, Ctrl+Shift+I on windows, Cmd+Opt+I on Mac), go the network tab.
@petershrom petershrom changed the title Error Sending Email Alerts with SMTP [BUG] Error Sending Email Alerts with SMTP - "tls: first record does not look like a TLS handshake" Apr 7, 2017
@daniellee
Copy link
Contributor

Related to this issue: #7189

There is currently no support for sending alerts via SMTP servers that do not support TLS.

@petershrom
Copy link
Author

Our Mailserver does support TLSv1 - so I'm not sure why we're getting this error.

@daniellee
Copy link
Contributor

In the Grafana config, the default port is 25 (if you have not specified something else in your config). Does your mail server have support for TLS on that port?

Otherwise, could be something to do with STARTTLS vs TLS. I don't think we have renegotiation enabled in the TLS config. But I think it might be simpler to just support sending emails without TLS as specified in #7189 rather than adding that option.

@petershrom
Copy link
Author

petershrom commented Apr 7, 2017 via email

@daniellee
Copy link
Contributor

Great!

@prakashray4pt
Copy link

Grafana docker running in ECS(AWS) is failing to send email alert using Simple Email Service (AWS) SMTP server

Grafana - version : v5.4.3
SMTP server: email-smtp.us-east-1.amazonaws.com:25

Grafana Run command:
docker run -d -p 3000:3000
-e "GF_SMTP_ENABLED=true"
-e "GF_SMTP_HOST=email-smtp.us-east-1.amazonaws.com:25
-e "GF_SMTP_USER=xxx"
-e "GF_SMTP_PASSWORD=xxx"
grafana/grafana:5.4.3

Error: eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="dial tcp 54.243.251.159:25: i/o timeout"

please help

@ghost
Copy link

ghost commented Jul 29, 2019

Grafana seems to lack these settings for email alerts:
Encryption method: SSL/TLS or STARTTLS
Authentication type: PLAIN or LOGIN.

We need these settings because Grafana cannot send any emails when using MS Exchange mailer.

@kgupta26
Copy link

Grafana docker running in ECS(AWS) is failing to send email alert using Simple Email Service (AWS) SMTP server

Grafana - version : v5.4.3
SMTP server: email-smtp.us-east-1.amazonaws.com:25

Grafana Run command:
docker run -d -p 3000:3000
-e "GF_SMTP_ENABLED=true"
-e "GF_SMTP_HOST=email-smtp.us-east-1.amazonaws.com:25
-e "GF_SMTP_USER=xxx"
-e "GF_SMTP_PASSWORD=xxx"
grafana/grafana:5.4.3

Error: eror msg="Failed to send alert notification email" logger=alerting.notifier.email error="dial tcp 54.243.251.159:25: i/o timeout"

please help

@prakashray4pt i would check the connectivity on port 25. Make sure its not blocked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants