Hi Stephen,
Thanks for your explanation.
Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> 於 2019年10月29日 週二 下午1:35寫道:
Franklin Weng writes:
However in the Archive section I couldn't see anything and all the lists were "inactive" and hence were hidden by default.
If you can see that much, HyperKitty is running.
Have you sent mail to the lists? Has it been delivered to subscribers?
Yes, mails to subscribers were delivered successfully.
I confirmed that api_key set in the /etc/mailman3/mailman-hyperkitty.cfg and /etc/mailman3/mailman-web.py is the same. I also confirmed that the apache2 wsgi module has been loaded.
In the mailman.cfg database is set to mysql and in the mailman-web.py database is set to sqlite3. Does it matter?
I don't think they need to be the same. The HyperKitty and Postorius databases are a Django database backed by an RDBMS (typically sqlite3, PostgreSQL, or MySQL). The databases used by the Mailman core and the Django webservices HyperKitty and Postorius are conceptually separate, although they can be backed by the same RDBMS server.
As Tamas has said in the previous reply, my mailman is a fresh new install on Debian buster. I followed Debian.README and didn't change much. In Debian's setting, under /usr/share/mailman3-web/ are these files:
manage.py settings_local.py -> /etc/mailman3/mailman-web.py settings_local.py.sample settings.py urls.py wsgi.py
In the top of settings_locas.py there are comments saying that this file is to override default settings in /usr/share/mailman3-web/settings.py, so I suppose hyperkitty database should define here, though it is different from /usr/share/mailman3-web/settings.py.
However, sqlite3 is likely to result in poor performance compared to PostgreSQL or MySQL.
You have to configure HyperKitty's database. In my sqlite3 test installation it looks like this:
# Top of settings.py. BASE_DIR is the directory containing settings.py. BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# 30-50 lines later: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # This database file is in the same directory as settings.py. 'NAME': os.path.join(BASE_DIR, 'hyperkitty.db'), # Not used with sqlite3: 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } }
Does the database file named by 'NAME' exist?
In the settings_local.py, it defines sqliet3 and the file of 'NAME' /var/lib/mailman3/web/mailman3web.db exists and is a sqlite3 format file. But in settings.py (which is supposed to be overridden by setting_local.py) it defines using postgresql, which doesn't exist in my Debian system.
There is no systemd service for Hyperkitty. systemd runs Apache, which loads mod_wsgi, which runs Python, which imports the HyperKitty package, which responds to web requests by building pages dynamically using Django from information from Django's database, which may be backed by MySQL, PostgreSQL, or sqlite3. Sounds complicated, but it performs well once you get it properly configured.
Is there any log I can trace the executing path? It looks not complicated but I didn't know and couldn't find out how to check if it works correctly. For Apache2 mod_wsgi, the wsgi.conf in mods-enabled does not enable any configuration (all commented out) and when I use ps to check, uwsgi runs as:
14233 ? Ss 0:01 /usr/bin/uwsgi --plugin python3 --ini /etc/mailman3/uwsgi.ini 14236 ? Sl 0:00 /usr/bin/uwsgi --plugin python3 --ini /etc/mailman3/uwsgi.ini
The /var/log/mailman3/web/mailman-web.log is at https://pastebin.com/U3jHR6JS There seems to be something running but in the interface I still didn't see any results.
Franklin