Installation -- error on mailman-web migrate
Thank you for your reply earlier regarding "creating the mailman.cfg permissions".
Now that's clear I proceeded on through the installation instructions at:
https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-insta...
==========
Installing Web UI To install the web components, run the following commands with virtualenv activated:
root@mx:~# su mailman (venv) mailman@mx:/root$ pip install mailman-web mailman-hyperkitty (venv) mailman@mx:~$ exit exit
==========
Initial Configuration Then, create a new configuration file at /etc/mailman3/settings.py
root@mx:~# nano /etc/mailman3/settings.py
I note that in the sample "settings.py" file, there are lines that have the directory "web" in the file paths ...
STATIC_ROOT = '/opt/mailman/web/static'
LOGGING['handlers']['file']['filename'] = '/opt/mailman/web/logs/mailmanweb.log'
... but as yet there is no directory "web".
root@mx:/opt/mailman# ls -la total 44 drwxr-xr-x 6 mailman mailman 4096 Sep 17 03:52 . drwxr-xr-x 3 root root 4096 Sep 13 01:48 .. -rw------- 1 mailman mailman 308 Sep 17 04:01 .bash_history -rw-r--r-- 1 mailman mailman 220 Aug 4 22:25 .bash_logout -rw-r--r-- 1 mailman mailman 3564 Sep 17 03:47 .bashrc drwxr-xr-x 3 mailman mailman 4096 Sep 13 01:52 .cache -rw-r--r-- 1 mailman mailman 0 Aug 15 16:21 .cloud-locale-test.skip drwxr-xr-x 3 mailman mailman 4096 Sep 13 01:55 .local drwxr-xr-x 3 mailman mailman 4096 Sep 17 03:43 mm -rw-r--r-- 1 mailman mailman 807 Aug 4 22:25 .profile -rw-r--r-- 1 mailman mailman 66 Sep 17 03:52 .selected_editor drwxr-xr-x 7 mailman mailman 4096 Sep 13 01:52 venv
==========
Run database migrations
root@mx:~# su mailman (venv) mailman@mx:/root$ mailman-web migrate
Here a ton of errors get printed, but one in particular:
Traceback (most recent call last): ... FileNotFoundError: [Errno 2] No such file or directory: '/opt/mailman/web/logs/mailmanweb.log' ...
==========
Was I meant to create the directories "web/logs/" and the "mailmanweb.log" file at some point, or were they meant to get created during the mailman-web install process?
Should the owner/group be "mailman"?
On 9/16/21 7:27 PM, Mark Dale via Mailman-users wrote:
I note that in the sample "settings.py" file, there are lines that have the directory "web" in the file paths ...
STATIC_ROOT = '/opt/mailman/web/static'
LOGGING['handlers']['file']['filename'] = '/opt/mailman/web/logs/mailmanweb.log'
... but as yet there is no directory "web".
This appears to be an error in the docs. With
[paths.here]
var_dir: /opt/mailman/mm/var
[mailman]
layout: here
The logs are in /opt/mailman/mm/var/logs/
, not
/opt/mailman/web/logs/
and STATIC_ROOT
should probably be
/opt/mailman/mm/static
, but it could also be /opt/mailman/mm/var/static
.
Was I meant to create the directories "web/logs/" and the "mailmanweb.log" file at some point, or were they meant to get created during the mailman-web install process?
They should be created automatically, but in var_dir
which is
/opt/mailman/mm/var
, not /opt/mailman/web
Should the owner/group be "mailman"?
Yes
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 9/16/21 8:11 PM, Mark Sapiro wrote:
On 9/16/21 7:27 PM, Mark Dale via Mailman-users wrote:
Was I meant to create the directories "web/logs/" and the "mailmanweb.log" file at some point, or were they meant to get created during the mailman-web install process?
They should be created automatically, but in
var_dir
which is/opt/mailman/mm/var
, not/opt/mailman/web
Should the owner/group be "mailman"?
Yes
Actually, upon reflection, the paths in the doc will work as var_dir
only affects Mailman core and the settings.py file is for Django. What's
missing is that you would need to create the directories
/opt/mailman/web/
and /opt/mailman/web/logs
manually.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 9/16/21 8:11 PM, Mark Sapiro wrote:
Actually, upon reflection, the paths in the doc will work as var_dir only affects Mailman core and the settings.py file is for Django. What's missing is that you would need to create the directories
/opt/mailman/web/
and/opt/mailman/web/logs
manually.
Thanks. And done.
root@mx:/opt/mailman# mkdir web root@mx:/opt/mailman# mkdir web/logs root@mx:/opt/mailman# chown -R mailman:mailman web
An update. More on following the installation instructions at:
https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-insta...
==========
I found the mailmanweb.log at "/opt/mailman/mm/var/logs" rather than "/opt/mailman/web/logs".
So I edited the file -- /etc/mailman3/settings.py ...
#STATIC_ROOT = '/opt/mailman/web/static' STATIC_ROOT = '/opt/mailman/mm/var/static'
#LOGGING['handlers']['file']['filename'] = '/opt/mailman/web/logs/mailmanweb.log' LOGGING['handlers']['file']['filename'] = '/opt/mailman/mm/var/logs/mailmanweb.log'
... and re-ran the "mailman-web migrate" ...
root@mx:~# su mailman (venv) mailman@mx:/root$ mailman-web migrate
... and then at the beginning of many errors printed to screen I now have...
/opt/mailman/venv/lib/python3.9/site-packages/django_q/conf.py:139: UserWarning: Retry and timeout are misconfigured. Set retry larger than timeout, failure to do so will cause the tasks to be retriggered before completion. See https://django-q.readthedocs.io/en/latest/configure.html#retry for details.
Completely not comprehending the above doc (and being absolutely clueless about django), I blindly added "retry: 30" ...
root@mx:~# nano -c /opt/mailman/venv/lib/python3.9/site-packages/django_q/tests/settings.py
# Django Q specific Q_CLUSTER = { "name": "django_q_test", "cpu_affinity": 1, "testing": True, "log_level": "DEBUG", "django_redis": "default", "retry": 30, }
... but no joy. Is it me or are there some pieces missing from the documentation?
On 9/16/21 8:43 PM, Mark Dale via Mailman-users wrote:
... and then at the beginning of many errors printed to screen I now have...
/opt/mailman/venv/lib/python3.9/site-packages/django_q/conf.py:139: UserWarning: Retry and timeout are misconfigured. Set retry larger than timeout, failure to do so will cause the tasks to be retriggered before completion. See https://django-q.readthedocs.io/en/latest/configure.html#retry for details.
The current version of mailman_web/settings/mailman.py has
Q_CLUSTER = {
'retry': 360,
'timeout': 300,
'save_limit': 100,
'orm': 'default',
}
Earlier versions omitted the 'retry': 360
which is the issue.
Completely not comprehending the above doc (and being absolutely clueless about django), I blindly added "retry: 30" ...
root@mx:~# nano -c /opt/mailman/venv/lib/python3.9/site-packages/django_q/tests/settings.py
# Django Q specific Q_CLUSTER = { "name": "django_q_test", "cpu_affinity": 1, "testing": True, "log_level": "DEBUG", "django_redis": "default", "retry": 30,
Make that "retry": 360,
}
... but no joy. Is it me or are there some pieces missing from the documentation?
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/
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Dale
-
Mark Sapiro