Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

emails can't go out of my container. #38

Open
ghost opened this issue Dec 5, 2017 · 1 comment
Open

emails can't go out of my container. #38

ghost opened this issue Dec 5, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 5, 2017

Hi, im not docker guru so it's might be(probably) on my side.

my instance of taiga can't send emails.

This is the error it give when it try:

[05/Dec/2017 19:21:23] "PATCH /api/v1/users/5 HTTP/1.0" 500 135988
ERROR:2017-12-05 19:21:25,753: Internal Server Error: /api/v1/users/5
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/src/taiga-back/taiga/base/api/viewsets.py", line 106, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/usr/src/taiga-back/taiga/base/api/views.py", line 461, in dispatch
    response = self.handle_exception(exc)
  File "/usr/src/taiga-back/taiga/base/api/views.py", line 458, in dispatch
    response = handler(request, *args, **kwargs)
  File "/usr/src/taiga-back/taiga/users/api.py", line 147, in partial_update
    email.send()
  File "/usr/local/lib/python3.5/site-packages/django/core/mail/message.py", line 342, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/usr/local/lib/python3.5/site-packages/django/core/mail/backends/smtp.py", line 100, in send_messages
    new_conn_created = self.open()
  File "/usr/local/lib/python3.5/site-packages/django/core/mail/backends/smtp.py", line 58, in open
    self.connection = connection_class(self.host, self.port, **connection_params)
  File "/usr/local/lib/python3.5/smtplib.py", line 251, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/local/lib/python3.5/smtplib.py", line 336, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/local/lib/python3.5/smtplib.py", line 307, in _get_socket
    self.source_address)
  File "/usr/local/lib/python3.5/socket.py", line 694, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.5/socket.py", line 733, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known

This is the docker network connected to the container:

docker network inspect 4f22daa9df2f
[
    {
        "Name": "mytaiga_taiganw",
        "Id": "4f22daa9df2f325e4fcaa259e99ba93deb370d629fe4f9bd371cb3e842603afa",
        "Created": "2017-12-05T13:43:44.406590674-05:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.29.0.0/16",
                    "Gateway": "172.29.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "0d920ba57672603becaa5c2e06090307d0a078320bf29d641bc01abfa3abf61b": {
                "Name": "mytaiga_postgres_1",
                "EndpointID": "58ad8c5b89414424a9194903671ebc0eb6846cddf06ce2826476f9a48527d883",
                "MacAddress": "02:42:ac:1d:00:02",
                "IPv4Address": "172.29.0.2/16",
                "IPv6Address": ""
            },
            "eabd298f5af66f9dd119bdaec2eeac7acb57120cee8d3f50fa9310108c26a9ed": {
                "Name": "mytaiga_taiga_1",
                "EndpointID": "8945eea789e8f2a1be497a40bca064aef85e63896e63dda4f9a099b5b1f24299",
                "MacAddress": "02:42:ac:1d:00:03",
                "IPv4Address": "172.29.0.3/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

From inside the container I can't either ping google.com and 8.8.8.8 witch is probably the source of the problem.

@jcmmv00
Copy link

jcmmv00 commented Apr 6, 2018

I have the same issue when runs in aws

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

No branches or pull requests

1 participant