Hello everyone,
I’m running Mailman from Docker containers, without much customization. (Postorius 1.3.3, Core 3.3.1, API 3.1, Python 3.8.5). I’ve created a list:user:notice:welcome template, and when I try to confirm a subscription, I get an error.
I followed previous emails on this list which told me to set POSTORIUS_TEMPLATE_BASE_URL in /opt/mailman/web/settings_local.py, but that doesn’t seem to make any difference. (I set it to a different value and the error message didn’t change. I also tried setting it in /opt/mailman/core/settings_local.py to no effect. After each change, I restarted mailman-web and mailman-core containers.)
From within mailman-web and mailman-core containers, I can reach “mailman-web:8000”.
In the webpage, I see: Mailman REST API not available. Please start Mailman core.
In /opt/mailman/core/var/logs/mailman.log, I get:
[17/Sep/2020:16:23:29 +0000] "GET /3.1/lists/xxx.example.com HTTP/1.1" 200 416 "-" "GNU Mailman REST client v3.3.1" Sep 17 16:23:35 2020 (48) deque: Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 307, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen retries = retries.increment( File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise raise value File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/mailman/app/workflow.py", line 69, in __next__ return step() File "/usr/lib/python3.8/site-packages/mailman/app/subscriptions.py", line 332, in _step_do_subscription self.member = self.mlist.subscribe( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/mailinglist.py", line 505, in subscribe notify(SubscriptionEvent( File "/usr/lib/python3.8/site-packages/zope/event/__init__.py", line 32, in notify subscriber(event) File "/usr/lib/python3.8/site-packages/mailman/app/membership.py", line 176, in handle_SubscriptionEvent send_welcome_message(mlist, member, member.preferred_language) File "/usr/lib/python3.8/site-packages/mailman/app/notifications.py", line 51, in send_welcome_message welcome_message = wrap(getUtility(ITemplateLoader).get( File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 188, in get contents = getUtility(ITemplateManager).get( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 110, in get contents = protocols.get(actual_uri, **auth) File "/usr/lib/python3.8/site-packages/mailman/utilities/protocols.py", line 38, in get response = requests.get(url, timeout=REQUEST_TIMEOUT, **kws) File "/usr/lib/python3.8/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5) [2020-09-17 16:23:35 +0000] [48] [ERROR] Socket error processing request. Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 307, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) socket.timeout: timed out
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen retries = retries.increment( File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise raise value File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 191, in handle_request six.reraise(*sys.exc_info()) File "/usr/lib/python3.8/site-packages/gunicorn/six.py", line 625, in reraise raise value File "/usr/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 176, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/usr/lib/python3.8/site-packages/mailman/rest/wsgiapp.py", line 193, in __call__ return super().__call__(environ, start_response) File "/usr/lib/python3.8/site-packages/falcon/api.py", line 269, in __call__ responder(req, resp, **params) File "/usr/lib/python3.8/site-packages/mailman/rest/sub_moderation.py", line 88, in on_post self._registrar.confirm(self._token) File "/usr/lib/python3.8/site-packages/mailman/app/subscriptions.py", line 559, in confirm list(workflow) File "/usr/lib/python3.8/site-packages/mailman/app/workflow.py", line 69, in __next__ return step() File "/usr/lib/python3.8/site-packages/mailman/app/subscriptions.py", line 332, in _step_do_subscription self.member = self.mlist.subscribe( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/mailinglist.py", line 505, in subscribe notify(SubscriptionEvent( File "/usr/lib/python3.8/site-packages/zope/event/__init__.py", line 32, in notify subscriber(event) File "/usr/lib/python3.8/site-packages/mailman/app/membership.py", line 176, in handle_SubscriptionEvent send_welcome_message(mlist, member, member.preferred_language) File "/usr/lib/python3.8/site-packages/mailman/app/notifications.py", line 51, in send_welcome_message welcome_message = wrap(getUtility(ITemplateLoader).get( File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 188, in get contents = getUtility(ITemplateManager).get( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 110, in get contents = protocols.get(actual_uri, **auth) File "/usr/lib/python3.8/site-packages/mailman/utilities/protocols.py", line 38, in get response = requests.get(url, timeout=REQUEST_TIMEOUT, **kws) File "/usr/lib/python3.8/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
What’s the next step to get templates working?
Thank you, Seth
On 9/17/20 9:33 AM, Seth Seeger wrote:
Hello everyone,
I’m running Mailman from Docker containers, without much customization. (Postorius 1.3.3, Core 3.3.1, API 3.1, Python 3.8.5). I’ve created a list:user:notice:welcome template, and when I try to confirm a subscription, I get an error.
I followed previous emails on this list which told me to set POSTORIUS_TEMPLATE_BASE_URL in /opt/mailman/web/settings_local.py, but that doesn’t seem to make any difference. (I set it to a different value and the error message didn’t change. I also tried setting it in /opt/mailman/core/settings_local.py to no effect. After each change, I restarted mailman-web and mailman-core containers.)
How did you create the template? In Postorius or by manually creating a file somewhere? If by creating a file, POSTORIUS_TEMPLATE_BASE_URL is not relevant, but ensure that the file is findable and readable by Mailman.
From within mailman-web and mailman-core containers, I can reach “mailman-web:8000”.
In the webpage, I see: Mailman REST API not available. Please start Mailman core.
The REST APT is normally exposed on port 8001, not 8000 (See port
in
mailman conf -s webservice
.
What is your setting for MAILMAN_REST_API_URL? does the port match?
In /opt/mailman/core/var/logs/mailman.log, I get:
[17/Sep/2020:16:23:29 +0000] "GET /3.1/lists/xxx.example.com HTTP/1.1" 200 416 "-" "GNU Mailman REST client v3.3.1"
It appears you are connecting to the REST API, but ... ...
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
Something appears to be trying to connect to REST on port 8000
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Sep 17, 2020, at 12:54 PM, Mark Sapiro <mark@msapiro.net> wrote:
I followed previous emails on this list which told me to set POSTORIUS_TEMPLATE_BASE_URL in /opt/mailman/web/settings_local.py, but that doesn’t seem to make any difference. (I set it to a different value and the error message didn’t change. I also tried setting it in /opt/mailman/core/settings_local.py to no effect. After each change, I restarted mailman-web and mailman-core containers.)
How did you create the template? In Postorius or by manually creating a file somewhere? If by creating a file, POSTORIUS_TEMPLATE_BASE_URL is not relevant, but ensure that the file is findable and readable by Mailman.
I created the template in Postorius.
From within mailman-web and mailman-core containers, I can reach “mailman-web:8000”.
In the webpage, I see: Mailman REST API not available. Please start Mailman core.
The REST APT is normally exposed on port 8001, not 8000 (See
port
inmailman conf -s webservice
.
Yes, it’s 8001:
[webservice] hostname: 172.19.199.2 [webservice] port: 8001
What is your setting for MAILMAN_REST_API_URL? does the port match?
I’m not overriding it:
./postorius/mailman-web/settings.py:MAILMAN_REST_API_URL = os.environ.get('MAILMAN_REST_URL', 'http://mailman-core:8001')
In /opt/mailman/core/var/logs/mailman.log, I get:
[17/Sep/2020:16:23:29 +0000] "GET /3.1/lists/xxx.example.com HTTP/1.1" 200 416 "-" "GNU Mailman REST client v3.3.1"
It appears you are connecting to the REST API, but ... ...
urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
Something appears to be trying to connect to REST on port 8000
Is this a red herring? Is something else wrong? Setting POSTORIUS_TEMPLATE_BASE_URL in settings_local.py doesn’t seem to make any difference.
Having set the POSTORIUS_TEMPLATE_BASE_URL, I deleted the template and recreated it. Now, when I approve a pending subscription it goes through, but the welcome email is blank.
Seth
On Sep 17, 2020, at 12:54 PM, Mark Sapiro <mark@msapiro.net> wrote:
Something appears to be trying to connect to REST on port 8000
I found this (older) email:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/T...
that does say that the POSTORIUS_TEMPLATE_BASE_URL should be “http://mailman-web:8000”
Seth
On 9/17/20 12:19 PM, Seth Seeger wrote:
I found this (older) email:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/T...
that does say that the POSTORIUS_TEMPLATE_BASE_URL should be “http://mailman-web:8000”
You've exhausted my very limited knowledge of the Docker install. Hopefully Abhilash (@maxking) or someone else will chime in.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Thu, Sep 17, 2020, at 9:33 AM, Seth Seeger wrote:
Hello everyone,
I’m running Mailman from Docker containers, without much customization. (Postorius 1.3.3, Core 3.3.1, API 3.1, Python 3.8.5). I’ve created a list:user:notice:welcome template, and when I try to confirm a subscription, I get an error.
I followed previous emails on this list which told me to set POSTORIUS_TEMPLATE_BASE_URL in /opt/mailman/web/settings_local.py, but that doesn’t seem to make any difference. (I set it to a different value and the error message didn’t change. I also tried setting it in /opt/mailman/core/settings_local.py to no effect. After each change, I restarted mailman-web and mailman-core containers.)
From within mailman-web and mailman-core containers, I can reach “mailman-web:8000”.
In the webpage, I see: Mailman REST API not available. Please start Mailman core.
In /opt/mailman/core/var/logs/mailman.log, I get:
[17/Sep/2020:16:23:29 +0000] "GET /3.1/lists/xxx.example.com HTTP/1.1" 200 416 "-" "GNU Mailman REST client v3.3.1" Sep 17 16:23:35 2020 (48) deque: Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 307, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen retries = retries.increment( File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise raise value File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/mailman/app/workflow.py", line 69, in __next__ return step() File "/usr/lib/python3.8/site-packages/mailman/app/subscriptions.py", line 332, in _step_do_subscription self.member = self.mlist.subscribe( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/mailinglist.py", line 505, in subscribe notify(SubscriptionEvent( File "/usr/lib/python3.8/site-packages/zope/event/__init__.py", line 32, in notify subscriber(event) File "/usr/lib/python3.8/site-packages/mailman/app/membership.py", line 176, in handle_SubscriptionEvent send_welcome_message(mlist, member, member.preferred_language) File "/usr/lib/python3.8/site-packages/mailman/app/notifications.py", line 51, in send_welcome_message welcome_message = wrap(getUtility(ITemplateLoader).get( File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 188, in get contents = getUtility(ITemplateManager).get( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 110, in get contents = protocols.get(actual_uri, **auth) File "/usr/lib/python3.8/site-packages/mailman/utilities/protocols.py", line 38, in get response = requests.get(url, timeout=REQUEST_TIMEOUT, **kws) File "/usr/lib/python3.8/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5) [2020-09-17 16:23:35 +0000] [48] [ERROR] Socket error processing request. Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.8/http/client.py", line 1347, in getresponse response.begin() File "/usr/lib/python3.8/http/client.py", line 307, in begin version, status, reason = self._read_status() File "/usr/lib/python3.8/http/client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.8/socket.py", line 669, in readinto return self._sock.recv_into(b) socket.timeout: timed out
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 724, in urlopen retries = retries.increment( File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/lib/python3.8/site-packages/urllib3/packages/six.py", line 735, in reraise raise value File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 428, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 335, in _raise_timeout raise ReadTimeoutError( urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 191, in handle_request six.reraise(*sys.exc_info()) File "/usr/lib/python3.8/site-packages/gunicorn/six.py", line 625, in reraise raise value File "/usr/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 176, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/usr/lib/python3.8/site-packages/mailman/rest/wsgiapp.py", line 193, in __call__ return super().__call__(environ, start_response) File "/usr/lib/python3.8/site-packages/falcon/api.py", line 269, in __call__ responder(req, resp, **params) File "/usr/lib/python3.8/site-packages/mailman/rest/sub_moderation.py", line 88, in on_post self._registrar.confirm(self._token) File "/usr/lib/python3.8/site-packages/mailman/app/subscriptions.py", line 559, in confirm list(workflow) File "/usr/lib/python3.8/site-packages/mailman/app/workflow.py", line 69, in __next__ return step() File "/usr/lib/python3.8/site-packages/mailman/app/subscriptions.py", line 332, in _step_do_subscription self.member = self.mlist.subscribe( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/mailinglist.py", line 505, in subscribe notify(SubscriptionEvent( File "/usr/lib/python3.8/site-packages/zope/event/__init__.py", line 32, in notify subscriber(event) File "/usr/lib/python3.8/site-packages/mailman/app/membership.py", line 176, in handle_SubscriptionEvent send_welcome_message(mlist, member, member.preferred_language) File "/usr/lib/python3.8/site-packages/mailman/app/notifications.py", line 51, in send_welcome_message welcome_message = wrap(getUtility(ITemplateLoader).get( File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 188, in get contents = getUtility(ITemplateManager).get( File "/usr/lib/python3.8/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3.8/site-packages/mailman/model/template.py", line 110, in get contents = protocols.get(actual_uri, **auth) File "/usr/lib/python3.8/site-packages/mailman/utilities/protocols.py", line 38, in get response = requests.get(url, timeout=REQUEST_TIMEOUT, **kws) File "/usr/lib/python3.8/site-packages/requests/api.py", line 76, in get return request('get', url, params=params, **kwargs) File "/usr/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 529, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPConnectionPool(host='mailman-web', port=8000): Read timed out. (read timeout=5)
What’s the next step to get templates working?
Are you using the provided docker-compose file or are you using something else like Kubernetes to deploy the container images?
It seems like your mailman-core container isn't able to talk to Postorius on the default dns name, mailman-web, in the provided docker-compose file. These dns names are setup by default if you are using the docker-compose.yaml provided with the repo, but would otherwise needs either changing the value of POSTORIUS_TEMPLATES_BASE_URL or manually setting up the mailman-web DNS in the /etc/host
of the mailman-core container.
Thank you, Seth
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- thanks, Abhilash Raj (maxking)
On Sep 19, 2020, at 3:02 PM, Abhilash Raj <maxking@asynchronous.in> wrote:
Are you using the provided docker-compose file or are you using something else like Kubernetes to deploy the container images?
I am using the provided docker-compose file.
It seems like your mailman-core container isn't able to talk to Postorius on the default dns name, mailman-web, in the provided docker-compose file. These dns names are setup by default if you are using the docker-compose.yaml provided with the repo, but would otherwise needs either changing the value of POSTORIUS_TEMPLATES_BASE_URL or manually setting up the mailman-web DNS in the
/etc/host
of the mailman-core container.
Telnet isn’t included in the container, so I tested with curl:
$ sudo docker exec -it -u mailman mailman-core bash bash-5.0$ grep mailman-web /etc/hosts bash-5.0$ curl http://mailman-web:8000 bash-5.0$
mailman-web does not seem to be in /etc/hosts of mailman-core, but it does resolve and port 8000 is reachable. (I tested with a bad hostname and a different port and did get error messages.) Is there a URL I can pull that will show that it’s working properly?
My original (slightly censored) docker-compose.yaml file is below.
Thanks, Seth
version: '2'
services: mailman-core: image: maxking/mailman-core:latest container_name: mailman-core hostname: mailman-core restart: always volumes: - /opt/mailman/core:/opt/mailman/ #stop_grace_period: 30s links: - database:database depends_on: - database environment: - DATABASE_URL=postgres://xxx:xxx@database/mailmandb - DATABASE_TYPE=postgres - DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase - HYPERKITTY_API_KEY=xxxxxx networks: mailman: ipv4_address: 172.19.199.2
mailman-web: image: maxking/mailman-web:latest container_name: mailman-web hostname: mailman-web restart: always depends_on: - database links: - mailman-core:mailman-core - database:database volumes: - /opt/mailman/web:/opt/mailman-web-data environment: - DATABASE_TYPE=postgres - DATABASE_URL=postgres://xxx:xxx@database/mailmandb - HYPERKITTY_API_KEY=xxxx - SERVE_FROM_DOMAIN=lists.example.com - DJANGO_ALLOWED_HOSTS=lists.example2.com - MAILMAN_ADMIN_USER=xxx - MAILMAN_ADMIN_EMAIL=xxx@xxxx - SECRET_KEY=xxxxxx networks: mailman: ipv4_address: 172.19.199.3
database: environment: POSTGRES_DB: mailmandb POSTGRES_USER: xxx POSTGRES_PASSWORD: xxx restart: always image: postgres:9.6-alpine volumes: - /opt/mailman/database:/var/lib/postgresql/data networks: mailman: ipv4_address: 172.19.199.4
networks: mailman: driver: bridge ipam: driver: default config: - subnet: 172.19.199.0/24
On Sat, Sep 19, 2020, at 4:19 PM, Seth Seeger wrote:
On Sep 19, 2020, at 3:02 PM, Abhilash Raj <maxking@asynchronous.in> wrote:
Are you using the provided docker-compose file or are you using something else like Kubernetes to deploy the container images?
I am using the provided docker-compose file.
It seems like your mailman-core container isn't able to talk to Postorius on the default dns name, mailman-web, in the provided docker-compose file. These dns names are setup by default if you are using the docker-compose.yaml provided with the repo, but would otherwise needs either changing the value of POSTORIUS_TEMPLATES_BASE_URL or manually setting up the mailman-web DNS in the
/etc/host
of the mailman-core container. Telnet isn’t included in the container, so I tested with curl:$ sudo docker exec -it -u mailman mailman-core bash bash-5.0$ grep mailman-web /etc/hosts bash-5.0$ curl http://mailman-web:8000 bash-5.0$
mailman-web does not seem to be in /etc/hosts of mailman-core, but it does resolve and port 8000 is reachable. (I tested with a bad hostname and a different port and did get error messages.) Is there a URL I can pull that will show that it’s working properly?
Can you run this command (replacing the mailing list's id and name of the template correctly) from mailman-core container and see if you get the template's text as the right response:
$ curl -L http://mailman-web:8000/postorius/api/templates/list/users.example.com/list:...
My original (slightly censored) docker-compose.yaml file is below.
Yeah, the file looks pretty much same as the one in the repo, nothing jumps out to me.
Abhilash
Thanks, Seth
version: '2'
services: mailman-core: image: maxking/mailman-core:latest container_name: mailman-core hostname: mailman-core restart: always volumes: - /opt/mailman/core:/opt/mailman/ #stop_grace_period: 30s links: - database:database depends_on: - database environment: - DATABASE_URL=postgres://xxx:xxx@database/mailmandb - DATABASE_TYPE=postgres - DATABASE_CLASS=mailman.database.postgresql.PostgreSQLDatabase - HYPERKITTY_API_KEY=xxxxxx networks: mailman: ipv4_address: 172.19.199.2
mailman-web: image: maxking/mailman-web:latest container_name: mailman-web hostname: mailman-web restart: always depends_on: - database links: - mailman-core:mailman-core - database:database volumes: - /opt/mailman/web:/opt/mailman-web-data environment: - DATABASE_TYPE=postgres - DATABASE_URL=postgres://xxx:xxx@database/mailmandb - HYPERKITTY_API_KEY=xxxx - SERVE_FROM_DOMAIN=lists.example.com - DJANGO_ALLOWED_HOSTS=lists.example2.com - MAILMAN_ADMIN_USER=xxx - MAILMAN_ADMIN_EMAIL=xxx@xxxx - SECRET_KEY=xxxxxx networks: mailman: ipv4_address: 172.19.199.3
database: environment: POSTGRES_DB: mailmandb POSTGRES_USER: xxx POSTGRES_PASSWORD: xxx restart: always image: postgres:9.6-alpine volumes: - /opt/mailman/database:/var/lib/postgresql/data networks: mailman: ipv4_address: 172.19.199.4
networks: mailman: driver: bridge ipam: driver: default config: - subnet: 172.19.199.0/24
-- thanks, Abhilash Raj (maxking)
On Sep 20, 2020, at 12:42 PM, Abhilash Raj <maxking@asynchronous.in> wrote:
Can you run this command (replacing the mailing list's id and name of the template correctly) from mailman-core container and see if you get the template's text as the right response:
$ curl -L http://mailman-web:8000/postorius/api/templates/list/users.example.com/list:... <http://mailman-web:8000/postorius/api/templates/list/users.example.com/list:user:action:subscribe>
The correct text does come through.
Seth
participants (3)
-
Abhilash Raj
-
Mark Sapiro
-
Seth Seeger