admin/login/ cannot be accessed
Ubuntu 20.04 python3-django 2:2.2.6-1ubuntu1 python3-django-hyperkitty 1.3.1 (built from sources) mailman3-full 3.2.2-1
Nginx server configuration:
...
########
# Static
########
location /favicon.ico
{
alias <mysite_dir>/static/hyperkitty/img/favicon.ico;
}
location /static/favicon.ico
{
alias <mysite_dir>/static/postorius/img/favicon.ico;
}
location /static/
{
alias <mysite_dir>/static/;
}
#######################
# Upstream uwsgi server
#######################
location /
{
include /etc/nginx/uwsgi_params;
uwsgi_pass 127.0.0.1:<uwsgi_server_port>;
}
...
where:
- <mysite_dir> is a symlink to <django_dir>/static
- <uwsgi_server_port> matches the one defined in
/etc/mailman3/uwsgi.ini
:
[uwsgi]
# Port on which uwsgi will be listening.
uwsgi-socket = 127.0.0.1:<uwsgi_server_port>
All 3 systemd services run fine:
- mailman3
- mailman3-web
- qcluster
I'm trying to login to the django administration pages. I get the django administration login page at: https://mysite/admin/login/ Logging in with the admin credentials leads to:
This site can’t be reached
The webpage at https://mysite/admin/login/ might be temporarily down or it may have moved permanently to a new web address.
ERR_HTTP2_PROTOCOL_ERROR
This is very strange because it is the URL which I used to get the login page in the first place.
If I launch a test web server at another port with:
<django_dir># python3 manage.py runserver <mysite_ip_address>:8080
Performing system checks...
System check identified no issues (0 silenced).
December 11, 2019 - 17:50:48
Django version 2.2.6, using settings 'settings'
Starting development server at http://<mysite_ip_address>:8080/
Quit the server with CONTROL-C.
and access it at http://<mysite_ip_address>:8080/admin/login/
to login with the same credentials as before, I get through and all the django administration lines appear, although in a degraded layout:
Site administration
Accounts
Email addresses Add Change
Authentication and Authorization
Groups Add Change
Users Add Change
Django Mailman 3
Mail domains Add Change
Profiles Add Change
...
Any idea what could be happening here?
On Wed, Dec 11, 2019, at 9:25 AM, jean-christophe manciot wrote:
Ubuntu 20.04 python3-django 2:2.2.6-1ubuntu1 python3-django-hyperkitty 1.3.1 (built from sources) mailman3-full 3.2.2-1
Which version of Django are you using?
Nginx server configuration:
... ######## # Static ######## location /favicon.ico { alias <mysite_dir>/static/hyperkitty/img/favicon.ico; } location /static/favicon.ico { alias <mysite_dir>/static/postorius/img/favicon.ico; } location /static/ { alias <mysite_dir>/static/; } ####################### # Upstream uwsgi server ####################### location / { include /etc/nginx/uwsgi_params; uwsgi_pass 127.0.0.1:<uwsgi_server_port>; } ...
where:
- <mysite_dir> is a symlink to <django_dir>/static
- <uwsgi_server_port> matches the one defined in
/etc/mailman3/uwsgi.ini
:[uwsgi] # Port on which uwsgi will be listening. uwsgi-socket = 127.0.0.1:<uwsgi_server_port>
The config looks good to me in a quick glance.
All 3 systemd services run fine:
- mailman3
- mailman3-web
- qcluster
I'm trying to login to the django administration pages. I get the django administration login page at: https://mysite/admin/login/ Logging in with the admin credentials leads to:
This site can’t be reached The webpage at https://mysite/admin/login/ might be temporarily down or it may have moved permanently to a new web address. ERR_HTTP2_PROTOCOL_ERROR
This is very strange because it is the URL which I used to get the login page in the first place.
Looking at the error, it seems like something somewhere is re-directing to HTTP/2 or the request is based off of HTTP/2 and all the components in the stack don't support HTTP/2, leading to the error message.
I haven't played a lot with HTTP/2 yet so I am not sure which specific component in the stack could be incompatible here.
If I launch a test web server at another port with:
<django_dir># python3 manage.py runserver <mysite_ip_address>:8080 Performing system checks... System check identified no issues (0 silenced). December 11, 2019 - 17:50:48 Django version 2.2.6, using settings 'settings' Starting development server at http://<mysite_ip_address>:8080/ Quit the server with CONTROL-C.
and access it at
http://<mysite_ip_address>:8080/admin/login/
to login with the same credentials as before, I get through and all the django administration lines appear, although in a degraded layout:Site administration Accounts Email addresses Add Change Authentication and Authorization Groups Add Change Users Add Change Django Mailman 3 Mail domains Add Change Profiles Add Change ...
Any idea what could be happening here?
Degraded layout is due to missing static files since the development server that you spun off doesn't serve static files. So, that is okay.
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/
-- thanks, Abhilash Raj (maxking)
- Django version is 2.2.6-1ubuntu1
- Disabling HTTP2 in nginx means disabling it for all server blocks listening on the same IP, which would degrade all other servers.
- Doing so leads to another error: This page isn’t working <mysite> didn’t send any data. ERR_EMPTY_RESPONSE
- I cannot run nginx and apache on the same <ip_address>:443 port either.
I found no error in mailman3 or syslog logs.
In /etc/mailman3/mailman.cfg
, I have:
[logging.debian]
format: %(asctime)s (%(process)d) %(message)s
datefmt: %b %d %H:%M:%S %Y
propagate: no
level: debug
path: mailman.log
Yet, mailman.log does not seem to show debug level information.
On Wed, Dec 11, 2019 at 7:04 PM Abhilash Raj <maxking@asynchronous.in> wrote:
On Wed, Dec 11, 2019, at 9:25 AM, jean-christophe manciot wrote:
Ubuntu 20.04 python3-django 2:2.2.6-1ubuntu1 python3-django-hyperkitty 1.3.1 (built from sources) mailman3-full 3.2.2-1
Which version of Django are you using?
Nginx server configuration:
... ######## # Static ######## location /favicon.ico { alias <mysite_dir>/static/hyperkitty/img/favicon.ico; } location /static/favicon.ico { alias <mysite_dir>/static/postorius/img/favicon.ico; } location /static/ { alias <mysite_dir>/static/; } ####################### # Upstream uwsgi server ####################### location / { include /etc/nginx/uwsgi_params; uwsgi_pass 127.0.0.1:<uwsgi_server_port>; } ...
where:
- <mysite_dir> is a symlink to <django_dir>/static
- <uwsgi_server_port> matches the one defined in
/etc/mailman3/uwsgi.ini
:[uwsgi] # Port on which uwsgi will be listening. uwsgi-socket = 127.0.0.1:<uwsgi_server_port>
The config looks good to me in a quick glance.
All 3 systemd services run fine:
- mailman3
- mailman3-web
- qcluster
I'm trying to login to the django administration pages. I get the django administration login page at: https://mysite/admin/login/ Logging in with the admin credentials leads to:
This site can’t be reached The webpage at https://mysite/admin/login/ might be temporarily down or it may have moved permanently to a new web address. ERR_HTTP2_PROTOCOL_ERROR
This is very strange because it is the URL which I used to get the login page in the first place.
Looking at the error, it seems like something somewhere is re-directing to HTTP/2 or the request is based off of HTTP/2 and all the components in the stack don't support HTTP/2, leading to the error message.
I haven't played a lot with HTTP/2 yet so I am not sure which specific component in the stack could be incompatible here.
If I launch a test web server at another port with:
<django_dir># python3 manage.py runserver <mysite_ip_address>:8080 Performing system checks... System check identified no issues (0 silenced). December 11, 2019 - 17:50:48 Django version 2.2.6, using settings 'settings' Starting development server at http://<mysite_ip_address>:8080/ Quit the server with CONTROL-C.
and access it at
http://<mysite_ip_address>:8080/admin/login/
to login with the same credentials as before, I get through and all the django administration lines appear, although in a degraded layout:Site administration Accounts Email addresses Add Change Authentication and Authorization Groups Add Change Users Add Change Django Mailman 3 Mail domains Add Change Profiles Add Change ...
Any idea what could be happening here?
Degraded layout is due to missing static files since the development server that you spun off doesn't serve static files. So, that is okay.
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/
-- thanks, Abhilash Raj (maxking)
-- Jean-Christophe
On Thu, Dec 12, 2019, at 2:37 AM, jean-christophe manciot wrote:
- Django version is 2.2.6-1ubuntu1
- Disabling HTTP2 in nginx means disabling it for all server blocks listening on the same IP, which would degrade all other servers.
- Doing so leads to another error: This page isn’t working <mysite> didn’t send any data. ERR_EMPTY_RESPONSE
- I cannot run nginx and apache on the same <ip_address>:443 port either.
I found no error in mailman3 or syslog logs. In
/etc/mailman3/mailman.cfg
, I have:[logging.debian] format: %(asctime)s (%(process)d) %(message)s datefmt: %b %d %H:%M:%S %Y propagate: no level: debug path: mailman.log
Yet, mailman.log does not seem to show debug level information.
mailman.log is only a log file for the Core. Since you are having issues with Django, the requests aren't even touch Mailman Core.
Depending on how you are deploying, you should look at mailman-web.log or whatever the name of the log file is. You can find it in the Django settings.
On Wed, Dec 11, 2019 at 7:04 PM Abhilash Raj <maxking@asynchronous.in> wrote:
On Wed, Dec 11, 2019, at 9:25 AM, jean-christophe manciot wrote:
Ubuntu 20.04 python3-django 2:2.2.6-1ubuntu1 python3-django-hyperkitty 1.3.1 (built from sources) mailman3-full 3.2.2-1
Which version of Django are you using?
Nginx server configuration:
... ######## # Static ######## location /favicon.ico { alias <mysite_dir>/static/hyperkitty/img/favicon.ico; } location /static/favicon.ico { alias <mysite_dir>/static/postorius/img/favicon.ico; } location /static/ { alias <mysite_dir>/static/; } ####################### # Upstream uwsgi server ####################### location / { include /etc/nginx/uwsgi_params; uwsgi_pass 127.0.0.1:<uwsgi_server_port>; } ...
where:
- <mysite_dir> is a symlink to <django_dir>/static
- <uwsgi_server_port> matches the one defined in
/etc/mailman3/uwsgi.ini
:[uwsgi] # Port on which uwsgi will be listening. uwsgi-socket = 127.0.0.1:<uwsgi_server_port>
The config looks good to me in a quick glance.
All 3 systemd services run fine:
- mailman3
- mailman3-web
- qcluster
I'm trying to login to the django administration pages. I get the django administration login page at: https://mysite/admin/login/ Logging in with the admin credentials leads to:
This site can’t be reached The webpage at https://mysite/admin/login/ might be temporarily down or it may have moved permanently to a new web address. ERR_HTTP2_PROTOCOL_ERROR
This is very strange because it is the URL which I used to get the login page in the first place.
Looking at the error, it seems like something somewhere is re-directing to HTTP/2 or the request is based off of HTTP/2 and all the components in the stack don't support HTTP/2, leading to the error message.
I haven't played a lot with HTTP/2 yet so I am not sure which specific component in the stack could be incompatible here.
If I launch a test web server at another port with:
<django_dir># python3 manage.py runserver <mysite_ip_address>:8080 Performing system checks... System check identified no issues (0 silenced). December 11, 2019 - 17:50:48 Django version 2.2.6, using settings 'settings' Starting development server at http://<mysite_ip_address>:8080/ Quit the server with CONTROL-C.
and access it at
http://<mysite_ip_address>:8080/admin/login/
to login with the same credentials as before, I get through and all the django administration lines appear, although in a degraded layout:Site administration Accounts Email addresses Add Change Authentication and Authorization Groups Add Change Users Add Change Django Mailman 3 Mail domains Add Change Profiles Add Change ...
Any idea what could be happening here?
Degraded layout is due to missing static files since the development server that you spun off doesn't serve static files. So, that is okay.
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/
-- thanks, Abhilash Raj (maxking)
-- Jean-Christophe
-- thanks, Abhilash Raj (maxking)
I don't see anything special in mailman-web.log. When getting the Django login page with HTTP2:
[pid: 811818|app: 0|req: 6/6] <mysite_ip_address> () {50 vars in 941 bytes} [Sat Dec 14 12:25:33 2019] GET /admin/login/ => generated 1806 bytes in 15 msecs (HTTP/2.0 200) 8 headers in 434 bytes (1 switches on core 1)
When getting the Django login page without HTTP2:
[pid: 811818|app: 0|req: 7/7] <mysite_ip_address> () {54 vars in 1001 bytes} [Sat Dec 14 12:31:40 2019] GET /admin/login/ => generated 1806 bytes in 16 msecs (HTTP/1.1 200) 8 headers in 434 bytes (1 switches on core 0)
Nothing is logged with/without HTTP2 when I try to enter the admin account credentials and hit "Log in", which is coherent with my previous post about tcpdump. As if nginx did not send the credentials to uwsgi. This makes no sense.
The following is the contents of /etc/nginx/uwsgi_params
which is included in the server block;
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REQUEST_SCHEME $scheme;
uwsgi_param HTTPS $https if_not_empty;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;
Is there something incompatible here?
My bad. Enabling debug mode in nginx revealed the root cause: I had a filter in place preventing any POST from getting through, which is obviously needed here. I can even make it work with HTTP2, at least as far as the Django administration is concerned. Also, the layout is perfect now.
Removing http2 from all server blocks which share the same IP address and listening on uwsgi-socket with tcpdump:
# tcpdump -i lo --direction=inout 'tcp port <uwsgi_server_port>'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes
When launching https://mysite/admin/login to get the login screen, the conversation appears with 127.0.0.1:<uwsgi_server_port>:
11:45:31.322143 IP localhost.46912 > localhost.<uwsgi_server_port>: Flags [S], seq 138343284, win 43690, options [mss 65495,sackOK,TS val 2322576143 ecr 0,nop,wscale 7], length 0
11:45:31.322241 IP localhost.<uwsgi_server_port> > localhost.46912: Flags [S.], seq 204629092, ack 138343285, win 43690, options [mss 65495,sackOK,TS val 2322576143 ecr 2322576143,nop,wscale 7], length 0
...
When I enter the admin account credentials and hit login, no communication is detected by tcpdump: how can this be possible?
participants (2)
-
Abhilash Raj
-
jean-christophe manciot