Reputation: 3003
I have installed PostgreSQL 9.6.2 on my Windows 8.1. But the pgadmin4 is not able to contact the local server. I have tried several solutions suggested here on stackoverflow, tried to uninstall and reinstall PostgreSQL 9.6.2, tried to modify the config.py, config_distro.py, and delete the files in Roaming folder, I tried standalone pgadmin4 installation, but no success. However, on my local machine I am able to access the server using psql.exe and log as as superuser (postgres user). Can you please suggest any possible solutions to starting/running pgadmin4? Thank you.
Upvotes: 173
Views: 430826
Reputation: 19
For Windows
1 -> Go to C:\Users\%USERNAME%\AppData\Roaming\pgAdmin
Now it works. atleast for me!
Upvotes: 0
Reputation: 83
For my case installing Postgres 16 on Windows 11.
Install pgAdmin4 separately via https://www.pgadmin.org/download/pgadmin-4-windows/
Check in Services to ensure Postgres + pgAdmin4 are running.
Upvotes: 0
Reputation: 106
I fixed this error another way that didn't write here before. Maybe my case was different but the solution approach will be helpful for someone. I had the same error for pgAdmin 4 v7.1 in windows10. And when I looked at the details I saw that the error includes this information:
import psutil
File "C:\Program Files\PostgreSQL\15\pgAdmin 4\python\lib\site-packages\psutil_init_.py", line 241, in module
raise ImportError(msg)
ImportError: version conflict: 'C:\Program Files\PostgreSQL\15\pgAdmin 4\python\lib\site-packages\psutil\_psutil_windows.cp310-win_amd64.pyd' C extension module was built for another version of psutil (5.9.3 instead of 5.9.5); you may try to 'pip uninstall psutil', manually remove C:\Program Files\PostgreSQL\15\pgAdmin 4\python\lib\site-packages\psutil_psutil_windows.cp310-win_amd64.pyd or clean the virtual env somehow, then reinstall
I removed this file manually and run pgAdmin again as administrator then my problem had fixed. Hope this answer will be helpful for someone
Upvotes: 0
Reputation: 118
Check for the port number (default is 5432
) it is connecting.
In my case, I uninstall the setup, deleted postgress folder from Program files.
Then reinstalled it and it started working.
Upvotes: 0
Reputation: 143
My solution was just reinstall pgadmin4.
Go to Uninstall programs but only uninstall pgadmin and not all postgresql.
Upvotes: 0
Reputation: 1717
Start pgAdmin 4 as administrator.
Do the following steps:
Upvotes: 131
Reputation: 679
I had a similar scenario:
Windows 8.1;
PostgresSQL 10 (x86) - installed via setup (file postgresql-10.22-1-windows.exe);
PG Admin 4 v3.6 installed separately;
Upon trying to open PG Admin, it would take a while and then timeout and give the error message reported in this thread.
I tried various solutions, including editing config.py, as the op said, but nothing worked, until I came across this video on YouTube
Essentially, and to cut the story short,
After removing this installation of PG Admin 4, the stand alone installation started working
Upvotes: 0
Reputation: 15404
I had this issue after installing Postgres 13 on a windows 10 machine where already i had postgres 11.
After uninstalling all and reinstall 13 only I still had the problem.
I finally managed in his way:
This solved the issue for me.
Upvotes: 0
Reputation: 3486
I found the same issue when upgrading to pgAdmin 4 (v1.6). On Windows I found that clearing out the content inside C:\Users\%USERNAME%\AppData\Roaming\pgAdmin\sessions
folder fixed the issue for me. I believe it was attempting to use the sessions from the prior version and was failing. I know the question was marked as answered, but downgrading may not always be an option.
Note: AppData\Roaming\pgAdmin is a hidden folder.
Upvotes: 326
Reputation: 1235
I had a hard time getting pgadmin4 to run on Windows 10 because of having multiple pgadmin4's around, possibly having installed other python versions.
My first suggestion is:
The "application server" is not Postgres itself, but a python program launched by pgadmin4.
If like me you just invoke the Windows Start menu and start typing the name of the program you want to run (p g a d m i n
...), take a moment to right-click on the results, open the file location, right-click on the executable and look at its properties to make sure it's the version you think you're running.
If the version does not match your expectations, open the Start Menu and look carefully for the version you just installed.
Case 1:
One of the pgadmin versions I had trouble was a global installation of pgadmin4 version 3.5 in c:\Program Files\PostgreSQL\11\pgAdmin 4
. What worked for me in this case was making sure that its python virtual environment was setup properly.
c:\Program Files\PostgreSQL\11\pgAdmin 4\venv\Scripts
directory and edit activate.bat
. Make sure the path in set "VIRTUAL_ENV=...
is actually c:\Program Files\PostgreSQL\11\pgAdmin 4\venv
(or something that makes sense)c:\Program Files\PostgreSQL\11\pgAdmin 4
directory.\venv\Scripts\activate.bat
; the command prompt should change.\bin\pgAdmin4.exe
Case 2:
During troubleshooting, I also installed a user specific pgadmin4 version 0.54.1 and it didn't work either. This one lives in c:\users\{your username}\AppData\Local\Programs\pgAdmin 4\v5\runtime\pgAdmin4.exe
.
Upvotes: 0
Reputation: 2630
It seems in most of the cases Postgres trying to use information from previous sessions to find/connect the server and failing. Clearing out the previous session info helped me, it is a combination of 2 already mentioned answers above:
C:\Users\YourUsernameOrAdmin\AppData\Roaming\pgAdmin\sessions
Cheers!
Upvotes: 12
Reputation: 109
Deleting contents of folder C:\Users\User_Name\AppData\Roaming\pgAdmin\sessions
helped me, I was able to start and load the pgAdmin server
Upvotes: 7
Reputation: 59
I encountered the same problem and activated the setup file, it created a database, and was restarting again
sudo /usr/pgadmin4/bin/setup-web.sh
Upvotes: -1
Reputation: 109
Deleting everything from this (C:\Users\YourUsernameOrAdmin\AppData\Roaming\pgAdmin) folder helped me launching pgAdmin4 server again
I am running pgAdmin4 v4.27 now. After I upgraded to pgAdmin4 v4.28 the problem started i.e. the server was not starting. I tried many ways including changing the content type of .js to test/javascript from text/plain, it did not work. Finally deleting all contents from C:\Users\YourUsernameOrAdmin\AppData\Roaming\pgAdmin helped me
Upvotes: -1
Reputation: 113
Last resort HKEY_CURRENT_USER\Software\pgadmin\pgadmin4 export/delete you know what to do here :)
Upvotes: 0
Reputation: 473
A variety of reasons attribute to the failure boot of pgAdmin 4. The reason to my situation is that my Windows system language is not English or utf-8 related. Changing the system locale to English solved the starting issue.
Upvotes: 0
Reputation: 37
Just click on that pgadmin 4 icon and run as administrator. Allow the access permissions. It will start locally.
Upvotes: 2
Reputation: 81
This is often a firewall problem. The firewall log then shows dropped packets between 127.0.0.1: and 127.0.0.1:, where the latter is the port shown in the Browser to get no connection with. This means, that the connection between pgAdmin client (high_port_1) and pgAdmin server (high_port_2) is blocked. Check your firewall log and if you find dropped packets like described, adapt your firewall settings accordingly.
Upvotes: 3
Reputation: 567
Deleting the contents of C:\Users\%USERNAME%\AppData\Roaming\pgAdmin
directory worked for me!
Upvotes: 23
Reputation: 687
I Fixed it in windows 10 just running pgAdmin 4
as Run as Administrator
.
Upvotes: 5
Reputation: 646
I was able to solve the problem by changing the pgAdmin web interface port.
I believe this problem occurred on my computer because I have several other services consuming webs ports like qBittorrent, IDEJetbrains, etc.
Right-clicking on the pgAdmin logo near the clock is possible to configure it.
Upvotes: 4
Reputation: 397
I've been dealing with this for awhile (frustrating). So much that I have instructions on my desktop consolidating all of these ideas. Here is my magic combination to the solution:
You don't have to do this every time but when it gets out of wack try these steps.
Upvotes: 30
Reputation: 4294
In Windows Just go to this path and clear it ,that works !!
C:\Users\%USERNAME%\AppData\Roaming\pgAdmin
Upvotes: 5
Reputation: 714
I ran into this issue as well. Windows 10. I had older version of pgAdmin 4 (1.6) and 2.0. I guess both are older now.
In any case a complete uninstall of both versions and a reinstall of 2.0 worked.
Upvotes: 0
Reputation: 369
You should downgrade to pgadmin3. It Worked for me on windows 10.1 with postrgreSQL 9.6.
Upvotes: -1
Reputation: 4027
I had the same issue on the macosx
and I renamed .pgadmin (in /users/costa) to .pgadminx
and I was able to start pgAdmin4
.
Upvotes: 3
Reputation: 1044
Happens mostly when you have multiple versions of pgadmin installed or while trying to upgrade. Even I tried everything from killing the "running PID on port 5432" to "changing the server mode". In my case I uninstall postgres and re-install it again on different port(5433).
Later, I opened it through cmd(right click on cmd and select "run cmd as an Administrator").
Upvotes: 0
Reputation: 21
I had this problem with pgadmin4 v2.1 on linux fedora 27
Solved by installing a missing dependency: python3-flask-babelex
Upvotes: 2
Reputation: 449
I had the same issue on Windows 10, with a new installation of PostgreSQL 10.
I solved it by including the path C:\PostgreSQL\10\bin ({your path to postgresql}\bin) to system environment variables.
To access environment variables: Control Panel > System and security > System or right click on PC, then > Advance system settings > Environment variables > System variables > Path > Edit.
Upvotes: 21