Restoring original Subject:, and doesn't this thread belong on mailman-us...@msailman3.org - CCing there.
On 1/5/20 11:51 PM, Allan Hansen wrote: > > Thanks again, Mark! > My responses below. > >> 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? Are there messages in Mailman's var/archives/hyperkitty/spool/ directory? What's the setting for base_url in mailman-hyperkitty.cfg? Are there any errors in var/logs/mailman.log? >>> b. When 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. 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. > 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. > 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. >> 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. 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. > [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. > Before we added the new domain, I was able to accept subscription requests to > the previous domain’s lists. No more. > > Yours, > > Allan -- Mark Sapiro <m...@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/archive%40jab.org