I'm trying to launch PGadmin4 with a PostgreSQL database but when I access http://localhost/pgadmin4
, I keep landing on
127.0.0.1 refused to connect
.
After Postgresql, I launched the databased and the server seems to work:
~ sudo systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor pr>
Active: active (exited) since Wed 2021-05-05 17:44:13 CEST; 11min ago
Process: 8826 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 8826 (code=exited, status=0/SUCCESS)
mai 05 17:44:13 hysterio-Zephyrus-G-GU502DU-GA502DU systemd[1]: Starting Postgr>
mai 05 17:44:13 hysterio-Zephyrus-G-GU502DU-GA502DU systemd[1]: Finished Postgr>
and the standard port 5432 is listening by the right process :
sudo lsof -i tcp:5432
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
postgres 10886 postgres 5u IPv4 134729 0t0 TCP *:postgresql (LISTEN)
postgres 10886 postgres 6u IPv6 134730 0t0 TCP *:postgresql (LISTEN)
The installation of PGadmin4 required the installation of apache web server and it went correctly:
We can now configure the Apache Web server for you. This involves enabling the wsgi module and
configuring the pgAdmin 4 application to mount at /pgadmin4. Do you wish to continue (y/n)? y
The Apache web server is running and must be restarted for the pgAdmin 4 installation to complete. Continue (y/n)?
Apache successfully restarted. You can now start using pgAdmin 4 in web mode at http://127.0.0.1/pgadmin4
I tried editing the pg_hba.conf files and postgresql.conf files to ensure the database is listening to 5432 on the localhost (127.0.0.1) but it hasn't done anything.
Any ideas?