For some weird reason, the file /mailman/var/data/postfix_domains has a whitespace added to every mail domain. I checked the postfix main.cf file for any white spaces, but did not see any. I get errors every time that I try to add a list. The console shows whitespace " example.org" in the list. The web page shows:
Environment:
Request Method: GET Request URL: http://172.16.11.235/postorius/lists/list11.mail.example2.com/
Django Version: 2.0.5 Python Version: 3.6.5 Installed Applications: ('hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'paintstore', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount', 'django_mailman3.lib.auth.fedora', 'allauth.socialaccount.providers.openid', 'allauth.socialaccount.providers.github', 'allauth.socialaccount.providers.gitlab', 'allauth.socialaccount.providers.google', 'allauth.socialaccount.providers.twitter', 'allauth.socialaccount.providers.stackexchange') Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/usr/local/lib64/python3.6/site-packages/django/core/handlers/exception.py" in inner 35. response = get_response(request)
File "/usr/local/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response 128. response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib64/python3.6/site-packages/django/core/handlers/base.py" in _get_response 126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib64/python3.6/site-packages/django/views/generic/base.py" in view 69. return self.dispatch(request, *args, **kwargs)
File "/home/weddled/mailman/postorius/src/postorius/views/generic.py" in dispatch 57. return super(MailingListView, self).dispatch(request, *args, **kwargs)
File "/usr/local/lib64/python3.6/site-packages/django/views/generic/base.py" in dispatch 89. return handler(request, *args, **kwargs)
File "/home/weddled/mailman/postorius/src/postorius/views/list.py" in get 219. 'hyperkitty' in self.mailing_list.archivers and
File "/usr/lib64/python3.6/_collections_abc.py" in __contains__ 666. self[key]
File "/usr/local/lib/python3.6/site-packages/mailmanclient-3.2.0b1-py3.6.egg/mailmanclient/restbase/base.py" in __getitem__ 151. return self._get(key)
File "/usr/local/lib/python3.6/site-packages/mailmanclient-3.2.0b1-py3.6.egg/mailmanclient/restbase/base.py" in _get 90. return self.rest_data[key]
File "/usr/local/lib/python3.6/site-packages/mailmanclient-3.2.0b1-py3.6.egg/mailmanclient/restbase/base.py" in rest_data 76. response, content = self._connection.call(self._url)
File "/usr/local/lib/python3.6/site-packages/mailmanclient-3.2.0b1-py3.6.egg/mailmanclient/restbase/connection.py" in call 103. raise HTTPError(url, response.status, content, response, None)
During handling of the above exception (HTTP Error 500: b'A server error occurred. Please contact the administrator.'), another exception occurred:
File "/usr/local/lib64/python3.6/site-packages/django/core/handlers/exception.py" in inner 35. response = get_response(request)
File "/usr/local/lib64/python3.6/site-packages/django/utils/deprecation.py" in __call__ 95. response = self.get_response(request)
File "/usr/local/lib64/python3.6/site-packages/django/core/handlers/exception.py" in inner 37. response = response_for_exception(request, exc)
File "/usr/local/lib64/python3.6/site-packages/django/core/handlers/exception.py" in response_for_exception 87. response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/local/lib64/python3.6/site-packages/django/core/handlers/exception.py" in handle_uncaught_exception 122. return debug.technical_500_response(request, *exc_info)
File "/usr/local/lib64/python3.6/site-packages/django/views/debug.py" in technical_500_response 89. reporter = ExceptionReporter(request, exc_type, exc_value, tb)
File "/usr/local/lib64/python3.6/site-packages/django/views/debug.py" in __init__ 254. self.template_info = getattr(self.exc_value, 'template_debug', None)
File "/usr/lib64/python3.6/tempfile.py" in __getattr__ 477. file = self.__dict__['file']
Exception Type: KeyError at /postorius/lists/list11.mail.example2.com/ Exception Value: 'file'
On 7/12/18 10:56 AM, jon.kokko@us.fujitsu.com wrote:
I'm experiencing the same error on a clean install.
The issue in the OP appears to be leading whitespace in the domain name. If you go to <https://example.com/postorius/domains/>, what do you see?
Can you edit the domain? Does it contain leading whitespace?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
No white space that I can see. Error exists on creating the list and also clicking on it.
Django Version: 1.11.14 Exception Type: KeyError Exception Value: 'file' Exception Location: /opt/rh/rh-python35/root/usr/lib64/python3.5/tempfile.py in __getattr__, line 477 Python Executable: Python Version: 3.5.1 Python Path: ['/atldata/mailman-suite/mailman-suite_project', '/atldata/venv-3.5/lib/python3.5/site-packages/django_q-0.9.4-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/lockfile-0.12.2-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/django_extensions-2.0.7-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/django_haystack-2.8.1-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/networkx-2.1-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/django_compressor-2.2-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/django_paintstore-0.2-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/robot_detection-0.4-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/djangorestframework-3.8.2-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/django_mailman3-1.2.0a2-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/arrow-0.12.1-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/blessed-1.15.0-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/django_picklefield-1.0.0-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/decorator-4.3.0-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/rjsmin-1.0.12-py3.5-linux-x86_64.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/rcssmin-1.0.6-py3.5-linux-x86_64.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/django_appconf-1.0.2-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/wcwidth-0.1.7-py3.5.egg', '/atldata/venv-3.5/lib/python3.5/site-packages/mailman_hyperkitty-1.1.1-py3.5.egg', '/atldata/mailman-suite/mailman-suite_project', '/atldata/venv-3.5/lib/python3.5/site-packages', '/opt/rh/rh-python35/root/usr/lib64/python35.zip', '/opt/rh/rh-python35/root/usr/lib64/python3.5', '/opt/rh/rh-python35/root/usr/lib64/python3.5/plat-linux', '/opt/rh/rh-python35/root/usr/lib64/python3.5/lib-dynload', '/opt/rh/rh-python35/root/usr/lib64/python3.5/site-packages', '/opt/rh/rh-python35/root/usr/lib/python3.5/site-packages'] Server time: Thu, 12 Jul 2018 20:59:59 +0000
On 7/12/18 2:01 PM, jon.kokko@us.fujitsu.com wrote:
No white space that I can see. Error exists on creating the list and also clicking on it.
I'm only guessing here, but it looks like the list gets at least partly created, but with an invalid list name because of whitespace in the domain (at least going by the OP). Have you tried deleting the domain and recreating it?
And what is the content of var/data/postfix_domains?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
I've gone through a few iterations of recreating the domains with the same result.
After the commented header, my postfix_domains contains:
<empty line> domain.org<single whitespace>domain.org <empty line>
Thank you for the assistance Mark!
Regards, ./Jon Kokko
On 7/13/18 7:10 AM, jon.kokko@us.fujitsu.com wrote:
I've gone through a few iterations of recreating the domains with the same result.
After the commented header, my postfix_domains contains:
<empty line> domain.org<single whitespace>domain.org <empty line>
OK. Apparently the first sentence of the OP in this thread, "For some weird reason, the file /mailman/var/data/postfix_domains has a whitespace added to every mail domain.", doesn't apply in your case and may have been unrelated to the actual issue throwing the exception.
The "KeyError" is also misleading. In the OP traceback at least that comes during error handling of the original exception. See the line
During handling of the above exception (HTTP Error 500: b'A server error occurred. Please contact the administrator.'), another exception occurred:
You need to look in mailman.log to see if you can find more info about the '500'.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Here's the log output:
Jul 13 08:45:45 2018 (86892) REST request handler error: Traceback (most recent call last): File "/opt/rh/rh-python35/root/usr/lib64/python3.5/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/rest/wsgiapp.py", line 216, in __call__ return super().__call__(environ, start_response) File "/atldata/venv-3.5/lib/python3.5/site-packages/falcon/api.py", line 244, in __call__ responder(req, resp, **params) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/rest/lists.py", line 401, in on_get archiver_set = IListArchiverSet(self._mlist) File "/atldata/venv-3.5/lib/python3.5/site-packages/zope/component/hookable.py", line 33, in __call__ return self.__implementation(*args, **kw) File "/atldata/venv-3.5/lib/python3.5/site-packages/zope/component/_api.py", line 156, in adapter_hook return sitemanager.queryAdapter(object, interface, name, default) File "/atldata/venv-3.5/lib/python3.5/site-packages/zope/interface/registry.py", line 348, in queryAdapter return self.adapters.queryAdapter(object, interface, name, default) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/model/mailinglist.py", line 599, in __init__ for archiver in config.archivers: File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/config/config.py", line 259, in archivers archiver = call_name(class_path) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/utilities/modules.py", line 70, in call_name return named_callable(*args, **kws) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman_hyperkitty-1.1.1-py3.5.egg/mailman_hyperkitty/__init__.py", line 60, in __init__ self._load_conf() File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman_hyperkitty-1.1.1-py3.5.egg/mailman_hyperkitty/__init__.py", line 81, in _load_conf config.archiver.hyperkitty.configuration) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/config/config.py", line 337, in external_configuration raise MissingConfigurationFileError(path) mailman.interfaces.configuration.MissingConfigurationFileError: changeme
On 7/13/18 7:53 AM, jon.kokko@us.fujitsu.com wrote:
Here's the log output:
Jul 13 08:45:45 2018 (86892) REST request handler error: Traceback (most recent call last): ... File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman_hyperkitty-1.1.1-py3.5.egg/mailman_hyperkitty/__init__.py", line 81, in _load_conf config.archiver.hyperkitty.configuration) File "/atldata/venv-3.5/lib/python3.5/site-packages/mailman/config/config.py", line 337, in external_configuration raise MissingConfigurationFileError(path) mailman.interfaces.configuration.MissingConfigurationFileError: changeme
In your mailman.cfg file you have something like
[archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: changeme
That last line needs to point to the mailman-hyperkitty.cfg file, e.g.
configuration: /path/to/mailman-hyperkitty.cfg
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Oddly enough, I had no "changeme" value in there but adding the appropriate config line corrected the problem.
Thank you Mark!!
Regards, ./Jon Kokko
As a double confirmation, I dumped the mailman DB, there are no spaces in the preceding/following the domain name. Are there other values to check for the key error?
Thanks, ./Jon Kokko
participants (3)
-
Danny Weddle
-
jon.kokko@us.fujitsu.com
-
Mark Sapiro