sendtestemail Failing on GCE docker-compose

by Seth   Last Updated October 10, 2019 06:00 AM

I'm setting up Weblate on Google Cloud Platform (GCE using Container-Optimized OS) and deploying via docker-compose using the HTTPS configuration.

I've followed these tutorials:
Weblate: Installing using Docker
Google: Running Docker Compose with Docker

Weblate is running fine, however emails aren't sending due to the following:

ERROR Handled exception: OSError: [Errno 99] Cannot assign requested address
Traceback (most recent call last):
  File "/usr/local/bin/weblate", line 11, in <module>
    load_entry_point('Weblate==3.8', 'console_scripts', 'weblate')()
  File "/usr/local/lib/python3.7/dist-packages/weblate/", line 34, in main
  File "/usr/local/lib/python3.7/dist-packages/django/core/management/", line 381, in execute_from_command_line
  File "/usr/local/lib/python3.7/dist-packages/django/core/management/", line 375, in execute
  File "/usr/local/lib/python3.7/dist-packages/django/core/management/", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.7/dist-packages/django/core/management/", line 364, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.7/dist-packages/django/core/management/commands/", line 33, in handle
  File "/usr/local/lib/python3.7/dist-packages/django/core/mail/", line 60, in send_mail
    return mail.send()
  File "/usr/local/lib/python3.7/dist-packages/django/core/mail/", line 291, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/usr/local/lib/python3.7/dist-packages/django/core/mail/backends/", line 103, in send_messages
    new_conn_created =
  File "/usr/local/lib/python3.7/dist-packages/django/core/mail/backends/", line 63, in open
    self.connection = self.connection_class(, self.port, **connection_params)
  File "/usr/lib/python3.7/", line 251, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python3.7/", line 336, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python3.7/", line 307, in _get_socket
  File "/usr/lib/python3.7/", line 727, in create_connection
    raise err
  File "/usr/lib/python3.7/", line 716, in create_connection
OSError: [Errno 99] Cannot assign requested address

I've tried is playing with various settings in the docker-compose-https.override.yml file, namely omitting certain settings to auto configure and changing the email address specified, specifying the port for mail, and changing SSL/TLS settings.

Here are the relevant parts of the configuration:

WEBLATE_SERVER_EMAIL: "[email protected]"
WEBLATE_DEFAULT_FROM_EMAIL: "[email protected]"

I'm unsure what the problem is and where to look to address it.

Related Questions

Updated May 05, 2018 08:00 AM

Updated February 06, 2019 15:00 PM

Updated July 12, 2019 00:00 AM