Hi,
Indeed it was the configuration. It was placed into /etc/mailman3/mailman-web.py. After a I changed to /etc/mailman3/settings.py a few things advanced a little bit more.
I had to figure out how to fix mysqlclient installation since there isn't a mention about it and the simple "pip install mysqclient" was breaking with pkg-config issues. But it did work at the end.
Now I can see further messages on mailman3-web than before.
(venv) mailman@new-server ~ (v3.3.9)> 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.0004_alter_emailaddress_drop_unique_email...Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) 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 257, in query _mysql.connection.query(self, query) MySQLdb.OperationalError: (2013, 'Lost connection to MySQL server during query')
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 235, in database_forwards schema_editor.alter_field(from_model, from_field, to_field) File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 788, in alter_field self._alter_field( File "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py", line 858, in _alter_field self.execute(self._delete_unique_sql(model, constraint_name)) 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 89, in _execute return self.cursor.execute(sql, params) 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 257, in query _mysql.connection.query(self, query) django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')
Which seems to be complaining with DB credentials. But they're properly set and it works via mysql command line.
(venv) mailman@new-server ~ (v3.3.9)> mysql -umailman3web -p mailman3web Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 32 Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [mailman3web]> show tables; +-------------------------------+ | Tables_in_mailman3web | +-------------------------------+ | account_emailaddress | | account_emailconfirmation | | auth_group | | auth_group_permissions | | auth_permission | | auth_user | | auth_user_groups | | auth_user_user_permissions | | django_admin_log | | django_content_type | | django_mailman3_maildomain | | django_mailman3_profile | | django_migrations | | django_q_ormq | | django_q_schedule | | django_q_task | | django_session | | django_site | | hyperkitty_attachment | | hyperkitty_email | | hyperkitty_favorite | | hyperkitty_lastview | | hyperkitty_mailinglist | | hyperkitty_profile | | hyperkitty_sender | | hyperkitty_tag | | hyperkitty_tagging | | hyperkitty_thread | | hyperkitty_threadcategory | | hyperkitty_vote | | socialaccount_socialaccount | | socialaccount_socialapp | | socialaccount_socialapp_sites | | socialaccount_socialtoken | +-------------------------------+ 34 rows in set (0.000 sec)
On the /etc/mailman3/settings.py:
(venv) mailman@seliius26224 ~ (v3.3.9)> cat /etc/mailman3/settings.py | grep -v "#" | grep -v '^$' from mailman_web.settings.base import * from mailman_web.settings.mailman import * ADMINS = ( ('Mailman Suite Admin', 'root@localhost'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mailman3web', 'USER': 'mailman3web', 'PASSWORD': '*******************', 'HOST': 'localhost', 'PORT': '3306', } } STATIC_ROOT = '/local/mailman/web/static' COMPRESS_ENABLED = True LOGGING['handlers']['file']['filename'] = '/local/mailman/web/logs/mailmanweb.log' ALLOWED_HOSTS = [ "127.0.0.1", "*" ] CSRF_TRUSTED_ORIGINS = [ ] SITE_ID = 1 SECRET_KEY = '****************************************' DEFAULT_FROM_EMAIL = 'admin@mailman.domain.com' SERVER_EMAIL = 'admin@mailman.domain.com' MAILMAN_REST_API_URL = 'http://localhost:8001' MAILMAN_REST_API_USER = 'restadmin' MAILMAN_REST_API_PASS = '***************************' MAILMAN_ARCHIVER_KEY = '****************************' MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1', '1.2.3.4') HAYSTACK_CONNECTIONS = { 'default': { 'PATH': "/opt/mailman/web/xapian_index", 'ENGINE': 'xapian_backend.XapianEngine' }, }
And /local/mailman/web/logs/mailmanweb.log is empty.
Best Regards, Helio Loureiro https://helio.loureiro.eng.br https://github.com/helioloureiro https://mastodon.social/@helioloureiro
On Sun, 17 Dec 2023 at 16:35, Mark Sapiro <mark@msapiro.net> wrote:
On 12/16/23 10:12 AM, Helio Loureiro wrote:
Hi,
Well... not that good. Now it is mailman3-web that doesn't work.
mailman@new-machine ~ (v3.3.9)> source venv/bin/activate.fish (venv) mailman@new-machine ~ (v3.3.9)> mailman-web
Type 'mailman-web help <subcommand>' for help on a specific subcommand.
Available subcommands:
[django] check compilemessages createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages makemigrations migrate optimizemigration runserver sendtestemail shell showmigrations sqlflush sqlmigrate sqlsequencereset squashmigrations startapp startproject test testserver
This response indicates that
mailman-web
is not getting settings.py. Have you configured /etc/mailman3/settings.py? See < https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur....
(venv) mailman@new-machine ~ (v3.3.9)> mailman-web check System check identified no issues (0 silenced). (venv) mailman@new-machine ~ (v3.3.9)> mailman-web check migrate
You should run
mailman-web migrate
notmailman-web check migrate
plus others. See < https://docs.mailman3.org/en/latest/install/virtualenv.html#run-database-mig...>et.seq. but first you need the appropriate settings so
mailman-web
returns something like$ mailman-web Type 'mailman-web help <subcommand>' for help on a specific subcommand. Available subcommands: [account] account_unsetmultipleprimaryemails [auth] changepassword createsuperuser [compressor] compress mtime_cache [contenttypes] remove_stale_contenttypes [django] check compilemessages createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages makemigrations migrate optimizemigration sendtestemail shell showmigrations sqlflush sqlmigrate sqlsequencereset squashmigrations startapp startproject test testserver [django_extensions] admin_generator clean_pyc clear_cache compile_pyc create_command create_jobs create_template_tags delete_squashed_migrations describe_form drop_test_database dumpscript export_emails find_template generate_password generate_secret_key graph_models list_model_info list_signals mail_debug managestate merge_model_instances notes pipchecker print_settings print_user_for_session raise_test_exception reset_db reset_schema runjob runjobs runprofileserver runscript runserver_plus set_default_site set_fake_emails set_fake_passwords shell_plus show_template_tags show_urls sqlcreate sqldiff sqldsn sync_s3 syncdata unreferenced_files update_permissions validate_templates [django_q] qcluster qinfo qmemory qmonitor [haystack] build_solr_schema clear_index haystack_info rebuild_index update_index [hyperkitty] attachments_to_file hyperkitty_import hyperkitty_warm_up_cache mailman_sync update_index_one_list [postorius] mmclient reset_passwords [rest_framework] generateschema [sessions] clearsessions [staticfiles] collectstatic findstatic runserver
-- 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