Support #12850
Mistakenly deleted ticket about PgAdmin
0%
Description
Dear Philippe,
I mistakenly deleted the ticket related to the PgAdmin. I am sorry, I clicked on the wrong button, and I don't know how to undo it (if it is ever possible...)
I am very sorry, hope you can recover it
Giulio
Related issues
History
#1 Updated by Philippe May about 3 years ago
Oops... I don't think there's really an option to recover a deleted ticket without digging in the backups of the DB.
For this PGadmin issue in particular, i vaguely remember that there was an operation to do at the end of the setup in order to deal with our environment, so it's a bit annoying.
Will continue from here on this ticket and see how it goes.
I'm in CSR office and could just reboot the GisDB VM: it was stuck at the reboot. Now the Gisaf web services seem to be running correctly.
#2 Updated by Philippe May about 3 years ago
- Related to Support #12851: Map page is not connecting added
#3 Updated by Giulio Di Anastasio about 3 years ago
I am very sorry for the trouble.
Would the e-mails automatically generated by Redmine for each ticket/issue help? I saw that they contain some jargon of what you wrote yesterday...
Giulio
#4 Updated by Philippe May about 3 years ago
Context¶
Installation of pgadmin4 from:
root@gisdb:/etc/systemd/system# cat /etc/apt/sources.list.d/pgadmin4.list deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/bullseye pgadmin4 main
Packages: pgadmin4-server
and pgadmin4-web
Identification of the failure¶
The packages (from the above mentioned origin) cannot work with the current installation.
That includes pgadmin4 in a Python virtual environment - i don't think it was the case with the previous versions.
Moreover, looking at /etc/systemd/system/pgadmin.service
, the root of pgadmin4 installation seems to have changed from /usr/share/pgadmin4/web
to /usr/pgadmin4/web
The main issue now is then that gunicorn isn't provided in the pgadmin4 virtual environment.
Fix¶
Install the missing package manually:
/usr/pgadmin4/venv/bin/pip install gunicorn
Fix the pgadmin4 service:
root@gisdb:/etc/systemd/system# cat pgadmin.service [Unit] Description=Gunicorn daemon (pgadmin) Requires=pgadmin.socket After=network.target [Service] Type=notify # the specific user that our service will run as User=www-data Group=www-data # another option for an even more restricted service is # DynamicUser=yes # see http://0pointer.net/blog/dynamic-users-with-systemd.html RuntimeDirectory=gunicorn WorkingDirectory=/usr/pgadmin4/web ExecStart=/usr/pgadmin4/venv/bin/gunicorn --bind=unix:/run/pgadmin.sock --workers=1 --threads=5 pgAdmin4:app ExecReload=/bin/kill -s HUP $MAINPID KillMode=mixed TimeoutStopSec=5 PrivateTmp=true [Install] WantedBy=multi-user.target
For the record, here's another important piece:
root@gisdb:/etc/systemd/system# cat pgadmin.socket [Unit] Description=gunicorn socket (pgadmin) [Socket] ListenStream=/run/pgadmin.sock # Our service won't need permissions for the socket, since it # inherits the file descriptor by socket activation # only the nginx daemon will need access to the socket User=www-data # Optionally restrict the socket permissions even more. # Mode=600 [Install] WantedBy=sockets.target
~~~
@Guilio: the interesting bits were in the comments/logs, which aren't copied in the subsequent mails. Hopefully it won't be needed anymore as a quick check shows success after the fixes mentioned above. The thing is that i don't remember exactly the reason for the tweaks (jargon note: maybe something about CSRF token?).
~~~
#5 Updated by Philippe May about 3 years ago
- Assignee changed from Philippe May to Giulio Di Anastasio
@Giulio: i reset your password - plz check mail. Log in with your email address.
#6 Updated by Philippe May about 3 years ago
By the way, the public URL is still: https://gis.auroville.org.in/pgadmin