Migration from old server to new server failed
Hi,
So we tried to the migration following the steps:
- stop mailman in the old machine (v3.1.1 from ubuntu packages)
- dump DB mailman3 and mailman3web
- backup /var/lib/mailman3 content
On the new machine:
- checkout from git the version 3.1.1 to match production and install the services
- stop mailman3 and mailman3-web on the new machine
- load DBs into new machine
- copy content from /var/lib/mailman3 into /local/mailman/var (which means: archives/ cache/ data/ ext/ lists/ locks/ messages/ public_suffix_list.dat queue/ templates/ web/)
- start mailman3 and mailman-3web
- run mailman3-web migrate
And I stopped here. Because it crashed.
(venv) mailman@new-mailman3-server ~ (v3.1.1) [0|SIGINT]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying account.0003_alter_emailaddress_create_unique_verified_email... OK Applying account.0004_alter_emailaddress_drop_unique_email... OK Applying account.0005_emailaddress_idx_upper_email... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying django_mailman3.0003_sessions... OK Applying django_q.0010_auto_20200610_0856... OK Applying django_q.0011_auto_20200628_1055... OK Applying django_q.0012_auto_20200702_1608... OK Applying django_q.0013_task_attempt_count... OK Applying django_q.0014_schedule_cluster... OK Applying hyperkitty.0016_auto_20180309_0056... OK Applying hyperkitty.0017_file_attachments... OK Applying hyperkitty.0018_threadcategory_color... OK Applying hyperkitty.0019_auto_20190127_null_description... OK Applying hyperkitty.0020_auto_20190907_1927... OK Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/local/mailman/venv/bin/mailman-web", line 8, in <module> sys.exit(main()) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py", line 90, in main execute_from_command_line(sys.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 96, in wrapped res = handle_func(*args, **kwargs) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 349, in handle post_migrate_state = executor.migrate( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py", line 135, in migrate state = self._migrate_all_forwards( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards state = self.apply_migration( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py", line 252, in apply_migration state = migration.apply(state, schema_editor) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/migration.py", line 130, in apply operation.database_forwards( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/operations/fields.py", line 108, in database_forwards schema_editor.add_field( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/schema.py", line 104, in add_field super().add_field(model, field) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 636, in add_field return self.create_model(field.remote_field.through) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 447, in create_model self.execute(sql, params or None) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 199, in execute cursor.execute(sql, params) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 67, in execute return self._execute_with_wrappers( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 84, in _execute with self.db.wrap_database_errors: File "/local/mailman/venv/lib/python3.10/site-packages/django/db/utils.py", line 91, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) django.db.utils.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
I tried to drop the table, but then it complained about another one. I dropped all the complained tables and as result hypperkitty never started. So I went back to see why the first error happened.
Any clue what to do next?
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On 2/16/24 07:12, Helio Loureiro wrote:
- start mailman3 and mailman-3web
- run mailman3-web migrate
You should run mailman3-web migrate when mailman-3web is not running.
django.db.utils.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
I tried to drop the table, but then it complained about another one. I dropped all the complained tables and as result hypperkitty never started. So I went back to see why the first error happened.
The errors occurred because you had recently added tables in your database so they couldn't be added by the migrations. Dropping the tables was the correct thing to do.
Did you ultimately successfully run all the migrations?
When you say hypperkitty never started
, what exactly does that mean?
What happens when you try to access the archives? Can you access
postorius? Are any errors logged in mailman3-web's log?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi,
I repeated the steps today.
First I waited to end the errors raised because the mailman3-web wasn't running.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen response = self._make_request( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request conn.request( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py", line 400, in request self.endheaders() File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 976, in send self.connect() File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py", line 238, in connect self.sock = self._new_conn() File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f0fdc2f72b0>: Failed to establish a new connection: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen retries = retries.increment( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /archives/api/mailman/archive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0fdc2f72b0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Which seems to keep forever. So eventually I gave up and moved forward. And I changed to use the uwsgi socket instead of the direct port.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|SIGINT]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying account.0003_alter_emailaddress_create_unique_verified_email... OK Applying account.0004_alter_emailaddress_drop_unique_email... OK Applying account.0005_emailaddress_idx_upper_email... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying django_mailman3.0003_sessions... OK Applying django_q.0010_auto_20200610_0856... OK Applying django_q.0011_auto_20200628_1055... OK Applying django_q.0012_auto_20200702_1608... OK Applying django_q.0013_task_attempt_count... OK Applying django_q.0014_schedule_cluster... OK Applying hyperkitty.0016_auto_20180309_0056... OK Applying hyperkitty.0017_file_attachments... OK Applying hyperkitty.0018_threadcategory_color... OK Applying hyperkitty.0019_auto_20190127_null_description... OK Applying hyperkitty.0020_auto_20190907_1927... OK Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
Then dropping table hyperkitty_mailinglist_moderators.
(venv) mailman@new-mailman3 ~ (v3.1.1)> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_owners' already exists")
After dropping table hyperkitty_mailinglist_owners.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
After dropping table hyperkitty_mailinglist_moderators.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying hyperkitty.0021_add_owners_mods... OK Applying hyperkitty.0022_mailinglist_archive_rendering_mode... OK Applying hyperkitty.0023_alter_mailinglist_name... OK Applying postorius.0004_create_email_template...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'postorius_emailtemplate' already exists")
After dropping table postorius_emailtemplate.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying postorius.0004_create_email_template... OK Applying postorius.0005_auto_20180707_1107... OK Applying postorius.0006_auto_20180711_1359... OK Applying postorius.0007_auto_20180712_0536... OK Applying postorius.0008_auto_20190310_0717... OK Applying postorius.0009_auto_20190508_1604... OK Applying postorius.0010_auto_20190821_0621... OK Applying postorius.0011_auto_20191109_1219... OK Applying postorius.0012_auto_20200420_2136... OK Applying postorius.0013_auto_20201116_0058... OK Applying postorius.0014_auto_20210329_2248... OK Applying postorius.0015_auto_20210619_0509... OK Applying postorius.0016_auto_20210810_2157... OK Applying postorius.0017_alter_emailtemplate_language... OK Applying postorius.0018_alter_emailtemplate_language... OK Applying socialaccount.0004_app_provider_id_settings... OK Applying socialaccount.0005_socialtoken_nullable_app... OK Applying socialaccount.0006_alter_socialaccount_extra_data... OK
At this point the errors remains about not reaching web part. So I started mailman3-web.
Then I see these errors on var/log/mailman.log
Feb 19 15:35:14 2024 (543890) Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py", line 158, in _archive_message url = self._send_message(mlist, msg) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py", line 228, in _send_message raise ValueError(result.text) ValueError: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address> </body></html>
Feb 19 15:35:14 2024 (543890) HyperKitty failure on http://127.0.0.1/archives/api/mailman/archive: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address> </body></html> (404) Feb 19 15:35:14 2024 (543890) Could not archive the message with id < ff1707bb-d105-4f37-b3f8-9766b3563127@SESAMR604.domain.com> Feb 19 15:35:14 2024 (543890) archiving failed, re-queuing (mailing-list mylist.new-mailman.domain.com, message < ff1707bb-d105-4f37-b3f8-9766b3563127@machine.domain.com>) Feb 19 15:35:14 2024 (543890) Exception in the HyperKitty archiver: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address> </body></html>
And I can't get access to the hyperkitty at all.
On var/logs/uwsgi-error.log:
--- Logging error --- Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 356, in pusher task = SignedPackage.loads(task[1]) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/signing.py", line 25, in loads return signing.loads( File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 35, in loads base64d = force_bytes(TimestampSigner(key, salt=salt).unsign(s, max_age=max_age)) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 70, in unsign result = super(TimestampSigner, self).unsign(value) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 55, in unsign raise BadSignature('Signature "%s" does not match' % sig) django.core.signing.BadSignature: Signature "48do9gGvueBxakX_a4uNmSwD7cs" does not match
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1100, in emit msg = self.format(record) File "/usr/lib/python3.10/logging/__init__.py", line 943, in format return fmt.format(record) File "/usr/lib/python3.10/logging/__init__.py", line 678, in format record.message = record.getMessage() File "/usr/lib/python3.10/logging/__init__.py", line 368, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Call stack: File "/local/mailman/venv/bin/mailman-web", line 8, in <module> sys.exit(main()) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py", line 90, in main execute_from_command_line(sys.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/management/commands/qcluster.py", line 22, in handle q.start() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 78, in start self.sentinel.start() File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/context.py", line 281, in _Popen return Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch code = process_obj._bootstrap(parent_sentinel=child_r) File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 168, in __init__ self.start() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 172, in start self.spawn_cluster() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 248, in spawn_cluster self.pusher = self.spawn_pusher() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 201, in spawn_pusher return self.spawn_process(pusher, self.task_queue, self.event_out, self.broker) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 197, in spawn_process p.start() File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/context.py", line 281, in _Popen return Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch code = process_obj._bootstrap(parent_sentinel=child_r) File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 358, in pusher logger.error(e, traceback.format_exc()) Message: BadSignature('Signature "48do9gGvueBxakX_a4uNmSwD7cs" does not match') Arguments: ('Traceback (most recent call last):\n File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 356, in pusher\n task = SignedPackage.loads(task[1])\n File "/local/mailman/venv/lib/python3.10/sit e-packages/django_q/signing.py", line 25, in loads\n return signing.loads(\n File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 35, in loads\n base64d = force_bytes(TimestampSigner(key, salt=sa lt).unsign(s, max_age=max_age))\n File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 70, in unsign\n result = super(TimestampSigner, self).unsign(value)\n File "/local/mailman/venv/lib/python3.10 /site-packages/django_q/core_signing.py", line 55, in unsign\n raise BadSignature(\'Signature "%s" does not match\' % sig)\ndjango.core.signing.BadSignature: Signature "48do9gGvueBxakX_a4uNmSwD7cs" does not match\n',)
I'm using uwsgi via apache:
(venv) mailman@new-mailman3 ~ (v3.1.1)> more /etc/apache2/conf-enabled/mailman3.conf Alias /mailman3/favicon.ico /local/mailman/web/static/favicon.ico Alias /mailman/favicon.ico /local/mailman/web/static/favicon.ico Alias /favicon.ico /local/mailman/web/static/favicon.ico Alias /mailman3/static /local/mailman/web/static Alias /mailman/static /local/mailman/web/static Alias /static /local/mailman/web/static
<Directory "/local/mailman/web/static"> Require all granted </Directory>
<IfModule mod_proxy_uwsgi.c> ProxyPass /mailman3/favicon.ico ! ProxyPass /mailman/favicon.ico ! ProxyPass /favicon.ico ! ProxyPass /mailman3/static ! ProxyPass /mailman/static ! ProxyPass /static ! ProxyPass /mailman3 unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/ ProxyPass /mailman unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/ #ProxyPass /mailman3 http://localhost:8000/ timeout=180 #ProxyPass /mailman http://localhost:8000/ timeout=180 #ProxyPass / http://localhost:8000/ timeout=180 </IfModule>
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Fri, 16 Feb 2024 at 22:39, Mark Sapiro <mark@msapiro.net> wrote:
On 2/16/24 07:12, Helio Loureiro wrote:
- start mailman3 and mailman-3web
- run mailman3-web migrate
You should run mailman3-web migrate when mailman-3web is not running.
django.db.utils.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
I tried to drop the table, but then it complained about another one. I dropped all the complained tables and as result hypperkitty never started. So I went back to see why the first error happened.
The errors occurred because you had recently added tables in your database so they couldn't be added by the migrations. Dropping the tables was the correct thing to do.
Did you ultimately successfully run all the migrations?
When you say
hypperkitty never started
, what exactly does that mean? What happens when you try to access the archives? Can you access postorius? Are any errors logged in mailman3-web's 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/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to helio@loureiro.eng.br
Hi,
Any suggestions here?
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Mon, 19 Feb 2024 at 14:44, Helio Loureiro <helio@loureiro.eng.br> wrote:
Hi,
I repeated the steps today.
First I waited to end the errors raised because the mailman3-web wasn't running.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen response = self._make_request( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 496, in _make_request conn.request( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py", line 400, in request self.endheaders() File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output self.send(msg) File "/usr/lib/python3.10/http/client.py", line 976, in send self.connect() File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py", line 238, in connect self.sock = self._new_conn() File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f0fdc2f72b0>: Failed to establish a new connection: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen retries = retries.increment( File "/local/mailman/venv/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=8000): Max retries exceeded with url: /archives/api/mailman/archive (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f0fdc2f72b0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Which seems to keep forever. So eventually I gave up and moved forward. And I changed to use the uwsgi socket instead of the direct port.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|SIGINT]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying account.0003_alter_emailaddress_create_unique_verified_email... OK Applying account.0004_alter_emailaddress_drop_unique_email... OK Applying account.0005_emailaddress_idx_upper_email... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying django_mailman3.0003_sessions... OK Applying django_q.0010_auto_20200610_0856... OK Applying django_q.0011_auto_20200628_1055... OK Applying django_q.0012_auto_20200702_1608... OK Applying django_q.0013_task_attempt_count... OK Applying django_q.0014_schedule_cluster... OK Applying hyperkitty.0016_auto_20180309_0056... OK Applying hyperkitty.0017_file_attachments... OK Applying hyperkitty.0018_threadcategory_color... OK Applying hyperkitty.0019_auto_20190127_null_description... OK Applying hyperkitty.0020_auto_20190907_1927... OK Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
Then dropping table hyperkitty_mailinglist_moderators.
(venv) mailman@new-mailman3 ~ (v3.1.1)> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_owners' already exists")
After dropping table hyperkitty_mailinglist_owners.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
After dropping table hyperkitty_mailinglist_moderators.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying hyperkitty.0021_add_owners_mods... OK Applying hyperkitty.0022_mailinglist_archive_rendering_mode... OK Applying hyperkitty.0023_alter_mailinglist_name... OK Applying postorius.0004_create_email_template...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 87, in _execute return self.cursor.execute(sql) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py", line 75, in execute return self.cursor.execute(query, args) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 179, in execute res = self._query(mogrified_query) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line 330, in _query db.query(q) File "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py", line 261, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (1050, "Table 'postorius_emailtemplate' already exists")
After dropping table postorius_emailtemplate.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate System check identified some issues:
WARNINGS: account.EmailAddress: (models.W036) MariaDB does not support unique constraints with conditions. HINT: A constraint won't be created. Silence this warning if you don't care about it. account.EmailAddress: (models.W043) MariaDB does not support indexes on expressions. HINT: An index won't be created. Silence this warning if you don't care about it. Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: Applying postorius.0004_create_email_template... OK Applying postorius.0005_auto_20180707_1107... OK Applying postorius.0006_auto_20180711_1359... OK Applying postorius.0007_auto_20180712_0536... OK Applying postorius.0008_auto_20190310_0717... OK Applying postorius.0009_auto_20190508_1604... OK Applying postorius.0010_auto_20190821_0621... OK Applying postorius.0011_auto_20191109_1219... OK Applying postorius.0012_auto_20200420_2136... OK Applying postorius.0013_auto_20201116_0058... OK Applying postorius.0014_auto_20210329_2248... OK Applying postorius.0015_auto_20210619_0509... OK Applying postorius.0016_auto_20210810_2157... OK Applying postorius.0017_alter_emailtemplate_language... OK Applying postorius.0018_alter_emailtemplate_language... OK Applying socialaccount.0004_app_provider_id_settings... OK Applying socialaccount.0005_socialtoken_nullable_app... OK Applying socialaccount.0006_alter_socialaccount_extra_data... OK
At this point the errors remains about not reaching web part. So I started mailman3-web.
Then I see these errors on var/log/mailman.log
Feb 19 15:35:14 2024 (543890) Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py", line 158, in _archive_message url = self._send_message(mlist, msg) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py", line 228, in _send_message raise ValueError(result.text) ValueError: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address> </body></html>
Feb 19 15:35:14 2024 (543890) HyperKitty failure on http://127.0.0.1/archives/api/mailman/archive: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address> </body></html> (404) Feb 19 15:35:14 2024 (543890) Could not archive the message with id < ff1707bb-d105-4f37-b3f8-9766b3563127@SESAMR604.domain.com> Feb 19 15:35:14 2024 (543890) archiving failed, re-queuing (mailing-list mylist.new-mailman.domain.com, message < ff1707bb-d105-4f37-b3f8-9766b3563127@machine.domain.com>) Feb 19 15:35:14 2024 (543890) Exception in the HyperKitty archiver: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address> </body></html>
And I can't get access to the hyperkitty at all.
On var/logs/uwsgi-error.log:
--- Logging error --- Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 356, in pusher task = SignedPackage.loads(task[1]) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/signing.py", line 25, in loads return signing.loads( File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 35, in loads base64d = force_bytes(TimestampSigner(key, salt=salt).unsign(s, max_age=max_age)) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 70, in unsign result = super(TimestampSigner, self).unsign(value) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 55, in unsign raise BadSignature('Signature "%s" does not match' % sig) django.core.signing.BadSignature: Signature "48do9gGvueBxakX_a4uNmSwD7cs" does not match
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1100, in emit msg = self.format(record) File "/usr/lib/python3.10/logging/__init__.py", line 943, in format return fmt.format(record) File "/usr/lib/python3.10/logging/__init__.py", line 678, in format record.message = record.getMessage() File "/usr/lib/python3.10/logging/__init__.py", line 368, in getMessage msg = msg % self.args TypeError: not all arguments converted during string formatting Call stack: File "/local/mailman/venv/bin/mailman-web", line 8, in <module> sys.exit(main()) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py", line 90, in main execute_from_command_line(sys.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line utility.execute() File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv self.execute(*args, **cmd_options) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute output = self.handle(*args, **options) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/management/commands/qcluster.py", line 22, in handle q.start() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 78, in start self.sentinel.start() File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/context.py", line 281, in _Popen return Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch code = process_obj._bootstrap(parent_sentinel=child_r) File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 168, in __init__ self.start() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 172, in start self.spawn_cluster() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 248, in spawn_cluster self.pusher = self.spawn_pusher() File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 201, in spawn_pusher return self.spawn_process(pusher, self.task_queue, self.event_out, self.broker) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 197, in spawn_process p.start() File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/context.py", line 281, in _Popen return Popen(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch code = process_obj._bootstrap(parent_sentinel=child_r) File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 358, in pusher logger.error(e, traceback.format_exc()) Message: BadSignature('Signature "48do9gGvueBxakX_a4uNmSwD7cs" does not match') Arguments: ('Traceback (most recent call last):\n File "/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py", line 356, in pusher\n task = SignedPackage.loads(task[1])\n File "/local/mailman/venv/lib/python3.10/sit e-packages/django_q/signing.py", line 25, in loads\n return signing.loads(\n File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 35, in loads\n base64d = force_bytes(TimestampSigner(key, salt=sa lt).unsign(s, max_age=max_age))\n File "/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py", line 70, in unsign\n result = super(TimestampSigner, self).unsign(value)\n File "/local/mailman/venv/lib/python3.10 /site-packages/django_q/core_signing.py", line 55, in unsign\n raise BadSignature(\'Signature "%s" does not match\' % sig)\ndjango.core.signing.BadSignature: Signature "48do9gGvueBxakX_a4uNmSwD7cs" does not match\n',)
I'm using uwsgi via apache:
(venv) mailman@new-mailman3 ~ (v3.1.1)> more /etc/apache2/conf-enabled/mailman3.conf Alias /mailman3/favicon.ico /local/mailman/web/static/favicon.ico Alias /mailman/favicon.ico /local/mailman/web/static/favicon.ico Alias /favicon.ico /local/mailman/web/static/favicon.ico Alias /mailman3/static /local/mailman/web/static Alias /mailman/static /local/mailman/web/static Alias /static /local/mailman/web/static
<Directory "/local/mailman/web/static"> Require all granted </Directory>
<IfModule mod_proxy_uwsgi.c> ProxyPass /mailman3/favicon.ico ! ProxyPass /mailman/favicon.ico ! ProxyPass /favicon.ico ! ProxyPass /mailman3/static ! ProxyPass /mailman/static ! ProxyPass /static ! ProxyPass /mailman3 unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/ ProxyPass /mailman unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/ #ProxyPass /mailman3 http://localhost:8000/ timeout=180 #ProxyPass /mailman http://localhost:8000/ timeout=180 #ProxyPass / http://localhost:8000/ timeout=180 </IfModule>
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Fri, 16 Feb 2024 at 22:39, Mark Sapiro <mark@msapiro.net> wrote:
On 2/16/24 07:12, Helio Loureiro wrote:
- start mailman3 and mailman-3web
- run mailman3-web migrate
You should run mailman3-web migrate when mailman-3web is not running.
django.db.utils.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators' already exists")
I tried to drop the table, but then it complained about another one. I dropped all the complained tables and as result hypperkitty never started. So I went back to see why the first error happened.
The errors occurred because you had recently added tables in your database so they couldn't be added by the migrations. Dropping the tables was the correct thing to do.
Did you ultimately successfully run all the migrations?
When you say
hypperkitty never started
, what exactly does that mean? What happens when you try to access the archives? Can you access postorius? Are any errors logged in mailman3-web's 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/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to helio@loureiro.eng.br
Hi,
Thanks for the tip. Now I can see hypperkitty available.
But I'm still seeing some errors.
Feb 22 14:16:56 2024 (2062795) HyperKitty failure on http://127.0.0.1/archives/api/mailman/archive:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Server Error</title> <link rel="shortcut icon" href="/static/postorius/img/favicon.ico"> <link rel="stylesheet" href="/static/postorius/libs/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="/static/django-mailman3/css/main.css"> <link rel="stylesheet" href="/static/postorius/css/style.css">
</head> <body> <div class="container"> <h1>Server error</h1> <div class="alert alert-danger">An error occurred while processing your request.</div> </div> </body> </html> (500) Feb 22 14:16:56 2024 (2062795) Could not archive the message with id < AM6PR07MB592539392144457915580AF992752@ABCD.externaldomain.com> Feb 22 14:16:56 2024 (2062795) archiving failed, re-queuing (mailing-list cn-lratci-op.mailman3.domain.com, message < AM6PR07MB592539392144457915580AF992752@ABCD.externaldomain.com>) Feb 22 14:16:56 2024 (2062795) Exception in the HyperKitty archiver:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Server Error</title> <link rel="shortcut icon" href="/static/postorius/img/favicon.ico"> <link rel="stylesheet" href="/static/postorius/libs/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="/static/django-mailman3/css/main.css"> <link rel="stylesheet" href="/static/postorius/css/style.css">
</head> <body> <div class="container"> <h1>Server error</h1> <div class="alert alert-danger">An error occurred while processing your request.</div> </div> </body> </html> Feb 22 14:16:56 2024 (2062795) Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py", line 158, in _archive_message url = self._send_message(mlist, msg) File "/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py", line 228, in _send_message raise ValueError(result.text) ValueError:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Server Error</title> <link rel="shortcut icon" href="/static/postorius/img/favicon.ico"> <link rel="stylesheet" href="/static/postorius/libs/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="/static/django-mailman3/css/main.css"> <link rel="stylesheet" href="/static/postorius/css/style.css">
</head> <body> <div class="container"> <h1>Server error</h1> <div class="alert alert-danger">An error occurred while processing your request.</div> </div> </body> </html>
Which might be a minor issue since now I can access the web page and login is working again.
Thanks a lot!
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Thu, 22 Feb 2024 at 11:31, Odhiambo Washington <odhiambo@gmail.com> wrote:
On Thu, Feb 22, 2024 at 12:49 PM Helio Loureiro <helio@loureiro.eng.br> wrote:
Hi,
Any suggestions here?
[snip]
I'm using uwsgi via apache:
Okay.
(venv) mailman@new-mailman3 ~ (v3.1.1)> more /etc/apache2/conf-enabled/mailman3.conf Alias /mailman3/favicon.ico /local/mailman/web/static/favicon.ico Alias /mailman/favicon.ico /local/mailman/web/static/favicon.ico Alias /favicon.ico /local/mailman/web/static/favicon.ico Alias /mailman3/static /local/mailman/web/static Alias /mailman/static /local/mailman/web/static Alias /static /local/mailman/web/static
<Directory "/local/mailman/web/static"> Require all granted </Directory>
<IfModule mod_proxy_uwsgi.c> ProxyPass /mailman3/favicon.ico ! ProxyPass /mailman/favicon.ico ! ProxyPass /favicon.ico ! ProxyPass /mailman3/static ! ProxyPass /mailman/static ! ProxyPass /static ! ProxyPass /mailman3 unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/ ProxyPass /mailman unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/ #ProxyPass /mailman3 http://localhost:8000/ timeout=180 #ProxyPass /mailman http://localhost:8000/ timeout=180 #ProxyPass / http://localhost:8000/ timeout=180 </IfModule>
Mostly I can only see the "Page not found" error. So let's try just the standard config (using TCP socket) as documented and see. In the documented configuration, I can see that you do not have "ProxyPreserveHost On" in your configuration, but to be honest, I am not sure of that is the problem. Let's try doing this the standard way, according to the documentation at https://docs.mailman3.org/en/latest/install/virtualenv.html#apache-configura... : Let's also log and analyze what Apache says. Use the config below, please.
Alias /static "/local/mailman/web/static" <Directory "/local/mailman/web/static"> Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/mm3-error.log CustomLog ${APACHE_LOG_DIR}/mm3-access.log combined LogLevel info <IfModule mod_headers.c> RequestHeader unset X-Forwarded-Proto <If "%{HTTPS} =~ /on/"> RequestHeader set X-Forwarded-Proto "https" </If> </IfModule> <IfModule mod_proxy.c> ProxyPreserveHost On ProxyPass "/mailman3" "http://127.0.0.1:8000/mailman3" ProxyPass "/archives" "http://127.0.0.1:8000/archives" ProxyPass "/accounts" "http://127.0.0.1:8000/accounts" ProxyPass "/admin" "http://127.0.0.1:8000/admin" ProxyPass "/postorius" "http://127.0.0.1:8000/postorius" ProxyPass "/hyperkitty" "http://127.0.0.1:8000/hyperkitty" ProxyPass "/user-profile" "http://127.0.0.1:8000/user-profile" </IfModule>
Did you say you're logging both Mailman Core and Mailman Web to /var/log/mailman.log? Can you please separate them for clarity? Is your settings.py the same as the one at https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur... with the exception that you're using MySQL?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]
Helio Loureiro writes:
Hi,
Thanks for the tip. Now I can see hypperkitty available.
But I'm still seeing some errors.
Feb 22 14:16:56 2024 (2062795) Could not archive the message with id < AM6PR07MB592539392144457915580AF992752@ABCD.externaldomain.com>
This is likely the Microsoft bug (? that's the place I've repeatedly seen it) where the message ID is enclosed in <[...]> rather than <...>. The [] characters are forbidden in message IDs, and the email module is strict about it for some reason. If I'm correct, I think you'll find the offending message in $var_dir/archive/hyperkitty or some subdirectory, it's a regular queuefile, and you can read it with the showqfile utility to see if it's spam. Otherwise you need to edit the [] out of the message ID.
Steve
On 2/22/24 21:51, Stephen J. Turnbull wrote:
If I'm correct, I think you'll find the offending message in $var_dir/archive/hyperkitty or some subdirectory, it's a regular queuefile, and you can read it with the showqfile utility to see if it's spam. Otherwise you need to edit the [] out of the message ID.
The directory is $var_dir/archive/hyperkitty/spool/ and the command to
view the queue entry is mailman qfile path/to/file
.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 2/23/24 09:28, Mark Sapiro wrote:
On 2/22/24 21:51, Stephen J. Turnbull wrote:
If I'm correct, I think you'll find the offending message in $var_dir/archive/hyperkitty or some subdirectory, it's a regular queuefile, and you can read it with the showqfile utility to see if it's spam. Otherwise you need to edit the [] out of the message ID.
The directory is $var_dir/archive/hyperkitty/spool/ and the command to view the queue entry is
mailman qfile path/to/file
.
BTW, the issue with bogus [] delimited Message-IDs is "fixed" (actually worked around) in Mailman 3.3.9 by https://gitlab.com/mailman/mailman/-/merge_requests/1099/
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi,
This is running on the latest mailman3.
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Sun, 25 Feb 2024 at 02:52, Mark Sapiro <mark@msapiro.net> wrote:
On 2/23/24 09:28, Mark Sapiro wrote:
On 2/22/24 21:51, Stephen J. Turnbull wrote:
If I'm correct, I think you'll find the offending message in $var_dir/archive/hyperkitty or some subdirectory, it's a regular queuefile, and you can read it with the showqfile utility to see if it's spam. Otherwise you need to edit the [] out of the message ID.
The directory is $var_dir/archive/hyperkitty/spool/ and the command to view the queue entry is
mailman qfile path/to/file
.BTW, the issue with bogus [] delimited Message-IDs is "fixed" (actually worked around) in Mailman 3.3.9 by https://gitlab.com/mailman/mailman/-/merge_requests/1099/
-- 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/ Archived at: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...
This message sent to helio@loureiro.eng.br
participants (3)
-
Helio Loureiro
-
Mark Sapiro
-
Stephen J. Turnbull