Я новичок в Kiwi TCMS и все еще нахожусь в среде разработчиков, пытаюсь его запустить и запустить.
Я использую Ubuntu 18.04 на своем ПК. Контейнеры Docker (kiwi_web и kiwi_db) работают и, насколько я вижу, работают нормально.
Моя проблема в том, что я не могу заставить Kiwi отправлять электронные письма.
I 'Вы прочитали том в файле docker-compose.yml
с таким значением:
- ./local-settings/:/venv/lib64/python3.6/site-packages/tcms/settings/
Затем я создал ./local-settings/local_settings.py
с этим внутри:
EMAIL_HOST = 'smtp.server.com'
EMAIL_PORT = '485'
EMAIL_HOST_USER = 'admin@server.com'
EMAIL_HOST_PASSWORD = 'password'
EMAIL_USE_TLS = True
Но это не сработало.
Вот трассировка:
web_1 | [Thu Oct 03 19:25:05.240200 2019] [wsgi:error] [pid 9] Exception in thread Thread-1:
web_1 | [Thu Oct 03 19:25:05.240218 2019] [wsgi:error] [pid 9] Traceback (most recent call last):
web_1 | [Thu Oct 03 19:25:05.240221 2019] [wsgi:error] [pid 9] File "/opt/rh/rh-python36/root/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
web_1 | [Thu Oct 03 19:25:05.240223 2019] [wsgi:error] [pid 9] self.run()
web_1 | [Thu Oct 03 19:25:05.240225 2019] [wsgi:error] [pid 9] File "/opt/rh/rh-python36/root/usr/lib64/python3.6/threading.py", line 864, in run
web_1 | [Thu Oct 03 19:25:05.240228 2019] [wsgi:error] [pid 9] self._target(*self._args, **self._kwargs)
web_1 | [Thu Oct 03 19:25:05.240230 2019] [wsgi:error] [pid 9] File "/venv/lib64/python3.6/site-packages/django/core/mail/__init__.py", line 60, in send_mail
web_1 | [Thu Oct 03 19:25:05.240232 2019] [wsgi:error] [pid 9] return mail.send()
web_1 | [Thu Oct 03 19:25:05.240234 2019] [wsgi:error] [pid 9] File "/venv/lib64/python3.6/site-packages/django/core/mail/message.py", line 291, in send
web_1 | [Thu Oct 03 19:25:05.240236 2019] [wsgi:error] [pid 9] return self.get_connection(fail_silently).send_messages([self])
web_1 | [Thu Oct 03 19:25:05.240238 2019] [wsgi:error] [pid 9] File "/venv/lib64/python3.6/site-packages/django/core/mail/backends/smtp.py", line 103, in send_messages
web_1 | [Thu Oct 03 19:25:05.240240 2019] [wsgi:error] [pid 9] new_conn_created = self.open()
web_1 | [Thu Oct 03 19:25:05.240242 2019] [wsgi:error] [pid 9] File "/venv/lib64/python3.6/site-packages/django/core/mail/backends/smtp.py", line 63, in open
web_1 | [Thu Oct 03 19:25:05.240244 2019] [wsgi:error] [pid 9] self.connection = self.connection_class(self.host, self.port, **connection_params)
web_1 | [Thu Oct 03 19:25:05.240246 2019] [wsgi:error] [pid 9] File "/opt/rh/rh-python36/root/usr/lib64/python3.6/smtplib.py", line 251, in __init__
web_1 | [Thu Oct 03 19:25:05.240248 2019] [wsgi:error] [pid 9] (code, msg) = self.connect(host, port)
web_1 | [Thu Oct 03 19:25:05.240250 2019] [wsgi:error] [pid 9] File "/opt/rh/rh-python36/root/usr/lib64/python3.6/smtplib.py", line 336, in connect
web_1 | [Thu Oct 03 19:25:05.240252 2019] [wsgi:error] [pid 9] self.sock = self._get_socket(host, port, self.timeout)
web_1 | [Thu Oct 03 19:25:05.240254 2019] [wsgi:error] [pid 9] File "/opt/rh/rh-python36/root/usr/lib64/python3.6/smtplib.py", line 307, in _get_socket
web_1 | [Thu Oct 03 19:25:05.240256 2019] [wsgi:error] [pid 9] self.source_address)
web_1 | [Thu Oct 03 19:25:05.240258 2019] [wsgi:error] [pid 9] File "/opt/rh/rh-python36/root/usr/lib64/python3.6/socket.py", line 724, in create_connection
web_1 | [Thu Oct 03 19:25:05.240260 2019] [wsgi:error] [pid 9] raise err
web_1 | [Thu Oct 03 19:25:05.240261 2019] [wsgi:error] [pid 9] File "/opt/rh/rh-python36/root/usr/lib64/python3.6/socket.py", line 713, in create_connection
web_1 | [Thu Oct 03 19:25:05.240263 2019] [wsgi:error] [pid 9] sock.connect(sa)
web_1 | [Thu Oct 03 19:25:05.240265 2019] [wsgi:error] [pid 9] OSError: [Errno 99] Cannot assign requested address
web_1 | [Thu Oct 03 19:25:05.240271 2019] [wsgi:error] [pid 9]
Спасибо!