Ошибка pgadmin 4 the application server could not be contacted

I need to add this here because I’ve had several issues with this message. If you have recently upgraded to High Sierra you will find the latest (pgadmin 4.20) will keep appearing with the message «Application Server Could Not be Contacted». What this actually means on Macs is that python was unable to configure your environment in ~/.pgadmin

This directory stores all the things you setup and configure and even logs of what was ran on your user copy usage of pgadmin.

The way to fix this issue on High Sierra is down to sqlite3. If you look in that directory you’ll see everything is stored in sqlite3 files.

When version 4.20 of pgadmin was released it was shipped with a version later than sqlite3.19 and the problem arises because High Sierra is shipped with sqlite3.19, so to fix this issue, you need to replace the old version of sqlite3 with the latest on your packager.

Now be aware, MacosX+ all use sqlite to store details for the majority of apps on your mac, so you’ll need to make sure you do not just wipe the old version but you’ll have to have both versions co-existing together in harmony to avoid anything major occurring on your mac.

1) download brew https://brew.sh/

2) update brew and upgrade brew to make sure it’s up-to-date

3) brew install sqlite3

4) mv /usr/bin/sqlite3 /usr/bin/sqlite3.os

5) ln -s /usr/local/Cellar/sqlite/3.21.0/bin/sqlite3 /usr/bin/sqlite3

6) /usr/bin/sqlite3 -version (check version is later than 3.19)

You can now proceed to open up pgadmin as normal

I need to add this here because I’ve had several issues with this message. If you have recently upgraded to High Sierra you will find the latest (pgadmin 4.20) will keep appearing with the message «Application Server Could Not be Contacted». What this actually means on Macs is that python was unable to configure your environment in ~/.pgadmin

This directory stores all the things you setup and configure and even logs of what was ran on your user copy usage of pgadmin.

The way to fix this issue on High Sierra is down to sqlite3. If you look in that directory you’ll see everything is stored in sqlite3 files.

When version 4.20 of pgadmin was released it was shipped with a version later than sqlite3.19 and the problem arises because High Sierra is shipped with sqlite3.19, so to fix this issue, you need to replace the old version of sqlite3 with the latest on your packager.

Now be aware, MacosX+ all use sqlite to store details for the majority of apps on your mac, so you’ll need to make sure you do not just wipe the old version but you’ll have to have both versions co-existing together in harmony to avoid anything major occurring on your mac.

1) download brew https://brew.sh/

2) update brew and upgrade brew to make sure it’s up-to-date

3) brew install sqlite3

4) mv /usr/bin/sqlite3 /usr/bin/sqlite3.os

5) ln -s /usr/local/Cellar/sqlite/3.21.0/bin/sqlite3 /usr/bin/sqlite3

6) /usr/bin/sqlite3 -version (check version is later than 3.19)

You can now proceed to open up pgadmin as normal

PostgreSQL recently released version 15. Now the pgAdmin comes as a desktop application instead of being opened in a browser. But they have recently been an error that’s roaming around which reads ‘pgAdmin 4 the application server could not be contacted.’ I have to admit, I do not fully know what the causes of this error are (all I know is it has to do with servers) but I’ve also encountered this error myself, and luckily, I found a quick way to fix it, but it might not be the best. I’m going to share with you in this blog post how o did it. Feel free to let me know in the comments if there are any other better fixes.

Here are the steps to take in order to fix the fatal error:

  1. Click the configure button at the bottom right corner.
  2. check the checkbox which reads, Fixed port number.
  3. Change the port number to the one you entered during the installation
  4. click the save button at the bottom right corner of the window.

Now here are details steps:

1. Click the configure button at the bottom right corner.

On the error window, click the configure button at the bottom right corner of the error window.

2. check the checkbox which reads, Fixed port number.

After you click the Configure window, another window will pop up. On this window, check the checkbox which reads, Fixed port number.

3. Change the port number to the one you entered during installation

Clicking the checkbox will enable the port input on the right side. Change the port number to the one you entered during installation, if you used our guide on how to connect PostgreSQL with Django, it’s more likely you’ve used port 5432 because it is the default. If a message that says ‘the port is already in usage pops up’, keep on changing it till you find a port that is free.

4. Click the save button at the bottom right corner of the window.

After changing the port number, click the save button at the bottom right corner of the window.

A window will pop up telling you that pgAdmin has to be restarted in order to apply the changes. Go ahead and click the ‘okay’ button.

And wait for the app to start. Most of the time, it might not restart on its own, so if it takes a long time before it starts, better do that on your own.

Okay, above is what I did to fix the error. Please let me know in the comments section below if you have any other ways of fixing the error. Peace.

Я не знаю поможет ли это кому-то, но всё же напишу тут, дорогой читатель. Если не помогли такие методы, как:
-попробуйте запустить PgAdmin отмени администратора.
-добавьте путь к bin-папке Postgresql в переменные окружения.
-очистите папку C:Users%USERNAME%AppDataRoamingpgAdmin
-перезапустите службу

То проверьте имя и описание своего компьютера, если заданы значения на русском, то измените их на латинские буквы, затем всё полностью удалите и переустановите, мне помогло.

Problem Description:

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 in 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, in 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.

Solution – 1

What finally worked was downgrading to pgadminIII-v.1.22:

Solution – 2

if you are using Mac OS X here is a fix:
Open terminal and run this command

pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log restart

and for other OS just restart your Postgresql server, it will solve

Then start pgAdmin4, it will start as normal

Share or comment if saved someone

Solution – 3

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%AppDataRoamingpgAdminsessions 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: AppDataRoamingpgAdmin is a hidden folder.

Solution – 4

I had same issue on windows. I had v1.6 installed as well as v2.0. Uninstalling v1.6 allowed me to login.

Solution – 5

Start pgAdmin 4 as administrator.

Do the following steps:

  1. Right click pgAdmin 4 icon
  2. Select «Run As Administrator»

Solution – 6

Got this issue after I upgraded PostgreSQL 9.4 to 9.6. The 9.4 binary package had PgAdmin 3 while 9.6 came with PgAdmin 4. I resolved it after a clean installation (I completely uninstalled and reinstalled) of PostgreSQL.

However, under different circumstances, you could try running the pgAdmin 4 application as an Administrator. This should fix the error.

Solution – 7

I had the same issue on the macosx and I renamed .pgadmin (in /users/costa) to .pgadminx and I was able to start pgAdmin4.

Solution – 8

downloaded pgadmin 4 v2.0 and install it no problem atm on force installation. try it. that was solution for me.

Solution – 9

I need to add this here because I’ve had several issues with this message. If you have recently upgraded to High Sierra you will find the latest (pgadmin 4.20) will keep appearing with the message “Application Server Could Not be Contacted”. What this actually means on Macs is that python was unable to configure your environment in ~/.pgadmin

This directory stores all the things you setup and configure and even logs of what was ran on your user copy usage of pgadmin.

The way to fix this issue on High Sierra is down to sqlite3. If you look in that directory you’ll see everything is stored in sqlite3 files.

When version 4.20 of pgadmin was released it was shipped with a version later than sqlite3.19 and the problem arises because High Sierra is shipped with sqlite3.19, so to fix this issue, you need to replace the old version of sqlite3 with the latest on your packager.

Now be aware, MacosX+ all use sqlite to store details for the majority of apps on your mac, so you’ll need to make sure you do not just wipe the old version but you’ll have to have both versions co-existing together in harmony to avoid anything major occurring on your mac.

1) download brew https://brew.sh/

2) update brew and upgrade brew to make sure it’s up-to-date

3) brew install sqlite3

4) mv /usr/bin/sqlite3 /usr/bin/sqlite3.os

5) ln -s /usr/local/Cellar/sqlite/3.21.0/bin/sqlite3 /usr/bin/sqlite3

6) /usr/bin/sqlite3 -version (check version is later than 3.19)

You can now proceed to open up pgadmin as normal

Solution – 10

For my case in Windows 10 for postgresql 10 version, it worked by changing SERVER_MODE to False in config_distro.py placed in web folder, as per these configuration settings: https://www.pgadmin.org/docs/pgadmin4/dev/desktop_deployment.html.

There are other settings mentioned in this answer (https://superuser.com/a/1131964) regarding python but I just changed SERVER_MODE and it worked.

Solution – 11

If you use older postgresql version like 9.x and its services is running,PgAdmin 4 confused which server is base database.

So stop the service older version or new one.Run PgAdmin 4 as Administrator

Its worked for me

Solution – 12

Kill it in Windows Task Manager and then try again. It seems that there is some sort of a problem when accessing the server from different applications.

Solution – 13

Have you recently installed a new version of pgAdmin ?

This issue (and the misleading message) is simply due to the fact that old versions of pgAdmin are unable to read the settings saved by a newer version of pgAdmin !

Make sure you’re starting the right version of pgAdmin (your shortcuts are likely to point to the old version !) and/or uninstall the old version: the upgrade wizard doesn’t do it for you !

Solution – 14

I had the same problem, but running it as an admin worked.

Solution – 15

If none of the methods help try checking your system and user environments PATH and PYTHONPATH variables.

I was getting this error due to my PATH variable was pointing to different Python installation (which comes from ArcGIS Desktop).

After removing path to my Python installation from PATH variable and completely removing PYTHONPATH variable, I got it working!

Keep in mind that python command will not be available from command line if you remove it from PATH.

Solution – 16

As for me on windows 2012r2 it’s start to work only after I reinstall pgAdmin 4 to folder c:pgAdmin4. With out spaces and any special chars.
And all so I give full permission to this folder in NTFS.

Solution – 17

It worked for me after installing python2.7 for pgAdmin 4 v2

Solution – 18

I use the cmd prompt on Windows 10 with psql postgres postgres.

Then I launch pgAdmin4 and it works.

Solution – 19

I had the same issue on Windows 10, with a new installation of PostgreSQL 10.

I solved it by including the path C:PostgreSQL10bin ({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.

Solution – 20

I had this problem with pgadmin4 v2.1 on linux fedora 27

Solved by installing a missing dependency:
python3-flask-babelex

Solution – 21

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”).enter image description here

Solution – 22

You should downgrade to pgadmin3. It Worked for me on windows 10.1 with postrgreSQL 9.6.

Solution – 23

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.

Solution – 24

In Windows Just go to this path and clear it
,that works !!

C:Users%USERNAME%AppDataRoamingpgAdmin

Solution – 25

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:

  1. Delete from App Data C:Users%USERNAME%AppDataRoamingpgAdmin
  2. Add to Path Variables C:Program FilesPostgreSQL9.6bin (I actually added it to both user and system)
  3. Right click and start as admin.

You don’t have to do this every time but when it gets out of wack try these steps.

Solution – 26

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.

enter image description here

Solution – 27

I Fixed it in windows 10 just running pgAdmin 4 as Run as Administrator .

Solution – 28

Deleting the contents of C:Users%USERNAME%AppDataRoamingpgAdmin directory worked for me!

Solution – 29

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:

  1. Navigate to Postgres session’s folder
    C:UsersYourUsernameOrAdminAppDataRoamingpgAdminsessions
  2. Delete all the data from this folder.
  3. Start PgAdmin in administrator mode.

Cheers!

Solution – 30

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.

Solution – 31

Just click on that pgadmin 4 icon and run as administrator. Allow the access permissions. It will start locally.

Solution – 32

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.

Solution – 33

Last resort HKEY_CURRENT_USERSoftwarepgadminpgadmin4 export/delete you know what to do here 🙂

Solution – 34

Deleting everything from this (C:UsersYourUsernameOrAdminAppDataRoamingpgAdmin) 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:UsersYourUsernameOrAdminAppDataRoamingpgAdmin helped me

Solution – 35

Deleting contents of folder C:UsersUser_NameAppDataRoamingpgAdminsessions helped me, I was able to start and load the pgAdmin server

Solution – 36

try this

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

Solution – 37

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 FilesPostgreSQL11pgAdmin 4. What worked for me in this case was making sure that its python virtual environment was setup properly.

  • Go to the c:Program FilesPostgreSQL11pgAdmin 4venvScripts directory and edit activate.bat. Make sure the path in set "VIRTUAL_ENV=... is actually c:Program FilesPostgreSQL11pgAdmin 4venv (or something that makes sense)
  • Open a command prompt and go to the c:Program FilesPostgreSQL11pgAdmin 4 directory
  • Activate the python environment by typing .venvScriptsactivate.bat; the command prompt should change
  • At this point, I could launch pgadmin4 manually from the command prompt using .binpgAdmin4.exe
  • This version lets you right-click on its icon in the system tray, and you get a menu that lets you tweak a few settings and look for its logs.

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}AppDataLocalProgramspgAdmin 4v5runtimepgAdmin4.exe.

  • This version displays a configuration button when it fails to run.
  • What worked for me here was running it as administrator and increasing the wait from 90 seconds to 2 minutes.

Solution – 38

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:

  1. uninstall postgres from control panel /uninstall applications choosing the option «uninstall components» and choosing «pgadmin» ad component to uninstall
  2. downloaded pgadmin installer from pgadmin.org
  3. installed pgagdmin
  4. from the pgadmin preferences in the binarypath i put
    C:Program FilesPostgreSQL13bin

This solved the issue for me.

Solution – 39

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,

  • open Add Programs and Features
  • Uninstall/modify PostgreSQL installation
  • Individual Components
  • tick PG Admin 4 (which was installed along with the database, and is found in the same installation folder as PostgreSQL
  • click Next.

After removing this installation of PG Admin 4, the stand alone installation started working

  • Ошибка pfn reference count
  • Ошибка pfn list corrupt как исправить
  • Ошибка pfm006 macbook air
  • Ошибка pf2 холодильника coca cola
  • Ошибка peugeot boxer p0103