Test email error (cannot assign requested address

Issue Summary

I have deployed Redash in an AWS environment using ami-0e164aeccb29a1be7 as described in the documentation. However, when I go to send the test email from a local email server I keep getting an error:

$ docker-compose run --rm server manage send_test_mail
Starting redash_postgres_1 ... done
Starting redash_redis_1    ... done
[2019-07-11 20:22:53,958][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/Grammar.txt
[2019-07-11 20:22:53,983][PID:1][INFO][root] Generating grammar tables from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
[2019-07-11 20:22:54,754][PID:1][INFO][root] Latest version: 7.0.0 (newer: True)
Traceback (most recent call last):
  File "/app/manage.py", line 9, in <module>
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 345, in main
    return AppGroup.main(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/flask/cli.py", line 229, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/app/redash/cli/__init__.py", line 70, in send_test_mail
    body="Test 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 575, in create_connection
    raise err
socket.error: [Errno 99] Cannot assign requested address

This is a huge blocker to me since I can’t seem to create usable accounts without the email server.

My relevant environment variables are


any help is appreciated.

Technical details:

  • Redash Version: 5.0.2
  • Browser/OS: Ubuntu
  • How did you install Redash: ami-0e164aeccb29a1be7