I installed PostgreSql on my Windows machine. I can connect to PostgreSql through cmd. But when I want to launch pgAdmin I am getting this error message.
I ran into this today even though the service was running in Windows 10. I just stopped the service, gave it a few seconds, and restarted it. I was able to connect with pgAdmin 4.
Try starting the pgAdmin as administrator.
You can start the server manually - any errors will echo on the terminal. The windows app seems touchy on timing - this allows the server to take as much time as needed to start up.
Assuming you installed version 3 into "p:\pgAdmin 4" run the following commands"
p:
cd "\pgAdmin 4\v3\web"
set PYTHONPATH=P:\pgAdmin 4\v3\venv\Lib;P:\pgAdmin 4\v3\venv\DLLs
python pgAdmin4.py
When I run that I get the following output:
Starting pgAdmin 4. Please navigate to http://127.0.0.1:5050 in your browser.
In my case the problem was solved by restarting the postgresql service. Windows-> Service -> find for postgreSQL -> Stop and then Start
In my case, SERVER_MODE was already False in config_distro.py. I then proceeded to start pgadmin4 as an administrator. This also did not work. Finally, I resolved this by restarting postgresql service in services.msc. postgres service restart
In my case, the problem was non-ascii username.
Find pgAdmin installation and open/create config_local.py
in editor, add this:
DATA_DIR = "C:/Data/pgAdmin" # set non-ascii path here
and run setup.py
using python interpreter.