On 1/6/20 11:16 PM, hansen@rc.org wrote:
Mark Sapiro wrote:
What's the setting for base_url in mailman-hyperkitty.cfg?
It's base_url: https://<OLDHOSTNAME>/archives
I suppose it should be changed to base_url: https://<NEWHOSTNAME>/archives
That's part of it, but see below.
But: What if we decided to have more than one domain, as the UI indicates is kosher?
Again, see below.
Are there any errors in var/logs/mailman.log?
Yep. Lots. They all are of this nature:
Exception in "hyperkitty" archiver Traceback: ... File "/opt/mailman/mm/venv/lib/python3.7/site-packages/urllib3/connection.py", line 430, in _match_hostname match_hostname(cert, asserted_hostname) File "/usr/lib/python3.7/ssl.py", line 327, in match_hostname % (hostname, dnsnames[0])) ssl.SSLCertVerificationError: ("hostname 'OLDHOSTNAME' doesn't match 'NEWHOSTNAME'",)
OK. So the real issue is you are trying to access HyperKitty via an https URL and the certificate presented by the web server doesn't allow the domain in the URL. The domain in the URL doesn't really matter as long as it resolves to the HyperKitty host, but if it's an https URL the host's certificate must include that domain.
It looks like in your case, the certificate is for 'NEWHOSTNAME', so setting
base_url: https://<NEWHOSTNAME>/archives
should be enough
qcluster is not what you need to restart. You need to restart whatever is supporting the wsgi interface to Django. This may be uwsgi or gunicorn or ??. Whatever it is, that's what needs to be restarted.
Beats me, Mark. Brian, do you know?
Brian has answered:
systemctl restart gunicorn
If you do ps ax|grep runner=, what do you see? If you don't see at least three processes with --runner=rest:0:1, stop Mailman and start Mailman.
Yep. I did not get the whole string before. With your options I see three of these rest:0:1 processes. So I guess the REST stuff is running anyway.
OK
If so, what's in /opt/mailman/mm/var/logs/mailmansuite.log or whatever it's called - defined as filename in the file handler in the LOGGING definition in settings(_local).py.
hansen@rccrmail:/opt/mailman/mm/logs$ tail -f mailmansuite.log return Site.objects.get_current(request) File "/opt/mailman/mm/venv/lib/python3.7/site-packages/django/contrib/sites/models.py", line 60, in get_current return self._get_site_by_request(request) File "/opt/mailman/mm/venv/lib/python3.7/site-packages/django/contrib/sites/models.py", line 45, in _get_site_by_request SITE_CACHE[domain] = self.get(domain__iexact=domain) File "/opt/mailman/mm/venv/lib/python3.7/site-packages/django/db/models/manager.py", line 82, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/opt/mailman/mm/venv/lib/python3.7/site-packages/django/db/models/query.py", line 408, in get self.model._meta.object_name django.contrib.sites.models.Site.DoesNotExist: Site matching query does not exist.
This is because of the domain change. In settings(_local).py you have a setting for SITE_ID. Possibly, setting that in settings_local.py to a value one greater that the current setting will do.
Trying setting it to 1 (it was 0 before).
OK. You can just shotgun trying numbers until one works, or
To be certain of the correct value, you need to look at the django_site table in mailman's database. That table has 3 columns, id, domain and name. The id for the row of your domain is what needs to be set as SITE_ID.
You lost me here. No idea how to access the Mailman database. Brian, do you know?
It depends on the database engine. In the database section in your mailman.cfg there is a class: definition which will mention sqlite, mysql or postgresql. The tools for interacting with these are sqlite3, mysql and psql respectively.
Stop Mailman and then start it.
No idea here, either. I looked online and found this:
$ from mailman.commands.cli_control import Stop But it complained: from: too many arguments
That's a Python statement, not a shell command.
You would do
systemctl stop mailman systemctl start mailman
alternatively, you could do
/path/to/bin/mailman stop /path/to/bin/mailman start
but that appears to not be the issue.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan