Mark Sapiro wrote:
Restoring original Subject:, and doesn't this thread belong on mailman-users@msailman3.org - CCing there.
Sorry about both, Mark. I'm now here. Didn't know this one existed and was told to use the other list server.
On 1/4/20 5:47 PM, Allan Hansen wrote:
a. The server was set up with the wrong domain name (our fault), so I had to add the ‘correct’ one. I had seen the command ‘Add Domain’ in the UI and thought that would do it, but Brian kindly sent me a list of additional instructions, which we then implemented. That made it possible to create a list in the new domain, subscribe people and post messages. However, messages are not archived. What extra step is needed to enable archiving? What are the setytings in Postorius -> Settings -> Archiving? Archive policy: Private archives Archive archivers: hyperkitty, prototype
Are the messages in Mailman's var/archives/prototype/LIST@DOMAIN/new directory?
Yes! I found them. But the message files end with the name of the old host, not the new host name under the new domain.
Are there messages in Mailman's var/archives/hyperkitty/spool/ directory?
There are 5 .pck files there dated 1/5/2002.
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
But: What if we decided to have more than one domain, as the UI indicates is kosher?
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'",)
b. When I go to the server using the new domain (both before and after logging in), I see not just the lists I created in the new domain, but the lists created in the old domain. These lists of lists are domain specific and should not be listed together. That’s just IMHO, but not serious, as I will soon get rid of anything in the old domain. So feel free to ignore this one if this is intended, which I could see might be the case.
Set FILTER_VHOST = True in settings_local.py
Yes, Brian told me to do the same (well, settings.py). This is the what I wrote back: hansen@rccrmail:/opt/mailman/mm$ sudo vi settings.py Edited the setting to: # Only display mailing-lists from the same virtual host as the webserver FILTER_VHOST = True
You shouldn't edit settings.py. You should override the setting by putting it in settings_local.py.
Silly. I should have remembered that from back in the days. But if the local file is overriding, it should have worked, I'd think.
Then Brian told me to restart qcluster: hansen@rccrmail:/opt/mailman/mm$ sudo systemctl restart qcluster
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?
I then logged in, but the same lists are showing. It either takes the system a long time to reset or it has ignored the setting. Just tried it again, and the lists are all showing. Do I need to manually recompile the file?
c. I then moved on to the templates and added a template for the message text to send to new subscribers. That resulted in the following error message when I went in as moderator to approve of a new subscription: Something went wrong Mailman REST API not available. Please start Mailman core. Postorius is unable to access core's REST API. Is Mailman running? Well, I was able to post to the lists, so I assume it is. Listing at processes, I see a bunch of postgres, python3, nginx, django-adminp but nothing explicitly with a ‘mailman’ string.
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.
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).
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?
[ABH] At this point I click to accept a subsription request: ERROR 2020-01-06 07:32:41,439 699 postorius.middleware Mailman REST API not available Traceback (most recent call last): File "/opt/mailman/mm/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked, File "/opt/mailman/mm/venv/lib/python3.7/site packages/urllib3/connectionpool.py", line 421, in _make_request six.raise_from(e, None) File "<string>", line 3, in raise_from File "/opt/mailman/mm/venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 416, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.7/http/client.py", line 1321, in getresponse response.begin() File "/usr/lib/python3.7/http/client.py", line 296, in begin version, status, reason = self._read_status() File "/usr/lib/python3.7/http/client.py", line 265, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response
So yes, the REST API is not there. How can I get it going?
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
Must have found an out-of-date page. :-)
Yours,
Allan