Hello everyone,
We have been using Mailman3 for over a year and half. We upgraded from Ubuntu 22.04.5, where it was working fine, to Ubuntu 22.04.1. Since then, mailman3 won’t work. When we tried to start it immediately after the upgrade, we got this error:
024-09-12T23:08:04.322353+00:00 weather1 systemd[1]: Starting mailman3.service - GNU Mailing List Manager...
2024-09-12T23:08:04.935569+00:00 weather1 mailman[23628]: SystemError: type psycopg2.extensions.ReplicationConnection has the Py_TPFLAGS_HAVE_GC flag but has no traverse function
2024-09-12T23:08:04.942784+00:00 weather1 mailman[23628]: The above exception was the direct cause of the following exception:
2024-09-12T23:08:04.942869+00:00 weather1 mailman[23628]: Traceback (most recent call last):
2024-09-12T23:08:04.942938+00:00 weather1 mailman[23628]: File "/opt/mailman/venv/bin/mailman", line 8, in <module>
2024-09-12T23:08:04.943001+00:00 weather1 mailman[23628]: sys.exit(main())
2024-09-12T23:08:04.943123+00:00 weather1 mailman[23628]: ^^^^^^
2024-09-12T23:08:04.943188+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
2024-09-12T23:08:04.943242+00:00 weather1 mailman[23628]: return self.main(*args, **kwargs)
2024-09-12T23:08:04.943284+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.943325+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1077, in main
2024-09-12T23:08:04.943449+00:00 weather1 mailman[23628]: with self.make_context(prog_name, args, **extra) as ctx:
2024-09-12T23:08:04.943508+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.943553+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 943, in make_context
2024-09-12T23:08:04.943594+00:00 weather1 mailman[23628]: self.parse_args(ctx, args)
2024-09-12T23:08:04.943753+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1644, in parse_args
2024-09-12T23:08:04.943799+00:00 weather1 mailman[23628]: rest = super().parse_args(ctx, args)
2024-09-12T23:08:04.943867+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.943911+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1408, in parse_args
2024-09-12T23:08:04.943952+00:00 weather1 mailman[23628]: value, args = param.handle_parse_result(ctx, opts, args)
2024-09-12T23:08:04.944001+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.944043+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 2400, in handle_parse_result
2024-09-12T23:08:04.944085+00:00 weather1 mailman[23628]: value = self.process_value(ctx, value)
2024-09-12T23:08:04.944127+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.944182+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 2362, in process_value
2024-09-12T23:08:04.944249+00:00 weather1 mailman[23628]: value = self.callback(ctx, self, value)
2024-09-12T23:08:04.944293+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.944335+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/bin/mailman.py", line 95, in initialize_config
2024-09-12T23:08:04.944376+00:00 weather1 mailman[23628]: initialize(value)
2024-09-12T23:08:04.944419+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/core/initialize.py", line 229, in initialize
2024-09-12T23:08:04.944460+00:00 weather1 mailman[23628]: initialize_2(propagate_logs=propagate_logs)
2024-09-12T23:08:04.944518+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/core/initialize.py", line 187, in initialize_2
2024-09-12T23:08:04.944561+00:00 weather1 mailman[23628]: config.db = getUtility(IDatabaseFactory, utility_name).create()
2024-09-12T23:08:04.944603+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.944708+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/database/factory.py", line 57, in create
2024-09-12T23:08:04.944769+00:00 weather1 mailman[23628]: database.initialize()
2024-09-12T23:08:04.944856+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/database/base.py", line 117, in initialize
2024-09-12T23:08:04.944899+00:00 weather1 mailman[23628]: self.engine = create_engine(
2024-09-12T23:08:04.944941+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^
2024-09-12T23:08:04.944982+00:00 weather1 mailman[23628]: File "<string>", line 2, in create_engine
2024-09-12T23:08:04.945025+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned
2024-09-12T23:08:04.945070+00:00 weather1 mailman[23628]: return fn(*args, **kwargs) # type: ignore[no-any-return]
2024-09-12T23:08:04.945112+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.945165+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/sqlalchemy/engine/create.py", line 599, in create_engine
2024-09-12T23:08:04.945208+00:00 weather1 mailman[23628]: dbapi = dbapi_meth(**dbapi_args)
2024-09-12T23:08:04.945249+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.945291+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py", line 690, in import_dbapi
2024-09-12T23:08:04.945332+00:00 weather1 mailman[23628]: import psycopg2
2024-09-12T23:08:04.945374+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/psycopg2/__init__.py", line 51, in <module>
2024-09-12T23:08:04.945425+00:00 weather1 mailman[23628]: from psycopg2._psycopg import ( # noqa
2024-09-12T23:08:04.945478+00:00 weather1 mailman[23628]: SystemError: initialization of _psycopg raised unreported exception
2024-09-12T23:08:05.071429+00:00 weather1 systemd[1]: mailman3.service: Control process exited, code=exited, status=1/FAILURE
2024-09-12T23:08:05.071768+00:00 weather1 systemd[1]: mailman3.service: Failed with result 'exit-code'.
2024-09-12T23:08:05.072429+00:00 weather1 systemd[1]: Failed to start mailman3.service - GNU Mailing List Manager.
So, ultimately, what we decided to do was reinstall it. But the compilation fails when it tries to make a venv (virtual environment) with this error:
2024-09-12T23:08:04.322353+00:00 weather1 systemd[1]: Starting mailman3.service - GNU Mailing List Manager...
2024-09-12T23:08:04.935569+00:00 weather1 mailman[23628]: SystemError: type psycopg2.extensions.ReplicationConnection has the Py_TPFLAGS_HAVE_GC flag but has no traverse function
2024-09-12T23:08:04.942784+00:00 weather1 mailman[23628]: The above exception was the direct cause of the following exception:
2024-09-12T23:08:04.942869+00:00 weather1 mailman[23628]: Traceback (most recent call last):
2024-09-12T23:08:04.942938+00:00 weather1 mailman[23628]: File "/opt/mailman/venv/bin/mailman", line 8, in <module>
2024-09-12T23:08:04.943001+00:00 weather1 mailman[23628]: sys.exit(main())
2024-09-12T23:08:04.943123+00:00 weather1 mailman[23628]: ^^^^^^
2024-09-12T23:08:04.943188+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
2024-09-12T23:08:04.943242+00:00 weather1 mailman[23628]: return self.main(*args, **kwargs)
2024-09-12T23:08:04.943284+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.943325+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1077, in main
2024-09-12T23:08:04.943449+00:00 weather1 mailman[23628]: with self.make_context(prog_name, args, **extra) as ctx:
2024-09-12T23:08:04.943508+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.943553+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 943, in make_context
2024-09-12T23:08:04.943594+00:00 weather1 mailman[23628]: self.parse_args(ctx, args)
2024-09-12T23:08:04.943753+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1644, in parse_args
2024-09-12T23:08:04.943799+00:00 weather1 mailman[23628]: rest = super().parse_args(ctx, args)
2024-09-12T23:08:04.943867+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.943911+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 1408, in parse_args
2024-09-12T23:08:04.943952+00:00 weather1 mailman[23628]: value, args = param.handle_parse_result(ctx, opts, args)
2024-09-12T23:08:04.944001+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.944043+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 2400, in handle_parse_result
2024-09-12T23:08:04.944085+00:00 weather1 mailman[23628]: value = self.process_value(ctx, value)
2024-09-12T23:08:04.944127+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.944182+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/click/core.py", line 2362, in process_value
2024-09-12T23:08:04.944249+00:00 weather1 mailman[23628]: value = self.callback(ctx, self, value)
2024-09-12T23:08:04.944293+00:00 weather1 mailman[23628]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-12T23:08:04.944335+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/bin/mailman.py", line 95, in initialize_config
2024-09-12T23:08:04.944376+00:00 weather1 mailman[23628]: initialize(value)
2024-09-12T23:08:04.944419+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/core/initialize.py", line 229, in initialize
2024-09-12T23:08:04.944460+00:00 weather1 mailman[23628]: initialize_2(propagate_logs=propagate_logs)
2024-09-12T23:08:04.944518+00:00 weather1 mailman[23628]: File "/home/mailman/venv/lib/python3.12/site-packages/mailman/core/initialize.py", line 187, in initialize_2
2024-09-12T23:08:04.944561+00:00 weather1 mailman[23628]: config.db = getUtility(IDatabaseFactory, utility_name).create()
But yet, we have this installed:
venv mailman@weather1:~$ pip install psycopg2-binary
Requirement already satisfied: psycopg2-binary in ./venv/lib/python3.12/site-packages (2.8.6)
Any advice on how to get this working again would be GREATLY appreciated!
Gilbert Sebenste
Meteorology Support Analyst
College of DuPage