New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uwsgi + nginx db backup does not work (RM #7580) #5230
Comments
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-1 Hi, From the logs, it looks like the python executable taken as '/path/to/uwsgi' which is incorrect. Can you please check PYTHON_HOME env var? Redmine ticket header update:
|
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-2 Hi, I have no env var PYTHON_HOME. pgadmin4 is running from a virtualenv by the way. And uwsgi was installed for my user via pip install |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-3 Redmine ticket header update:
|
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-4 Redmine ticket header update:
|
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-5 Redmine ticket header update:
|
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-6 Applied in changeset commit:9a317f3ba6f68d1ede2a485e4218bf96fe377513. Redmine ticket header update:
|
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-7 Redmine ticket header update:
|
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-8 Hi, very cool that you work an that issue 🙂. I was Looking at the changes made here: https://redmine.postgresql.org/projects/pgadmin4/repository/2/revisions/9a317f3ba6f68d1ede2a485e4218bf96fe377513/diff/web/pgadmin/misc/bgprocess/processes.py And was thinking if it could be wrong, because the uwsgi app is installed globally and inside uwsgi installation folder there is no python app. Pgadmin4 is running in a virtualenv and uses a separate folder, you can see it in the uwsgi start log. Wouldn't it be easier to just return 'python' or the best solution somehow detect the python executable from within the virtualenv directory? Hope it helps🙂 |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-9 I mean this log entries🙂: |
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-10 Redmine ticket header update:
|
Comment migrated from Redmine: https://redmine.postgresql.org/issues/7580#note-11 This is resolved in the latest snapshot build: Redmine ticket header update:
|
Issue closed on Redmine. |
Hi,
The Scenario of this issue is as follows:
[raver7@finlay ~]$ which python
alias python='python3.9'
/usr/bin/python3.9
[raver7@finlay ~]$ ls -l /home/raver7/.local/bin/
insgesamt 1260
-rwxrwxr-x. 1 raver7 raver7 223 22. Aug 10:51 pip
-rwxrwxr-x. 1 raver7 raver7 223 22. Aug 10:51 pip3
-rwxrwxr-x. 1 raver7 raver7 223 22. Aug 10:51 pip3.9
-rwxrwxr-x. 1 raver7 raver7 1276576 17. Jul 08:57 uwsgi
[raver7@finlay ~]$ source /home/raver7/share/pgadmin/bin/activate
(pgadmin) [raver7@finlay ~]$ echo $VIRTUAL_ENV
/home/raver7/share/pgadmin
I've tested with the mentioned Version https://ftp.postgresql.org/pub/pgadmin/pgadmin4/snapshots/2022-09-12/pgadmin4-6.13-py3-none-any.whl and I get the Error which correctly says it couldn't find the python executable at the determined directory: In my Opinion the best solution would be to check if pgadmin is running from within a virtualenv by checking if the System Environment Variable |
Issue migrated from Redmine: https://redmine.postgresql.org/issues/7580
Originally created by Jonny Rimkus at 2022-07-31 06:11:53 UTC.
Hi,
I'm running pgadmin 6.12 via uwsgi+nginx and configured it according to the Docs:
https://www.pgadmin.org/docs/pgadmin4/latest/server_deployment.html#nginx-configuration-with-uwsgi
my uwsgi version is 2.0.20 (installed via pip)
I've added the correct binary path, and the Validation shows:
pg_dump: (PostgreSQL) 13.7
pg_dumpall: (PostgreSQL) 13.7
pg_restore: (PostgreSQL) 13.7
psql: (PostgreSQL) 13.7
When I try to use these commands via e.g right click on a Schema->Backup, entering a Filename for the Backup nothing happens.
When I open the Filebrowser I see The file, but it is empty.
I enabled debug logging for pgadmin, and I see the following in the logs:
pgadmin4.log (FILE_LOG_LEVEL = 10 /DEBUG/)
uwsgi log
I think the relevant line is /path/to/bin/uwsgi: unrecognized option '--host' from the uwsgi.log and seems identical to the error described here: https://www.reddit.com/r/PostgreSQL/comments/osb3t7/comment/hb5w2z0/?utm_source=share&utm_medium=web2x&context=3
What can I do to get the Backup functionality working with nginx+uwsgi
The text was updated successfully, but these errors were encountered: