question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Email functions cause a Connection Refused error

See original GitHub issue

Issue Summary

Test emails are sent successfully but actual user registration and password emails fail with Connection Refused

AWS AMI: ami-78967519 Redash Version: redash.0.10.1.b1834

Steps to Reproduce

  • Configure the .env file so that a test email from manage.py successfully sends an email
  • Add a new user
  • The email is not received, and this trace is logged in logs/celery_error.log
[2016-07-12 06:00:24,074: ERROR/Worker-64] redash.tasks.send_mail[bae2b7b6-297e-4af9-90df-0595034923bc]: Failed sending message: Admin invited you to join Re:dash
Traceback (most recent call last):
  File "/opt/redash/redash.0.10.1.b1834/redash/tasks/general.py", line 32, in send_mail
    mail.send(message)
  File "/usr/local/lib/python2.7/dist-packages/flask_mail.py", line 491, in send
    with self.connect() as connection:
  File "/usr/local/lib/python2.7/dist-packages/flask_mail.py", line 144, in __enter__
    self.host = self.configure_host()
  File "/usr/local/lib/python2.7/dist-packages/flask_mail.py", line 158, in configure_host
    host = smtplib.SMTP(self.mail.server, self.mail.port)
  File "/usr/lib/python2.7/smtplib.py", line 256, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python2.7/smtplib.py", line 316, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python2.7/smtplib.py", line 291, in _get_socket
    return socket.create_connection((host, port), timeout)
  File "/usr/lib/python2.7/socket.py", line 571, in create_connection
    raise err
error: [Errno 111] Connection refused

Technical details:

  • How did you install Redash: Used ami-78967519
  • I’m using SendGrid as an email provider

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bschwindcommented, Jul 12, 2016

Ah, that did it! Thanks for the help!

1reaction
arikfrcommented, Jul 12, 2016

Yes, the above command restarts only the web server. You can restart Celery with sudo supervisorctl restart redash_celery or just restart everything with sudo supervisorctl restart all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trouble with IMAP Connection refused error - Here's how to fix it!
IMAP connection refused error can occur due to server firewall restrictions, IMAP configuration errors, and more. Here are the top 4 reasons ...
Read more >
Send email connection refused - Stack Overflow
Every time I try send an email I receive the error "ExtendedSocketException: Connection refused [::ffff:xxx.xxx.xxx.xxxx]:25".
Read more >
How to Fix the SSH "Connection Refused" Error - Kinsta
Are you experiecing the "Connection refused" error when connecting via SSH? Learn what's causing the issue and follow these steps to get it...
Read more >
Understanding Email Errors and Error Messages
A "connection refused," or "connection timed out" message usually results from high volumes of mail being processed at the time your message was...
Read more >
What to do when an e-mail message is not being sent at the ...
Error reported: connect to localhost failed (Connection refused) ... caused the fact that Sendmail, the application used to send email is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found