Dear Mark,
thank you for your answer. I can confirm my Hyperkitty works just fine for archiving messages. I can even confirm Hyperkitty can reach Mailman REST API. I haven't touched the LOGGING configuration but here you go (can even confirm hyperkitty.log is filled correctly with logs):
# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error when DEBUG=False. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse' } }, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler' }, 'file':{ 'level': 'INFO', #'class': 'logging.handlers.RotatingFileHandler', 'class': 'logging.handlers.WatchedFileHandler', 'filename': os.path.join(BASE_DIR, 'hyperkitty.log'), 'formatter': 'verbose', }, }, 'loggers': { 'django.request': { 'handlers': ['mail_admins', 'file'], 'level': 'ERROR', 'propagate': True, }, 'django': { 'handlers': ['file'], 'level': 'ERROR', 'propagate': True, }, 'hyperkitty': { 'handlers': ['file'], 'level': 'DEBUG', 'propagate': True, }, }, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s' }, 'simple': { 'format': '%(levelname)s %(message)s' }, }, #'root': { # 'handlers': ['file'], # 'level': 'INFO', #}, }
In mailman.log, instead, it seems like there's some issue with PostgreSQL
[2021-02-21 18:57:19 +0000] [11685] [ERROR] Error handling request /3.1/users/user@example.com Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 134, in handle self.handle_request(listener, req, client, addr) File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 175, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/wsgiapp.py", line 193, in __call__ return super().__call__(environ, start_response) File "falcon/api.py", line 274, in falcon.api.API.__call__ File "falcon/api.py", line 269, in falcon.api.API.__call__ File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/users.py", line 211, in on_get okay(response, self._resource_as_json(self._user)) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/helpers.py", line 124, in _resource_as_json resource = self._resource_as_dict(resource) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/users.py", line 130, in _resource_as_dict user_id = self.api.from_uuid(user.user_id) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/core/api.py", line 78, in from_uuid return uuid.hex AttributeError: 'NoneType' object has no attribute 'hex' [21/Feb/2021:18:57:19 +0000] "GET /3.1/users/user@example.com HTTP/1.1" 500 0 "-" "-" [2021-02-21 18:57:19 +0000] [11685] [ERROR] Error handling request /3.1/users/eeb2ainoh0ki8ohL3Renahseiph7AePh Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 134, in handle self.handle_request(listener, req, client, addr) File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 175, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/wsgiapp.py", line 193, in __call__ return super().__call__(environ, start_response) File "falcon/api.py", line 274, in falcon.api.API.__call__ File "falcon/api.py", line 269, in falcon.api.API.__call__ File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/users.py", line 208, in on_get if self._user is None: File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/users.py", line 204, in _user return user_manager.get_user_by_id(user_id) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/model/usermanager.py", line 96, in get_user_by_id return users.one() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3458, in one ret = self.one_or_none() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3427, in one_or_none ret = list(self) File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 101, in instances cursor.close() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit__ exc_value, with_traceback=exc_tb, File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 81, in instances rows = [proc(row) for row in fetch] File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 81, in <listcomp> rows = [proc(row) for row in fetch] File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 525, in _instance tuple([row[column] for column in pk_cols]), File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 525, in <listcomp> tuple([row[column] for column in pk_cols]), File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/engine/result.py", line 686, in _key_fallback replace_context=err, File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception sqlalchemy.exc.NoSuchColumnError: "Could not locate column in row for column 'user.id'" [2021-02-21 18:57:19 +0000] [16321] [ERROR] Error handling request /3.1/users/Cautah7jael5nieri0jaiRooVi6eech9/addresses Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 134, in handle self.handle_request(listener, req, client, addr) File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 175, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/wsgiapp.py", line 193, in __call__ return super().__call__(environ, start_response) File "falcon/api.py", line 252, in falcon.api.API.__call__ File "falcon/api.py", line 249, in falcon.api.API.__call__ File "falcon/api.py", line 681, in falcon.api.API._get_responder File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/wsgiapp.py", line 106, in find attribute = getattr(resource, name, MISSING) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/users.py", line 204, in _user return user_manager.get_user_by_id(user_id) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/database/transaction.py", line 85, in wrapper return function(args[0], config.db.store, *args[1:], **kws) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/model/usermanager.py", line 94, in get_user_by_id if users.count() == 0: File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3771, in count return self.from_self(col).scalar() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3491, in scalar ret = self.one() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3458, in one ret = self.one_or_none() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 3427, in one_or_none ret = list(self) File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 101, in instances cursor.close() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit__ exc_value, with_traceback=exc_tb, File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 61, in instances for query_entity in query._entities File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 61, in <listcomp> for query_entity in query._entities File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/query.py", line 4817, in row_processor getter = result._getter(column) File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/engine/result.py", line 783, in _getter return getter(key, raiseerr) File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/engine/result.py", line 704, in _getter ret = self._key_fallback(key, None, raiseerr) File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/engine/result.py", line 686, in _key_fallback replace_context=err, File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception sqlalchemy.exc.NoSuchColumnError: "Could not locate column in row for column 'count(*)'" [21/Feb/2021:18:57:19 +0000] "GET /3.1/users/Cautah7jael5nieri0jaiRooVi6eech9 HTTP/1.1" 500 0 "-" "-" [2021-02-21 18:57:19 +0000] [11685] [ERROR] Error handling request /3.1/members/find Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 134, in handle self.handle_request(listener, req, client, addr) File "/opt/mailman/venv/lib64/python3.6/site-packages/gunicorn/workers/sync.py", line 175, in handle_request respiter = self.wsgi(environ, resp.start_response) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/database/transaction.py", line 50, in wrapper rtn = function(*args, **kws) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/wsgiapp.py", line 193, in __call__ return super().__call__(environ, start_response) File "falcon/api.py", line 274, in falcon.api.API.__call__ File "falcon/api.py", line 269, in falcon.api.API.__call__ File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/members.py", line 460, in on_post return self._find(request, response) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/members.py", line 488, in _find collection = resource._make_collection(request, fields) File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/helpers.py", line 182, in _make_collection entries = [as_dict(resource) for resource in collection] File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/rest/helpers.py", line 182, in <listcomp> entries = [as_dict(resource) for resource in collection] File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman/utilities/queries.py", line 47, in __iter__ yield from self._query File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 101, in instances cursor.close() File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 69, in __exit__ exc_value, with_traceback=exc_tb, File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 81, in instances rows = [proc(row) for row in fetch] File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 81, in <listcomp> rows = [proc(row) for row in fetch] File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 525, in _instance tuple([row[column] for column in pk_cols]), File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/orm/loading.py", line 525, in <listcomp> tuple([row[column] for column in pk_cols]), File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/engine/result.py", line 686, in _key_fallback replace_context=err, File "/opt/mailman/venv/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_ raise exception sqlalchemy.exc.NoSuchColumnError: "Could not locate column in row for column '%(140001824334904 anon)s.%(140001822909888 anon)s_member_id'" [21/Feb/2021:18:57:19 +0000] "POST /3.1/members/find HTTP/1.1" 500 0 "-" "-"
-Marco