missing graphics in Postorius
After installing MM3 on Debian 10 using the venv docs, no graphics appear in the admin or list pages, just broken links.
The mailmanweb log has lines like this:
ERROR 2021-12-07 06:04:10,002 18262 django.security.DisallowedHost Invalid HTTP_HOST header: '127.0.0.1'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
which is odd because there is the line for "localhost" in settings.py, and /etc/hosts correctly ties this to 127.0.0.1.
There are entries like this in /var/log/nginx/error.log saying the files just aren't there:
2021/12/06 22:00:30 [error] 18123#18123: *65 open() "/opt/mailman/web/static/postorius/img/mailman_logo_small_trans.png" failed (2: No such file or directory), client: x.x.x.x, server: somehost.example.com, request: "GET /static/postorius/img/mailman_logo_small_trans.png HTTP/2.0", host: "somehost.example.com", referrer: "https://somehost.example.com/mailman/lists/"
(I've obfuscated names and addresses here, but "somehost.example.com" refers to a valid FQDN in the log.)
I thought I'd followed all the venv docs, but the /opt/mailman/web/static/postorius directory doesn't exist. Did I miss something?
Thanks.
dn
On 12/6/21 10:15 PM, David Newman wrote:
After installing MM3 on Debian 10 using the venv docs, no graphics appear in the admin or list pages, just broken links.
The mailmanweb log has lines like this:
ERROR 2021-12-07 06:04:10,002 18262 django.security.DisallowedHost Invalid HTTP_HOST header: '127.0.0.1'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
which is odd because there is the line for "localhost" in settings.py, and /etc/hosts correctly ties this to 127.0.0.1.
Add '127.0.0.1' to ALLOWED_HOSTS anyway.
There are entries like this in /var/log/nginx/error.log saying the files just aren't there:
2021/12/06 22:00:30 [error] 18123#18123: *65 open() "/opt/mailman/web/static/postorius/img/mailman_logo_small_trans.png" failed (2: No such file or directory), client: x.x.x.x, server: somehost.example.com, request: "GET /static/postorius/img/mailman_logo_small_trans.png HTTP/2.0", host: "somehost.example.com", referrer: "https://somehost.example.com/mailman/lists/"
(I've obfuscated names and addresses here, but "somehost.example.com" refers to a valid FQDN in the log.)
I thought I'd followed all the venv docs, but the /opt/mailman/web/static/postorius directory doesn't exist. Did I miss something?
Assuming you have
STATIC_ROOT = '/opt/mailman/web/static'
in your /etc/mailman3/settings.py file, you may need to create that directory if it doesn't exist. You shouldn't need to manually create the /opt/mailman/web/static/postorius directory if the /opt/mailman/web/static directory exists and is writable/searchable by the Mailman user.
That should enable
(venv)$ mailman-web collectstatic
to populate that directory. Be sure you've run all four commands at https://docs.mailman3.org/en/latest/install/virtualenv.html#run-database-mig... et seq.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 12/7/21 11:17 AM, Mark Sapiro wrote:
On 12/6/21 10:15 PM, David Newman wrote:
After installing MM3 on Debian 10 using the venv docs, no graphics appear in the admin or list pages, just broken links.
The mailmanweb log has lines like this:
ERROR 2021-12-07 06:04:10,002 18262 django.security.DisallowedHost Invalid HTTP_HOST header: '127.0.0.1'. You may need to add '127.0.0.1' to ALLOWED_HOSTS.
which is odd because there is the line for "localhost" in settings.py, and /etc/hosts correctly ties this to 127.0.0.1.
Add '127.0.0.1' to ALLOWED_HOSTS anyway.
Done, thanks.
Given that DNS works fine on this host, with localhost and 127.0.0.1 resolving backward and forward, this seems like a bug. Shouldn't the resolver be able to recognize localhost without hard-coding an address? Particularly this address, since the IETF is considering what is IMO a crazy idea to unreserve 127/8?
https://www.ietf.org/id/draft-schoen-intarea-unicast-127-00.html
There are entries like this in /var/log/nginx/error.log saying the files just aren't there:
2021/12/06 22:00:30 [error] 18123#18123: *65 open() "/opt/mailman/web/static/postorius/img/mailman_logo_small_trans.png" failed (2: No such file or directory), client: x.x.x.x, server: somehost.example.com, request: "GET /static/postorius/img/mailman_logo_small_trans.png HTTP/2.0", host: "somehost.example.com", referrer: "https://somehost.example.com/mailman/lists/"
(I've obfuscated names and addresses here, but "somehost.example.com" refers to a valid FQDN in the log.)
I thought I'd followed all the venv docs, but the /opt/mailman/web/static/postorius directory doesn't exist. Did I miss something?
Assuming you have
STATIC_ROOT = '/opt/mailman/web/static'
in your /etc/mailman3/settings.py file, you may need to create that directory if it doesn't exist. You shouldn't need to manually create the /opt/mailman/web/static/postorius directory if the /opt/mailman/web/static directory exists and is writable/searchable by the Mailman user.
Yes, that was it. Thanks.
Previously you'd pointed out what you considered an error in the venv docs, with the workaround to manually create the /opt/mailman/web directory [1]. I think the same issue applies here, and also that /opt/mailman/web and subdirectories need to be owned by the mailman user.
Thanks again.
dn
That should enable
(venv)$ mailman-web collectstatic
to populate that directory. Be sure you've run all four commands at https://docs.mailman3.org/en/latest/install/virtualenv.html#run-database-mig... et seq.
On 12/7/21 4:01 PM, David Newman wrote:
On 12/7/21 11:17 AM, Mark Sapiro wrote:
Add '127.0.0.1' to ALLOWED_HOSTS anyway.
Done, thanks.
Given that DNS works fine on this host, with localhost and 127.0.0.1 resolving backward and forward, this seems like a bug. Shouldn't the resolver be able to recognize localhost without hard-coding an address?
It's probably a bug, but if so, it's a Django bug and not anything Mailman can do anything about.
...
Assuming you have
STATIC_ROOT = '/opt/mailman/web/static'
in your /etc/mailman3/settings.py file, you may need to create that directory if it doesn't exist. You shouldn't need to manually create the /opt/mailman/web/static/postorius directory if the /opt/mailman/web/static directory exists and is writable/searchable by the Mailman user.
Yes, that was it. Thanks.
Previously you'd pointed out what you considered an error in the venv docs, with the workaround to manually create the /opt/mailman/web directory [1]. I think the same issue applies here, and also that /opt/mailman/web and subdirectories need to be owned by the mailman user.
I don't recall what I said about that but near the end of the Initial Configuration section at https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configur... it says
Make sure that the logging path is created. You can run mkdir -p
/opt/mailman/web/logs to create the path.
I added
Also make sure the ``STATIC_ROOT`` directory is created.
after that.
As far as things being owned by the mailman user, early in the doc at https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-setup there is a note that says
Make sure that you are running commands as mailman user from here forth.
Setup Mailman user.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
David Newman
-
Mark Sapiro