500 Internal Server Error on specific list pages
I have a new Mailman 3 server set up and am having a strange issue with just one particular list.
Accessing the list's Info page URL or it's Archiving Settings page URL returns a 500 Internal Server Error, but its other pages work correctly. Also, the Info and Archiving pages on the other lists are working correctly.
When I access the info page for the problem list, I get these errors in the log:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 68, in view return self.dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/postorius/views/generic.py", line 59, in dispatch return super(MailingListView, self).dispatch(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 88, in dispatch return handler(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/postorius/views/list.py", line 216, in get 'hyperkitty' in self.mailing_list.archivers and File "/usr/lib/python2.7/_abcoll.py", line 388, in __contains__ self[key] File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/base.py", line 151, in __getitem__ return self._get(key) File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/base.py", line 90, in _get return self.rest_data[key] File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/base.py", line 76, in rest_data response, content = self._connection.call(self._url) File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/connection.py", line 103, in call raise HTTPError(url, response.status, content, response, None) HTTPError: HTTP Error 500: A server error occurred. Please contact the administrator.
When I access the Archiving page in Settings, I get these:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 249, in _legacy_get_response response = self._get_response(request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 23, in _wrapped_view return view_func(request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/postorius/auth/decorators.py", line 39, in wrapper return fn(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/postorius/views/list.py", line 719, in list_settings form = form_class(initial=initial_data, mlist=m_list) File "/usr/lib/python2.7/dist-packages/postorius/forms.py", line 303, in __init__ [(key, key) for key in sorted(self._mlist.archivers.keys())]) File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/base.py", line 172, in keys return list(self) File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/base.py", line 166, in __len__ return len(self.rest_data) File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/base.py", line 76, in rest_data response, content = self._connection.call(self._url) File "/usr/lib/python2.7/dist-packages/mailmanclient/restbase/connection.py", line 103, in call raise HTTPError(url, response.status, content, response, None) HTTPError: HTTP Error 500: A server error occurred. Please contact the administrator.
Not a python developer, which makes debugging based on the above more difficult. I've seen some other errors posted to this list that highlight specific setting or config issues, but I'm not seeing that in these.
Any ideas?
On 7/29/20 9:55 PM, Johnny Cison wrote:
I have a new Mailman 3 server set up and am having a strange issue with just one particular list.
Accessing the list's Info page URL or it's Archiving Settings page URL returns a 500 Internal Server Error, but its other pages work correctly. Also, the Info and Archiving pages on the other lists are working correctly.
When I access the info page for the problem list, I get these errors in the log:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) ...> line 103, in call raise HTTPError(url, response.status, content, response, None) HTTPError: HTTP Error 500: A server error occurred. Please contact the administrator.
When I access the Archiving page in Settings, I get these:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner ... line 103, in call raise HTTPError(url, response.status, content, response, None) HTTPError: HTTP Error 500: A server error occurred. Please contact the administrator.
These messages are from Django's log. What's in Mailman's mailman.log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
The Mailman logs contain the following:
Jul 30 10:32:11 2020 (26190) REST request handler error: Traceback (most recent call last): File "/usr/lib/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/usr/lib/python3/dist-packages/mailman/rest/wsgiapp.py", line 214, in __call__ return super().__call__(environ, start_response) File "falcon/api.py", line 215, in falcon.api.API.__call__ (falcon/api.c:2872) File "falcon/api.py", line 189, in falcon.api.API.__call__ (falcon/api.c:2419) File "/usr/lib/python3/dist-packages/mailman/rest/lists.py", line 346, in on_get archiver_set = IListArchiverSet(self._mlist) File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 135, in __call__ adapter = self.__adapt__(obj) File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 151, in __adapt__ adapter = hook(self, obj) File "/usr/lib/python3/dist-packages/zope/component/_api.py", line 156, in adapter_hook return sitemanager.queryAdapter(object, interface, name, default) File "/usr/lib/python3/dist-packages/zope/interface/registry.py", line 348, in queryAdapter return self.adapters.queryAdapter(object, interface, name, default) File "/usr/lib/python3/dist-packages/zope/interface/adapter.py", line 353, in queryAdapter return self.adapter_hook(provided, object, name, default) File "/usr/lib/python3/dist-packages/zope/interface/adapter.py", line 363, in adapter_hook result = factory(object) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3/dist-packages/mailman/model/mailinglist.py", line 607, in __init__ ListArchiver.name == archiver_name).one_or_none() File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2793, in one_or_none "Multiple rows were found for one_or_none()") sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one_or_none()
On Thu, Jul 30, 2020 at 1:46 AM Mark Sapiro <mark@msapiro.net> wrote:
I have a new Mailman 3 server set up and am having a strange issue with just one particular list.
Accessing the list's Info page URL or it's Archiving Settings page URL returns a 500 Internal Server Error, but its other pages work correctly. Also, the Info and Archiving pages on the other lists are working correctly.
When I access the info page for the problem list, I get these errors in
log:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py",
41, in inner response = get_response(request) ...> line 103, in call raise HTTPError(url, response.status, content, response, None) HTTPError: HTTP Error 500: A server error occurred. Please contact the administrator.
When I access the Archiving page in Settings, I get these:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py",
On 7/29/20 9:55 PM, Johnny Cison wrote: the line line
41, in inner ... line 103, in call raise HTTPError(url, response.status, content, response, None) HTTPError: HTTP Error 500: A server error occurred. Please contact the administrator.
These messages are from Django's log. What's in Mailman's mailman.log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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/
On 7/30/20 9:05 AM, Johnny Cison wrote:
The Mailman logs contain the following:
Jul 30 10:32:11 2020 (26190) REST request handler error: Traceback (most recent call last): File "/usr/lib/python3.6/wsgiref/handlers.py", line 137, in run self.result = application(self.environ, self.start_response) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/usr/lib/python3/dist-packages/mailman/rest/wsgiapp.py", line 214, in __call__ return super().__call__(environ, start_response) File "falcon/api.py", line 215, in falcon.api.API.__call__ (falcon/api.c:2872) File "falcon/api.py", line 189, in falcon.api.API.__call__ (falcon/api.c:2419) File "/usr/lib/python3/dist-packages/mailman/rest/lists.py", line 346, in on_get archiver_set = IListArchiverSet(self._mlist) File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 135, in __call__ adapter = self.__adapt__(obj) File "/usr/lib/python3/dist-packages/zope/interface/interface.py", line 151, in __adapt__ adapter = hook(self, obj) File "/usr/lib/python3/dist-packages/zope/component/_api.py", line 156, in adapter_hook return sitemanager.queryAdapter(object, interface, name, default) File "/usr/lib/python3/dist-packages/zope/interface/registry.py", line 348, in queryAdapter return self.adapters.queryAdapter(object, interface, name, default) File "/usr/lib/python3/dist-packages/zope/interface/adapter.py", line 353, in queryAdapter return self.adapter_hook(provided, object, name, default) File "/usr/lib/python3/dist-packages/zope/interface/adapter.py", line 363, in adapter_hook result = factory(object) File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/usr/lib/python3/dist-packages/mailman/model/mailinglist.py", line 607, in __init__ ListArchiver.name == archiver_name).one_or_none() File "/usr/lib/python3/dist-packages/sqlalchemy/orm/query.py", line 2793, in one_or_none "Multiple rows were found for one_or_none()") sqlalchemy.orm.exc.MultipleResultsFound: Multiple rows were found for one_or_none()
This is a known issue <https://gitlab.com/mailman/mailman/-/issues/657>.
There are two entries for the same mailing_list_id
and name
in the
listarchiver table in the database.
We don't know how this happens, but you need to delete one (either one) of the duplicates.
Also see the recent thread at <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/PFVDFPGVWDTWFBTDS6DMYYWE6VE7PV3H/>.
If you have any idea about how this might have occurred in your case, let us know.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
We don't know how this happens, but you need to delete one (either one) of the duplicates.
If you have any idea about how this might have occurred in your case, let us know.
Thanks so much, Mark!
There were duplicate entries for mhonarc, mail-archive, prototype, and hyperkitty. I removed them all and it worked again.
I asked the person who was making changes at the time what was done and she indicated that she had approved an email being held (from a non-list member) and then added a user to the list. Not sure which of those created the issue.
Thanks again!
On 7/30/20 12:13 PM, Johnny Cison wrote:
I asked the person who was making changes at the time what was done and she indicated that she had approved an email being held (from a non-list member) and then added a user to the list. Not sure which of those created the issue.
Thank you for asking. I'll take a look at the flow of those actions.
The code basically won't add a duplicate entry. It checks if there is one and only adds if there isn't, so it has to be some kind of race condition, possibly caused by inadvertently double-clicking a button or link. (I have a mouse with a bouncy switch that sometimes double-clicks on its own if I'm not careful.)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Johnny Cison
-
Mark Sapiro