On 11/22/20 1:10 AM, Torge Riedel wrote:
today I did this on my setup and got the following exception after "systemctl restart mailman":
# systemctl status mailman.service mailman.service - GNU Mailing List Manager Loaded: loaded (/opt/mailman/core/mailman.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2020-11-22 09:59:53 CET; 46s ago Process: 30520 ExecStop=/opt/mailman/core/bin/mailman.sh stop (code=killed, signal=TERM) Process: 30597 ExecStart=/opt/mailman/core/bin/mailman.sh start (code=exited, status=1/FAILURE) Main PID: 1223 (code=exited, status=0/SUCCESS)
Nov 22 09:59:53 basis2 mailman.sh[30597]: File "/opt/mailman/core/venv/lib/python3.6/site-packages/pymysql/protocol.py", line 220, in check_error Nov 22 09:59:53 basis2 mailman.sh[30597]: err.raise_mysql_exception(self._data) Nov 22 09:59:53 basis2 mailman.sh[30597]: File "/opt/mailman/core/venv/lib/python3.6/site-packages/pymysql/err.py", line 109, in raise_mysql_exception Nov 22 09:59:53 basis2 mailman.sh[30597]: raise errorclass(errno, errval) Nov 22 09:59:53 basis2 mailman.sh[30597]: sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1060, "Duplicate column name 'archive_rendering_mode'") Nov 22 09:59:53 basis2 mailman.sh[30597]: [SQL: ALTER TABLE mailinglist ADD COLUMN archive_rendering_mode INTEGER] Nov 22 09:59:53 basis2 mailman.sh[30597]: (Background on this error at: http://sqlalche.me/e/2j85) Nov 22 09:59:53 basis2 systemd[1]: mailman.service: Control process exited, code=exited status=1 Nov 22 09:59:53 basis2 systemd[1]: mailman.service: Failed with result 'exit-code'. Nov 22 09:59:53 basis2 systemd[1]: Failed to start GNU Mailing List Manager.
I checked the database and - yes - there is already such a column in the DB. So I tried it the "hacker" way and just removed the column from the DB and give "systemctl restart mailman" a second try. Now it worked and the column is back.
I don't know if this column was already there from 3.3.1.
That column was added in 3.3.2 by <https://gitlab.com/mailman/mailman/-/merge_requests/644> It is the migration to add that column that failed in the above.
It appears that somehow that migration was previously run and added the column, but the version_num entry in the alembic_version table was not updated to indicate that that migration had been run.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan