Closed olivluca closed 1 year ago
@FaharAbbasRizvi , Can you please verify it once?
In case it's relevant (it probably is) it's the only package I installed (neither pgadmin4 nor pgadmin4-desktop) and I'm running under uwsgi with this ini file:
[uwsgi]
processes = 1
threads = 25
chdir = /usr/pgadmin4/web/
wsgi-file = /usr/pgadmin4/web/pgAdmin4.wsgi
uid = pgadmin4
plugins = python3
mount=/pgadmin=pgAdmin4:app
virtualenv=/usr/pgadmin4/venv
manage-script-name = true
(the wsgi-file is the one provided by the package)
I am not able to reproduce the issue on Debian 11
Could you please share the exact step to reproduce?
I've got the same issue here, everything's fine using pgadmin4-server apt package version 7.4 on Bebian 11 with python 3.9.2. But when I upgrade to pgadmin4-server 7.6, my uWSGI service pops up with the same error:
My PgAdmin server runs through Systemd-uWSGI-Nginx.
I am not able to reproduce the issue on Debian 11
Mhh, the mail I received from github said "I am able to reproduce the issue" so I disregarded it :cry:
Could you please share the exact step to reproduce?
I just installed the package pgadmin4-server, configured it to run under uwsgi (package uwsgi) with the configuration file posted above, then in one nginx server (package nginx-extras) I have this snippet
location = /pgadmin4 {
return 301 /pgadmin/;
}
location ^~ /pgadmin {
include snippets/lemon.conf;
include uwsgi_params;
uwsgi_param REMOTE_USER $lmremote_user;
uwsgi_pass unix:/run/uwsgi/app/pgadmin4/socket;
}
snippets/lemon.conf is for the lemonldap authentication portal, however I also tested with an hardcoded user and no authentication
location ^~ /pgadmin {
include uwsgi_params;
uwsgi_param REMOTE_USER luca;
uwsgi_pass unix:/run/uwsgi/app/pgadmin4/socket;
}
uwsgi_params is unmodified from the nginx-common package
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;
My Nginx configuration is different `upstream pgadmin { server unix:///run/pgadmin4/pgadmin4.sock; } [...]
location ^~ /pgadmin { include uwsgi_params; uwsgi_pass pgadmin; } ` Although I don't think it really matters regarding this issue, also I'm not a Python ninja so...
Issue is due to cryptography version. Downgrading version to 40.0.2, issue is resolved.
This can be fixed only after - https://github.com/pyca/cryptography/issues/9016. Issue is only reproducible if pgAdmin launched using uWSGI service/uwsgi module installed in venv.
For the time being could you do the same as in this commit (mentioned in that bug report)? https://github.com/zigbeefordomoticz/Domoticz-Zigbee/commit/f8d16ff995207e162cf44812cb49e3b523182822
Tested and verified on Snapshot build: https://www.postgresql.org/ftp/pgadmin/pgadmin4/snapshots/2023-09-29/ Environment: Debian 11(Bullseye) amd64->pgAdmin 4 Server mode
Thank you for fixing it.
The issue reappeared in debian 11 packages for versions 8.0, 8.1 and 8.2 :disappointed: Back to 7.8 (after manually correcting issue #6874)
Versions 7.5 and 7.6 of the pgadmin4-server package for debian 11 don't work. The traceback in the log is
Version 7.4 of the package works.